-
Notifications
You must be signed in to change notification settings - Fork 49
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
sigstore: refactor, use IdentityToken everywhere #635
Conversation
See #567. Signed-off-by: William Woodruff <[email protected]>
Disable old tests temporarily. Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
...still unreachable. Signed-off-by: William Woodruff <[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.
I think this looks great from my perspective, apart from one thing: I am interested in the certificate identity issuer which is not necessarily "iss" in the JWT.
So as an example, in this example JWT below the certificate identity details I'm looking for are email
and federated_claims.connector_id
. I assume in other cases iss
is really the certificate issuer.
{
'iss': 'https://oauth2.sigstore.dev/auth',
'sub': '...',
'aud': 'sigstore',
'exp': 1682590933,
'iat': 1682590873,
'nonce': '...',
'at_hash': '...',
'email': '[email protected]',
'email_verified': True,
'federated_claims': {
'connector_id': 'https://github.com/login/oauth',
'user_id': '...'
}
}
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.
LGTM! I think just the point about federated_connector_id
needs to be addressed. But otherwise, the refactor looks great.
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
I've added |
Yep, strongly agreed. I wonder if that's something that should go in the client spec, or maybe somewhere else? CC @znewman01 |
Likely the Fulcio spec—CC @haydentherapper |
Ack, added a TODO to the spec doc to include this somewhere |
Thanks all! I think this is good to go, pending final review. |
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.
New changes LGTM!
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.
Looks like a really good improvement to me, thanks for the patient tweaking.
Left one log content comment and have two other notes but none of these should IMO block this PR:
- The attribute name does not feel great but your reasoning about it makes sense and I don't have better suggestions. It does feel like
identity
is a lot likeexpected_certificate_subject
but only one of them has "expected" in the name... - IdentityTokens
identity
andexpected_certificate_subject
attributes also operate slightly differently: one is pre-computed and the other is not. I don't think this matters much
Yeah, fully agreed -- I'm vacillating between |
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[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.
The newest changes LGTM!
Signed-off-by: William Woodruff <[email protected]>
Seemingly not needed? Signed-off-by: William Woodruff <[email protected]>
Key changes:
sigstore._internal.oidc.Identity
is now stabilized assigstore.oidc.IdentityToken
, and provides attributes similar to the ones originally requested/proposed by @jku in Signing should support issuer and identity arguments too #567Signer.sign(...)
API now takes anIdentityToken
rather than a rawstr
IdentityToken
class now uses the correctIdentityError
exception type (the first party one, rather thanid.IdentityError
IdentityToken
rather than a rawstr
IdentityToken
rather rawstr
objects_die
, which improves our type-checking of the CLISee #567.
CC @jku