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

fix: include client_assertion in token hook payload #3949

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phooijenga
Copy link

We want to use JWTs for client authentication in combination with a token hook.

Related issue(s)

When a client authenticates via the private_key_jwt auth method the payload includes

client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer

and

client_assertion=<signed-jwt>

This works, and the token hook is called, but it does not include the assertion.

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

I didn't see any tests for the private_key_jwt auth method, so I copied and modified some of the existing tests for JWT as Authorization Grant.

@phooijenga phooijenga requested review from aeneasr and a team as code owners February 20, 2025 09:18
@aeneasr
Copy link
Member

aeneasr commented Feb 20, 2025

That‘s on purpose - like we don’t include the client_secret, auth code, or other tokens.

@phooijenga
Copy link
Author

phooijenga commented Feb 20, 2025 via email

@aeneasr
Copy link
Member

aeneasr commented Feb 20, 2025

Would it not be possible to replay the auth grant with the assertion?

@phooijenga
Copy link
Author

A replay attempt would be rejected because the jti was already used; which is required for this flow.

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

Successfully merging this pull request may close these issues.

2 participants