Migrating from Hydra v1.x to v2.x¶
Since mokey v1.4 the Hydra integration targets Ory Hydra v2.x (the client
SDK talks to the v2 admin API, which lives under the /admin path prefix).
Hydra v1.x is no longer supported by Ory and is not tested against mokey.
mokey side¶
Nothing changes in mokey.toml — the [hydra] section keeps the same keys:
[hydra]
admin_url = "http://127.0.0.1:4445"
login_timeout = 86400
fake_tls_termination = true
admin_url must point at Hydra's admin endpoint (port 4445 by default),
same as before.
Hydra side¶
Follow Ory's official upgrade guide. The short version:
- Back up the Hydra database.
- Install Hydra v2.x and run
hydra migrate sqlagainst your DSN. - Review breaking changes that affect OAuth2 clients:
- the scope matching strategy defaults to exact matching in v2
- access tokens default to the
ory_at_opaque format; setstrategies.access_token: jwtif your apps expect JWTs - client registration field names changed in the CLI
(
hydra create oauth2-clientinstead ofhydra clients create) - Keep
urls.login,urls.consent, andurls.logoutpointing at mokey:
urls:
login: https://mokey.example.com/oauth/login
consent: https://mokey.example.com/oauth/consent
logout: https://mokey.example.com/auth/logout
No mokey data migration is needed — mokey stores no Hydra state.