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

allow passing 'id_token_hint' to the IdP in logout uri or end_session_endpoint #522

Open
ShyLionTjmn opened this issue Feb 21, 2023 · 9 comments

Comments

@ShyLionTjmn
Copy link

My IdP requires id_token as one of parameters to be able to redirect to specified URL, like this:

end_session_endpoint: https://idp.domain.com/oauth/logout?id_token_hint={ID_TOKEN}&post_logout_redirect_uri=https%3A%2F%2Fmyapp.domain.com%2F

is there a way to include it in uri?

@bnfinet
Copy link
Member

bnfinet commented Feb 22, 2023

@ShyLionTjmn welcome back!

Which IdP is this?

VP does not support passing the token to the IdP in a logout URL.

@aaronpk
Copy link
Collaborator

aaronpk commented Feb 22, 2023

fwiw this is part of the OpenID Connect spec:

https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout

@bnfinet
Copy link
Member

bnfinet commented Feb 22, 2023

right now these URLs are configured in vouch.post_logout_redirect_uris
https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example#L194

If #41 OIDC Discovery from .well-known is implemented and VP is configured with the specified end_session_endpoint does the IdP include id_token_hint={ID_TOKEN}?

I don't see that mentioned here...
https://openid.net/specs/openid-connect-discovery-1_0.html

I'm thinking there may need to be a new configuration parameter...
vouch.post_logout_id_token_hint: true (default false)

MicroSoft Azure chooses not to include id_token_hint when OIDC discovery is used.
https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/active-directory-b2c/session-behavior.md

Seems like "Single Sign Out" is it's own rabbit hole. :)

@aaronpk
Copy link
Collaborator

aaronpk commented Feb 22, 2023

Seems like "Single Sign Out" is it's own rabbit hole. :)

It absolutely is 😂

@bnfinet bnfinet changed the title id_token in logout uri allow passing the id_token_hint to the IdP in logout uri Feb 22, 2023
@bnfinet bnfinet changed the title allow passing the id_token_hint to the IdP in logout uri allow passing id_token_hint to the IdP in logout uri or end_session_endpoint Feb 22, 2023
@bnfinet bnfinet changed the title allow passing id_token_hint to the IdP in logout uri or end_session_endpoint allow passing 'id_token_hint' to the IdP in logout uri or end_session_endpoint Feb 22, 2023
@ShyLionTjmn
Copy link
Author

ShyLionTjmn commented Feb 22, 2023

IdP is Blitz: https://identityblitz.com/

https://blitz.mydomain.com/blitz/oauth/.well-known/openid-configuration has:
"end_session_endpoint": "https://blitz.mydomain.com/blitz/oauth/logout",

@ShyLionTjmn
Copy link
Author

I'm thinking there may need to be a new configuration parameter... vouch.post_logout_id_token_hint: true (default false)

that would be nice

@talasjanos
Copy link

talasjanos commented Jul 4, 2023

I'd be really glad if this extra parameter could be implemented.

Keycloak also requires the id_token_hint parameter to skip the logout confirmation.

Update: I just found #258 that is supposed to do exactly that. Any ideas why this isn't working?

Update 2: I just found #298 (also see #328) that mandates the explicit inclusion of the id/access token as headers to make them available. You need to add this to your vouch configuration to make it work:

vouch:
  # ...
  headers:
    accesstoken: X-Vouch-IdP-AccessToken
    idtoken: X-Vouch-IdP-IdToken

@talasjanos
Copy link

@ShyLionTjmn is this fixing your issue?

@ShyLionTjmn
Copy link
Author

didn't try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants