DATE:
AUTHOR:
Ory Team
Ory Hydra Ory Kratos Ory Keto Ory Enterprise License

Ory Hydra, Ory Kratos, Ory Keto v26.4.24 released

DATE:
AUTHOR: Ory Team

Ory Hydra

Loopback redirect URIs must match exactly except for the port

Redirect URIs on 127.0.0.1 and [::1] still accept any port, but everything else must now match the registered URI character for character, as RFC 8252 requires. Hydra previously compared the decoded path and ignored user information and empty query strings, so http://127.0.0.1:54321/a%2Fb matched a registered http://127.0.0.1/a/b.

Breaking changes

An authorization request whose loopback redirect URI matched a registered URI only after decoding or normalization now fails with invalid_request. This includes a redirect URI that differs from the registered one in percent-encoding, user information, an empty query string (?), or the case of the scheme. For example, HTTP://127.0.0.1:54321/callback no longer matches a registered http://127.0.0.1/callback.

Send the redirect URI exactly as registered, apart from the port, or register the URI your app sends.

Manage OAuth2 clients whose ID is a URL through the admin API

The routes under /admin/clients/{id} accept the client ID in a client_id query parameter, with - as the path segment. Use it for client IDs that contain /, such as the URL of a client ID metadata document, because proxies often reject an encoded / in a path. On Ory Network, this is the only way to address such a client: GET /admin/clients/-?client_id=https%3A%2F%2Fapp.example.com%2Fclient.json.

Requests without the parameter work as before. The Hydra CLI uses the query form for client IDs that need escaping. See Address a client whose ID is a URL.

Breaking change in the TypeScript SDK

In @ory/client, the positional client functions of OAuth2ApiFp and OAuth2ApiAxiosParamCreator take a new optional clientId argument before options and before any optional request body. The OAuth2Api class is unchanged.

Expired assertion IDs are cleaned up outside of token requests

Ory Hydra records the jti of every private_key_jwt client assertion and JWT bearer grant assertion to reject reused assertions. Token requests no longer delete expired records. Instead:

  • On CockroachDB with Ory Enterprise License, a row-level TTL deletes them.

  • On all databases, hydra janitor --tokens deletes them.

If you use PostgreSQL, MySQL, SQLite, or YugabyteDB, run hydra janitor --tokens regularly. Otherwise the hydra_oauth2_jti_blacklist table keeps growing.

A jti stays known after its assertion expires, until one of these cleanups deletes it. A new assertion that reuses the jti is rejected until then. The jti must be unique for each assertion, as RFC 7519 requires.

If two JWT bearer grant requests send an assertion with the same jti at the same time, the second one now fails with jti_known instead of server_error.

In fosite, ClientManager.ClientAssertionJWTValid and RFC7523KeyStorage.IsJWTUsed are removed. SetClientAssertionJWT and MarkJWTUsedForTime report a known jti with fosite.ErrJTIKnown, including one whose expiry has passed.

Loopback redirect URIs on localhost accept any port

A client that registers an http redirect URI on localhost without a port can now send that URI with any port, if the authorization request sets response_type=code and sends a PKCE code challenge with code_challenge_method=S256. For example, http://localhost/callback matches http://localhost:54321/callback. Until now, only 127.0.0.1 and [::1] accepted any port. A localhost redirect URI registered with a port, such as http://localhost:3000/callback, still matches only that port.

Native apps and MCP clients that listen on a random local port, such as Claude Code, can now sign in with a localhost redirect URI. This includes clients resolved from a client ID metadata document. The scheme, host, path, and query must still match exactly.

RFC 8252 requires any-port matching only for loopback IP addresses and recommends them over localhost. Hydra accepts localhost for compatibility with existing clients. New clients should still use http://127.0.0.1 or http://[::1].


This is now available on Ory Network, for the Ory Enterprise License, and will be part of the next Ory Open Source release.


Ory Kratos

Limit the memory used by password hashing

Ory Kratos can now limit the memory that Argon2 and scrypt password hashing use at the same time. The limit covers hashing new passwords and verifying imported Argon2, scrypt, and Firebase scrypt hashes. It doesn't apply to bcrypt or PBKDF2.

The limit is off by default. To turn it on, set the new hashers.memory_limit key. When it is on, an operation that doesn't fit waits up to 5 seconds for memory. If none becomes available, the login, registration, or settings request fails with 429 Too Many Requests and the client can retry.

For example, with hashers.argon2.memory: 128MB and hashers.memory_limit: 1GiB, Ory Kratos runs up to eight Argon2 operations at once. To serve more concurrent password logins, increase the limit together with the memory available to Ory Kratos.

See Memory limit for password hashing for the configuration and the Prometheus metrics.

Stricter validation of imported Argon2 hashes

Argon2 hashes with an empty output are now rejected at import and at login.

To import an identity whose hash exceeds a limit, use the password migration hook. Your existing system verifies the password the first time the user signs in, and Ory Kratos then stores its own hash. The import documentation now lists the limits for every hash algorithm.

Stricter validation of imported Argon2 hashes

Argon2 hashes with an empty output are now rejected at import and at login.

To import an identity whose hash exceeds a limit, use the password migration hook. Your existing system verifies the password the first time the user signs in, and Ory Network then stores its own hash. The import documentation now lists the limits for every hash algorithm.


This is now available on Ory Network, for the Ory Enterprise License, and will be part of the next Ory Open Source release.


Ory Keto

Keto retires page tokens for the old relationship listing order

Breaking changes

Before upgrading, make sure every Keto read replica runs v26.4.22 or a later version that accepts both listing orders. Wait at least one hour after Keto last issued an old-order page token, because continuing an old listing can renew its token.

Keto retires page tokens for the old relationship listing order

Breaking changes

This release can reject page tokens from relationship listings started before the upgrade. If Keto rejects a token, restart the listing with the same filters and omit the page token.


This is now available for the Ory Enterprise License and will be part of the next Ory Open Source release.


Ory Network, Ory Oathkeeper, Ory Polis, Ory Elements, and Ory Terraform

No significant changes in this release.

Powered by LaunchNotes