This list makes you aware of any breaking and substantial non-breaking changes.
- 0.10.0-alpha.16
- 0.10.0-alpha.13
- 0.10.0-alpha.11
- 0.10.0-alpha.9
- 0.10.0-alpha.1
- 0.9.0
- 0.8.0
Versions 0.10.0-alpha.13
, 0.10.0-alpha.14
, and 0.10.0-alpha.15
had issues with the static binary of ORY Hydra which has been resolved.
Now, the uncompressed docker image size is ~12MB and the base image is scratch
instead of alpine
.
This release removes build tags -http
, -automigrate
, -without-telemetry
from the docker hub repository and replaces
it with a new and tiny (~30MB) docker image containing the binary only.
This release adds the possibility to specify special characters in the FORCE_ROOT_CLIENT_CREDENTIALS
by www-url-decoding
the values. If you have characters that are not url safe in your root client credentials, please use the following
form to specify them: "FORCE_ROOT_CLIENT_CREDENTIALS=urlencode(id):urlencode(secret)"
.
This release focuses on cryptographic security by leveraging best practices that emerged within the last one and a half years. Before upgrading to this version, make a back up of the JWK table in your SQL database.
Our use of crypto/aes
's AES-GCM was replaced in favor of cryptopasta/encrypt
.
As this includes a change of how nonces are appended to the ciphertext, ORY Hydra will be unable to decipher existing
databases.
There are two paths to migrate this change:
- If you have not added any keys to the JWK store:
- Stop all Hydra instances.
- Drop all rows from the
hydra_jwk
table. - Start one Hydra instance and wait for it to boot.
- Restart all remaining Hydra instances.
- If you added keys to the JWK store:
- If you can afford to re-generate those keys:
1. Write down all key ids you generated.
2. Stop all Hydra instances.
3. Drop all rows from the
hydra_jwk
table. 4. Start one Hydra instance and wait for it to boot. 5. Restart all remaining Hydra instances. 6. Regenerate the keys and use the key ids you wrote down. - If you can not afford to re-generate the keys:
1. Export said keys using the REST API.
2. Stop all Hydra instances.
3. Drop all rows from the
hydra_jwk
table. 4. Start one Hydra instance and wait for it to boot. 5. Restart all remaining Hydra instances. 6. Import said keys using the REST API.
The signature algorithm used to generate authorize codes, access tokens, and refresh tokens has been upgraded from HMAC-SHA256 to HMAC-SHA512. With upgrading to alpha.9, all previously issued authorize codes, access tokens, and refresh will thus be rendered invalid. Apart from some re-authorization procedures, which are usually automated, this should not have any significant impact on your installation.
The RS256 JWK Generator now uses the full 256 bit range to generate secrets instead of a predefined rune sequence. This change only affects keys generated in the future.
Warning: This version introduces breaking changes and is not suited for production use yet.
Version 0.10.0 is a preview tag of the 1.0.0 release. It contains multiple breaking changes.
This release requires running hydra migrate sql
before hydra host
.
Please also note that the new scope strategy might render your administrative client incapable of performing requests.
Set the environment variable SCOPE_STRATEGY=DEPRECATED_HIERARCHICAL_SCOPE_STRATEGY
to temporarily use the previous
scope strategy and migrate the scopes manually. You may append .*
to all scopes. For example, hydra
is now hydra hydra.*
Previously, the consent flow looked roughly like this:
- App asks user for Authorization by generating the authorization URL (http://hydra.mydomain.com/oauth2/auth?client_id=...).
- Hydra asks browser of user for authentication by redirecting to the Consent App with a consent challenge (http://login.mydomain.com/login?challenge=xYt...).
- Retrieves a RSA 256 public key from Hydra.
- Uses said public key to verify the consent challenge.
- User logs in and authorizes the requested scopes
- Consent app generates the consent response
- Retrieves a private key from Hydra which is used to sign the consent response.
- Creates a response message and sign with said private key.
- Redirects the browser back to Hydra, appending the consent response (http://hydra.mydomain.com/oauth2/auth?client_id=...&consent=zxI...).
- Hydra validates consent response and generates access tokens, authorize codes, refresh tokens, and id tokens.
This approach has several disadvantages:
- Validating and generating the JSON Web Tokens (JWTs) requires libraries for each language
- Because libraries are required, auto generating SDKs from the swagger spec is impossible. Thus, every language requires a maintained SDK which significantly increases our workload.
- There have been at least two major bugs affecting almost all JWT libraries for any language. The spec has been criticised for it's mushy language.
- The private key used by the consent app for signing consent responses was originally thought to be stored at the consent app, not in Hydra. However, since Hydra offers JWK storage, it was decided to use the Hydra JWK store per default for retrieval of the private key to improve developer experience. However, to make really sense, the private key should have been stored at the consent app, not in Hydra.
- Private/Public keypairs need to be fetched on every request or cached in a way that allows for key rotation, complicating the consent app.
- There is currently no good mechanism for rotating JWKs in Hydra's storage.
- The consent challenge / response has a limited length as it's transmitted via the URL query. The length of a URL is limited.
Due to these reasons we decided to refactor the consent flow. Instead of relying on JWTs using RSA256, a simple HTTP call is now enough to confirm a consent request:
- App asks user for Authorization by generating the authorization URL (http://hydra.mydomain.com/oauth2/auth?client_id=...).
- Hydra asks browser of user for authentication by redirecting to the Consent App with a unique consent request id (http://login.mydomain.com/login?consent=fjad2312).
- Consent app makes a HTTP REST request to
http://hydra.mydomain.com/oauth2/consent/requests/fjad2312
and retrieves information on the authorization request. - User logs in and authorizes the requested scopes
- Consent app accepts or denies the consent request by making a HTTP REST request to
http://hydra.mydomain.com/oauth2/consent/requests/fjad2312/accept
orhttp://hydra.mydomain.com/oauth2/consent/requests/fjad2312/reject
. - Redirects the browser back to Hydra.
- Hydra validates consent request by checking if it was accepted and generates access tokens, authorize codes, refresh tokens, and id tokens.
Learn more on how the new consent flow works in the guide: https://ory.gitbooks.io/hydra/content/oauth2.html#consent-flow
Previously, the audience terminology was used as a synonym for OAuth2 client IDs. This is no longer the case. The audience
is typically a URL identifying the endpoint(s) the token is intended for. For example, if a client requires access to
endpoint http://mydomain.com/users
, then the audience would be http://mydomain.com/users
.
The audience feature is currently not supported in Hydra, only the terminology changed. Fields named audience
are thus
renamed to clientId
(where previously named audience
) and cid
(where previously named aud
).
IMPORTANT NOTE: This does not apply to OpenID Connect ID tokens. There, the aud
claim MUST match the client_id
.
This discrepancy between OpenID Connect and OAuth 2.0 is what caused the confusion with the OAuth 2.0 audience terminology.
Previously, the response of the warden endpoint contained shorthands like aud
, iss
, and so on. Those have now been changed
to their full names. For example, iss
is now issuer
. Additionally, aud
is now named clientId
.
The Go SDK was completely replaced in favor of a SDK based on swagger-codegen
. Read more on it here: https://ory.gitbooks.io/hydra/content/sdk/go.html
GET /health
is nowGET /health/status
GET /health/stats
is nowGET /health/metrics
GET /warden/groups
now returns a list of groups, not just a group id
The previous scope matching strategy has been replaced in favor of a wildcard-based matching strategy. Read more on this strategy here.
To fall back to hierarchical scope matching, set the environment variable SCOPE_STRATEGY=DEPRECATED_HIERARCHICAL_SCOPE_STRATEGY
.
This feature might be fully removed in the final 1.0.0 version.
- It is now possible to refresh openid connect tokens using the refresh_token grant. An ID Token is issued if the scope
openid
was requested, and the client is allowed to receive an ID Token.
This version adds performance metrics to /health
and sends anonymous usage statistics to our servers, click here for more
details on this feature and how to disable it.
This PR improves some performance bottlenecks, offers more control over Hydra, moves to Go 1.8, and moves the REST documentation to swagger.
Before applying this update, please make a back up of your database. Do not upgrade directly from versions below 0.7.0.
To upgrade the database schemas, please run the following commands in exactly this order
$ hydra help migrate sql
$ hydra help migrate ladon
$ hydra migrate sql mysql://...
$ hydra migrate ladon 0.6.0 mysql://...
Ladon was greatly improved with version 0.6.0, resolving various performance bottlenecks. Please read more on this release here.
Redis and RethinkDB are removed from the repository now and no longer supported, see this issue.
To reflect the GitHub organization rename, Hydra was moved from https://github.com/ory-am/hydra
to
https://github.com/ory/hydra
.
The method FindPoliciesForSubject
of the policy SDK was removed. Instead, List
was added. The HTTP endpoint GET /policies
no longer allows to query by subject.
To generate JWKs previously the payload at POST /keys
was { "alg": "...", "id": "some-id" }
. id
was changed to
kid
so this is now { "alg": "...", "kid": "some-id" }
.
SQL Migrations are no longer automatically applied. Instead you need to run hydra migrate sql
after upgrading
to a Hydra version that includes a breaking schema change.
Set the log format to json using export LOG_FORMAT=json
You can configure SQL connection limits by appending parameters max_conns
, max_idle_conns
, or max_conn_lifetime
to the DSN: postgres://foo:bar@host:port/database?max_conns=12
.
... and are swagger 2.0 spec.
Documentation on scopes (e.g. offline) was added.
Hydra now uses github.com/ory/herodot
for writing REST responses. This increases compatibility with other libraries
and resolves a few other issues.
Hydra is now capable of gracefully handling SIGINT.
Hydra now implements best practices for running HTTP servers that are exposed to the public internet.