Skip to content
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 a token exchange protocol for OIDC 'service' applications #5755

Closed
sberyozkin opened this issue Nov 25, 2019 · 10 comments · Fixed by #16586
Closed

Support a token exchange protocol for OIDC 'service' applications #5755

sberyozkin opened this issue Nov 25, 2019 · 10 comments · Fixed by #16586
Assignees
Labels
area/oidc kind/enhancement New feature or request
Milestone

Comments

@sberyozkin
Copy link
Member

sberyozkin commented Nov 25, 2019

Description
As Stian @stianst and also Pedro @pedroigor have mentioned a bearer token coming into a service OIDC application may need to be exchanged for it to be correctly propagated (to retain a link with the original token, not to misuse the audience, scopes, etc).

Implementation ideas
Provide a pluggable TokenExchange interface (or may be use SecurityIdentityAugmentor) which would exchange the token before it has been prepared for the injection by the Arc producers.

Possibly a medium/longer term. Also CC @sebastienblanc and @stuartwdouglas

@sberyozkin sberyozkin added kind/enhancement New feature or request area/oidc labels Nov 25, 2019
@pedroigor
Copy link
Contributor

Another idea would be to enhance RESTeasy Client (or any other client library used by Quarkus users) to perform the exchange behind scenes when invoking some downstream service.

@sberyozkin
Copy link
Member Author

@pedroigor in this case we'd need to make the incoming token available to the OidcClient (#5657) via a context propagation. We can have both options supported, the exchanged token can be qualified at the injection point to distinguish it from the incoming token

@stianst
Copy link
Contributor

stianst commented Nov 26, 2019

Right now token exchange is tech preview in Keycloak and we're not sure when we'd make it fully supported. Adding support for token exchange to Quarkus is probably something we could do as part of making token exchange supported.

@sberyozkin
Copy link
Member Author

Hi @stianst @pedroigor I'm thinking of closing the issue for now and revisiting it later when we get some concrete user interest; or we can do some initial exchange support and let users experiment, what do you think ?

@pedroigor
Copy link
Contributor

I vote for close and wait.

@sberyozkin
Copy link
Member Author

Ok, let me close for now and we can quickly reopen once needed :-)

@gsmet gsmet added the triage/wontfix This will not be worked on label Jul 17, 2020
@sberyozkin sberyozkin reopened this Jan 12, 2021
@sberyozkin sberyozkin removed the triage/wontfix This will not be worked on label Jan 12, 2021
@sberyozkin
Copy link
Member Author

Hey @pedroigor as discussed during the oidc-client PR review, I'm re-opening this issue so that we can review how to make the token-propagation case done such that the token acquires a new audience etc after the token exchange with Keycloak

@sberyozkin
Copy link
Member Author

We can already re-sign the JWT token locally but if we want to preserve the token flow/transformation in the KC logs/etc then the exchange protocol would be the best indeed...

@lordvlad
Copy link
Contributor

lordvlad commented May 7, 2021

Hi @stianst @pedroigor I'm thinking of closing the issue for now and revisiting it later when we get some concrete user interest; or we can do some initial exchange support and let users experiment, what do you think ?

Where can I vote? :) I'd be interested in this feature. Currently, I do it with raw http calls since not even the keycloak java api supports the exchange properly.

@MadinaS
Copy link

MadinaS commented Oct 4, 2021

any news in this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oidc kind/enhancement New feature or request
Projects
None yet
6 participants