-
Notifications
You must be signed in to change notification settings - Fork 58
feat:(oidc) derive audience claim from client_id in IdentityToken #1402
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
Conversation
194101d
to
6fc943c
Compare
Signed-off-by: SequeI <[email protected]>
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.
Like I mentioned I'm not fully versed on this oidc business but this makes sense to me.
- IdentityToken is public so adding a constructor argument is a minor api change
- this IdentityToken change seems to have broken some tests
Signed-off-by: SequeI <[email protected]>
Huh, I had to do a bunch of linting changes to make it pass. I assume it was bumped recently or something. Odd. |
Signed-off-by: SequeI <[email protected]>
The test/unit/test_oidc.py seems to still have several cases of |
Actually, now that |
Signed-off-by: SequeI <[email protected]>
Signed-off-by: SequeI <[email protected]>
Made some changes, hopefully it passes ci..... Also tested with our own private OIDC aud claim and works as it should. |
Signed-off-by: SequeI <[email protected]>
I was looking at the wrong |
/gcbrun |
test/unit/test_oidc.py
Outdated
@@ -18,13 +18,15 @@ | |||
|
|||
from sigstore import oidc | |||
|
|||
TEST_CLIENT_ID = "sigstore" |
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.
I think this (and the uses below) can be removed now that we have a proper kwarg default in place, right?
Thanks @SequeI! This looks good to me; one last test nitpick and we're good to go 🙂 |
Signed-off-by: SequeI <[email protected]>
/gcbrun |
Thanks @SequeI! |
@woodruffw Huh, the commit failed some tests. Seems like the regular CI skips all ambient credential tests on PR's for some reason. Is there some easy way to test this locally so I can fix my mistake? (Since I caused it 😅 ) |
Summary
Resolves #1401
This change updates the OIDC identity token handling to derive the audience (aud) claim from the provided client_id and defaulting to
_DEFAULT_CLIENT_ID
elsewise. Essentially mimicking Fulcio config behaviourSigned and verified using a custom Sigstore instance alongside a custom OIDC client and all worked.
Release Note
Documentation
None