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

Improve documentation for token propagation #19872

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Sep 2, 2021

This came up when I was looking at #19456

@@ -596,15 +596,16 @@ quarkus.oidc-client.token-path=/protocol/openid-connect/tokens
[[token-propagation]]
== Token Propagation in MicroProfile RestClient client filter

`quarkus-oidc-token-propagation` extension provide `io.quarkus.oidc.token.propagation.AccessTokenRequestFilter` and `io.quarkus.oidc.token.propagation.JsonWebTokenRequestFilter` JAX-RS ClientRequestFilters which propagates the current link:security-openid-connect[Bearer] or link:security-openid-connect-web-authentication[Authorization Code Flow] access token as an HTTP `Authorization` `Bearer` scheme value.
The `quarkus-oidc-token-propagation` extension provides two JAX-RS `javax.ws.rs.client.ClientRequestFilter` class implementations that simplify the propagation of authentication information.
`io.quarkus.oidc.token.propagation.AccessTokenRequestFilter` propagates the current link:security-openid-connect[Bearer], while `io.quarkus.oidc.token.propagation.JsonWebTokenRequestFilter` propagates the link:security-openid-connect-web-authentication[Authorization Code Flow] access token as an HTTP `Authorization` `Bearer` scheme value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geoand Hi Georgios, no, it is not correct:

io.quarkus.oidc.token.propagation.AccessTokenRequestFilter` propagates the current link:security-openid-connect[Bearer], while `io.quarkus.oidc.token.propagation.JsonWebTokenRequestFilter` propagates the link:security-openid-connect-web-authentication[Authorization Code Flow] access token as an HTTP `Authorization` `Bearer` scheme value.

The access token can be a bearer token coming with HTTP Authorization or acquired with the code flow - both filters work for both cases - the difference is, the JWT one adds some extra support for tokens which are in JWT format, so I'd drop this note

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, thanks.

I'll update the docs then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully it's better now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geoand Yes, thanks

@sberyozkin sberyozkin self-requested a review September 2, 2021 14:44
@sberyozkin sberyozkin merged commit b397e44 into quarkusio:main Sep 2, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 2, 2021
@geoand geoand deleted the oidc-token-polish branch September 2, 2021 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants