hydra
hydra copied to clipboard
Phase out client.OutfacingID
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Cloud project.
- [X] I have joined the Ory Community Slack.
- [X] I am signed up to the Ory Security Patch Newsletter.
Describe your problem
Foreign keys referencing the hydra_client table currently use the OutfacingID (column name id) rather than the primary key (column name pk). The OutfacingID is deprecated (see https://github.com/ory/hydra/issues/2781) and redundant.
Describe your ideal solution
- Deprecate
client_idin the client POST endpoint. IDs are generated by Hydra without the option to be configured. - Use the primary key both internally and in the API.
- ~~Allow querying with the old IDs by exposing the necessary endpoints as a v1 API.~~ [edit: the API needs to be backward compatible, so this is not an option]
- Finally, update the FindInDb method on
Flowto useEager().Find().
~~This solution can be implemented by hashing the legacy IDs and encoding them as UUIDv4.~~
[edit]: The question of how to support the legacy identifiers remains unresolved.
Workarounds or alternatives
A slightly different approach is not to expose a v1 API, but instead to always query for either id or hash(id).
Version
v2.x
Additional Context
No response