Commit Graph

38 Commits

Author SHA1 Message Date
Kevin Goslar d768cf6580
docs: standardize license headers (#3216) 2022-11-03 10:10:12 -05:00
aeneasr 062734e16a refactor: deprecate `--dangerous-force-http` flag
BREAKING CHANGE: CLI flag `--dangerous-force-http` has been removed. Please use the `--dev` flag instead!
2022-09-07 08:10:31 +02:00
aeneasr 46b5887464 refactor: deprecate `--dangerous-allow-insecure-redirect-url` flag
BREAKING CHANGE: CLI flag `--dangerous-allow-insecure-redirect-url` has been removed. Please use the `--dev` flag instead!
2022-09-07 08:10:31 +02:00
Andrew Minkin 1b2f6a675e
docs: use Ory instead of ORY in the documentation (#2939) 2022-01-15 17:27:36 +01:00
hackerman 3e5760f56d
docs: link to correct doc in help command (#2631)
Closes #2366
2021-07-14 10:49:28 +02:00
Alano Terblanche f039ebbdf3
feat: flush inactive/expired login and consent requests (#2381)
This patch resolves various table growth issues caused by expired/inactive login and consent flows never being purged from the database.

You may now use the new `hydra janitor` command to remove access & refresh tokens and login & consent requests which are no longer valid or used. The command follows the `notAfter` safe-guard approach to ensure records needed to be kept are not deleted.

To learn more, please use `hydra help janitor`.

This patch phases out the `/oauth2/flush` endpoint as the janitor is better suited for background tasks, is easier to run in a targeted fashion (e.g. as a singleton job), and does not cause HTTP timeouts.

Closes #1574
2021-03-24 20:58:44 +01:00
aeneasr 8c12b27a59 refactor: replace viper with koanf config management
BREAKING CHANGES: After battling with [spf13/viper](https://github.com/spf13/viper) for several years we finally found a viable alternative with [knadh/koanf](https://github.com/knadh/koanf). The complete internal configuration infrastructure has changed, with several highlights:

1. Configuration sourcing works from all sources (file, env, cli flags) with validation against the configuration schema, greatly improving developer experience when changing or updating configuration.
2. Configuration reloading has improved significantly and works flawlessly on Kubernetes.
3. Performance increased dramatically, completely removing the need for a cache layer between the configuration system and ORY Hydra.
4. It is now possible to load several config files using the `--config` flag.
5. Configuration values are now sent to the tracer (e.g. Jaeger) if tracing is enabled.

Please be aware that deprecated configuration flags have finally been removed with this change. It is also possible that ORY Hydra might complain about an invalid configuration, because the validation process has improved significantly.
2020-12-02 13:37:05 +01:00
aeneasr 8f3462ff52 fix: address pop inconsistencies and update tests 2020-10-20 14:55:49 +02:00
aeneasr bf3be849c0 fix: improve cli flags and add `-c` config flag 2020-10-20 14:55:49 +02:00
nessita d619fabc2e
fix: update link to config docs displayed on `hydra serve help` (#2071)
Closes #2065
2020-10-01 09:51:23 +02:00
aeneasr fdb3231e19 fix: resolve dependency issues and adopt logrusx logger 2020-05-28 14:35:37 +02:00
Shankar Dhanasekaran 0746f6f7fc docs: Fix wrong command name (#1496) 2019-07-21 19:26:09 +02:00
hackerman f8b4a3c83f
cmd: Use commit hash instead of version for link to config (#1488)
Closes #1486
2019-07-13 00:19:04 +02:00
hackerman ed6e8153f1
cors: Use sane default settings for CORS options (#1417)
Closes #1400

Signed-off-by: aeneasr <aeneas@ory.sh>
2019-05-02 13:03:59 +02:00
hackerman cb2ad555ce
oauth2: Allow whitelisting insecure redirect URLs (#1354)
This patch enables developers to whitelist insecure redirect URLs while using flag `--dangerous-force-http`.

Closes #1021

Signed-off-by: aeneasr <aeneas@ory.sh>
2019-04-11 20:39:57 +02:00
hackerman 513afe0d34
Improve release pipeline and update changelog (#1341)
Signed-off-by: aeneasr <aeneas@ory.sh>
2019-04-02 15:35:59 +02:00
hackerman 95a51deb31
Improve configuration and service management (#1314)
This patch significantly refactors internal configuration and service management with the goal of making configuration changes possible without service restarts. This patch prepares the possibility to configure ORY Hydra from a remote source (etcd, consul) and watch for changes. This patch also introduces the possibility to configure ORY Hydra from a configuration file on top of environment variables.

The following issues have been fixed as well:

- Key rotation of the system secret is now much simpler (closes #1316)
- Database connectivity parameters such as max_conns no longer cause issues with older postgres versions (closes #1327)
- Non-existing routes now return a JSON error instead of `text/plain` when `application/json` was requested (clsoes #1244)
- We now push tags latest, X, X.Y, X.Y.Z to docker hub (closes #1289)
- The quickstart guide no longer builds the source code but instead pulls latest tag (closes #1309)
- We moved to goreleaser and godownloader for release management (closes #1107)
- The quickstart Docker Compose files are now reusable (closes #1196)

The following issues are also resolved:

- Closes #1121 

Signed-off-by: aeneasr <aeneas@ory.sh>
2019-04-02 11:52:21 +02:00
jayme-github aa6ab26908 cmd: Support binding frontend/backend to unix sockets (#1230)
This allows the use of strings like "unix:/path/to/socket" as PUBLIC_HOST and/or PRIVATE_HOST.

Signed-off-by: Janis Meybohm <meybohm@traum-ferienwohnungen.de>
2018-12-13 11:17:26 +01:00
jayme-github a78050d9ef cmd: Fix help output of `hydra serve ...` (#1229)
The help message is missing separation of public and admin port.

Signed-off-by: Janis Meybohm <meybohm@traum-ferienwohnungen.de>
2018-12-12 17:19:43 +01:00
hackerman e4bc6c269c
docs: Fix broken links (#1216)
Signed-off-by: aeneasr <aeneas@ory.sh>
2018-12-08 13:39:28 +01:00
hackerman 196a85f654
vendor: Upgrade to fosite 0.28.0 (#1172)
This patch enables refresh token expiry.

Closes #1088

Signed-off-by: arekkas <aeneas@ory.am>
2018-11-16 14:47:57 +01:00
hackerman ddafef543c
oauth2: Make client registration endpoint configurable (#1167)
Closes #1072
2018-11-08 17:12:32 +01:00
hackerman 4a8cf84f15
cmd: Add ability to specify consent and login lifespan (#1155)
Closes #1057
2018-11-03 21:15:59 +01:00
hackerman ef27911997
cmd: Improve issuer error message (#1152)
Closes #1133

Signed-off-by: aeneasr <aeneas@ory.sh>
2018-11-03 12:55:29 +01:00
hackerman 3a10df9bff
oauth2: Add OAuth2 audience claim and improve migrations (#1145)
This patch adds the ability to whitelist and request an audience
when performing any OAuth 2.0 Flow. The audience is useful in multi-
tenant environments where access tokens should be restricted to certain
resources.

Closes #883
Closes #1144

Signed-off-by: arekkas <aeneas@ory.am>
2018-11-02 16:46:01 +01:00
Amir Aslaminejad f32d1b084b tracing: Add support for tracing DB interactions (#1115)
* tracing: add support for tracing interactions with the database
* tracing: add tests for new BackendConnector options
* tracing:
  • export connector options and hide hydra specific connector options
  • remove config for allowing SQL query args to be included in spans
* tracing: use keyed fields when instantiating TracedBCrypt + helper to determine if Tracing has been configured to DRY up code
* tracing: document the TRACE_ environment variables
* tracing: fixes bug in WithTracing() and adds test coverage
* tracing: add sample tracing configuration in docker-compose

Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
2018-10-26 12:12:49 +02:00
hackerman 65b7406abe
Move dependencies to ory/x (#1095)
Signed-off-by: aeneasr <aeneas@ory.sh>
2018-10-23 06:59:31 -07:00
hackerman 251bd5c5b1
cmd: Disable CORS by default (#997)
This patch introduces environment variable `CORS_ENABLED` which toggles CORS.

Closes #996

Signed-off-by: arekkas <aeneas@ory.am>
2018-08-21 12:13:04 +02:00
hackerman 93dcbcf3b9
consent: Add logout api endpoint (#984)
Closes #970

Signed-off-by: Michael DeRazon <mderazon@gmail.com>
Signed-off-by: arekkas <aeneas@ory.am>
2018-08-10 11:27:26 +02:00
arekkas 479acd7ea7 consent: Introduce pairwise support
This patch introduces the OpenID Connect pairwise Subject Identifier Algorithm.

Closes #950

Signed-off-by: arekkas <aeneas@ory.am>
2018-08-10 10:23:19 +02:00
arekkas fdd3bb2096 cmd: Introduce subject type algorithm configuration
See #950

Signed-off-by: arekkas <aeneas@ory.am>
2018-08-10 10:23:19 +02:00
arekkas cfee3eb3d0 cmd: Introduce public and administrative ports
This patch introduces two ports, public and administrative. The public
port is responsible for handling API requests to public endpoints such
as /oauth2/auth, while the administrative port handles requests to
JWK, OAuth 2.0 Client, and Login & Consent endpoints.

Closes #904

Signed-off-by: arekkas <aeneas@ory.am>
2018-08-06 11:29:38 +02:00
arekkas c932ab4571 oauth2: Adds JWT Access Token strategy
This patch adds the (experimental) ability to issue JSON Web Tokens instead of ORY Hydra's opaque access tokens. Please be aware that this feature has had little real-world and unit testing and may not be suitable for production.

Simple integration tests using the JWT strategy have been added to ensure functionality.

To use the new JWT strategy, set environment variable `OAUTH2_ACCESS_TOKEN_STRATEGY` to `jwt`. For example: `export OAUTH2_ACCESS_TOKEN_STRATEGY=jwt`.

Please be aware that we (ORY) do not recommend using the JWT strategy for various reasons. If you can, use the default and recommended "opaque" strategy instead.

Closes #248

Signed-off-by: arekkas <aeneas@ory.am>
2018-07-23 17:10:30 +02:00
arekkas 215bef3add client: Adds ability to define default client scopes
Environment variable `OIDC_DYNAMIC_CLIENT_REGISTRATION_DEFAULT_SCOPE` was added in order to better implement the OpenID Connect Dynamic Client Registration protocol. The mentioned protocol does not support the concept of whitelisting OAuth 2.0 Scope on a per-client basis. Therefore, the functionality to define the default OAuth 2.0 Scope has been defined.

Keep in mind that exposing the OpenID Connect Dynamic Client Registration functionality to the public effectively disables the OAuth 2.0 Scope whitelisting functionality, as each caller of that API can define which OAuth 2.0 Scope a client may request.

If you decide to expose that functionality, you should NEVER assume that the granted OAuth 2.0 Scope has any meaning when handling requests at your consent endpoint, or when validating requests with tokens issued by the client_credentials flow.
2018-06-24 17:24:12 +02:00
arekkas eb22c244be all: Moves to metrics-middleware 2018-06-07 13:18:02 +02:00
arekkas 1940c3c8ff oauth2: Properly uses issuer in JWT 2018-05-19 22:39:01 +02:00
arekkas 052ee831e1 Merge remote-tracking branch 'origin/master' into 1.0.x
# Conflicts:
#	Gopkg.lock
#	cmd/server/handler.go
#	config/config.go
#	health/handler.go
#	oauth2/consent_strategy.go
2018-05-09 11:47:28 +02:00
arekkas 0b5f4666d8 cmd: Deprecates connect command and introduces configurable credentials
This patch deprecates the `hydra connect` command as internal
access control has been removed from ORY Hydra and this command
no longer serves any purpose.

Instead, all commands are supplied with environment variables `HYDRA_URL`,
`OAUTH2_CLIENT_ID`, `OAUTH2_CLIENT_SECRET`, `OAUTH2_ACCESS_TOKEN`.

Please check out `hydra help <command>` for usage instructions. You
should also check out the upgrade guide for more detailed upgrade instructions.

This patch also renames some flags and command names which have been
documented in the upgrade guide.

Closes #841
Closes #840
2018-05-04 15:03:26 +02:00