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

OpenID Connect "at_hash" claim requirement during ID token validation #849

Closed
aaronmarkey opened this issue Nov 2, 2023 · 1 comment · Fixed by #852
Closed

OpenID Connect "at_hash" claim requirement during ID token validation #849

aaronmarkey opened this issue Nov 2, 2023 · 1 comment · Fixed by #852

Comments

@aaronmarkey
Copy link

Expected behaviour

Per the OpenID Connect specification, the at_hash claim in ID Token can be optional, depending on circumstance. Thus, I'd expect ID token validation to succeed when the at_hash ID cliam is not required and not provided.

This was the actual behavior up to social-core 4.4.2.

Actual behaviour

Since social-core version 4.5, the OpenIdConnectAuth backend incorrectly raises an AuthTokenError when the Authorization Code flow is used without the use of the at_hash claim in an ID token.

What are the steps to reproduce this issue?

Input clear steps to reproduce the issue for a maintainer.

  1. Use the OpenIdConnectAuth backend with the code RESPONSE_TYPE.
  2. Make a request to a ID provider which does not include an at_hash claim in the ID token, such as Auth0.com.
  3. Error occurs upon ID token validation.

Any logs, error output, etc?

The problematic code in question is here. This check should succeed when at_hash is not in the claim set, as is the behavior in the original python-jose functionality.

Any other comments?

@nijel
Copy link
Member

nijel commented Nov 2, 2023

See also #848 (comment)

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

Successfully merging a pull request may close this issue.

2 participants