-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for OAuth2 Demonstrating Proof of Possession #45891
Conversation
5a924c3
to
89a452a
Compare
72cf471
to
ff297e7
Compare
This comment has been minimized.
This comment has been minimized.
🙈 The PR is closed and the preview is expired. |
Oops, I realized I forgot starting containers for testing a few negative rests I added today |
ff297e7
to
8b21ba0
Compare
I mistyped the RSA key size (2024 as opposed to 2048), now the tests should be fine |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sorry, needs more work, some side-effects likely related to enabling all features in the devservice |
8b21ba0
to
802f60c
Compare
This comment has been minimized.
This comment has been minimized.
I ended up adding a dedicated |
Status for workflow
|
Status for workflow
|
That could've been a great new feature for LTS |
Also CC @mposolda |
Just to clarify that at the test level, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sberyozkin LGTM
Thanks very much for the time, @pedroigor. @mposolda, you are always welcome to comment as well, I'll CC you when I open a follow up PR to allow the registration of the custom DPoP Nonce providers |
@gsmet, Hi, it is quite an important feature, if it is not too late yet then please consider for a backport, but please don't hesitate to drop the backport label if you feel it may be too sensitive to backport |
Fixes #42115.
This PR adds a complete DPoP token verification support, with tests.
DPoP is currently restricted to the public clients, which explains why the test structure is created around
FrontendResource
emulating SPA.Support for the custom DPoP nonce providers can be offered in the future.
All in all, the implementation is just a translation of https://datatracker.ietf.org/doc/html/rfc9449#name-checking-dpop-proofs, goes via every recommended verification step:
Some tuning for the URI matches might be needed going forward but should work fine for typical cases.
To support the test cases I updated Keycloak Dev service to enable experimental features for users be able to use DPoP, etc.
The actual tests can be improved further, I'd like to enable in a separate PR to report exception causes not only in devmode but also in test mode.