-
Notifications
You must be signed in to change notification settings - Fork 980
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
Trusted publishing: Enforce strict audience checking #14158
Conversation
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Co-authored-by: Dustin Ingram <[email protected]>
@woodruffw A test to ensure this doesn't regress would be nice! |
Sounds good, doing now. |
Signed-off-by: William Woodruff <[email protected]>
Done: I've added a test on both our own JWT helper and a "backstop" test on |
def __init__(self) -> None: | ||
self._privkey = rsa.generate_private_key(65537, 2048) | ||
self._pubkey = self._privkey.public_key() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff is messy here, but I took the opportunity to optimize this test group a bit (RSA keygen is pretty slow and the keys don't need to be unique per-test, so I'm having them reuse the same keypair rather than regenerating each time.)
This bumps
pyjwt
to 2.8.0 and uses the newly-addedstrict_aud
option to ensure that we reject JWTs that don't contain exactly a single stringaud
claim.Closes #13887.