-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add URI OIDC type to support URI subjects #455
Conversation
d876a44
to
efd4de7
Compare
Implementing the first part of sigstore#398, which adds support for subjects in OIDC tokens that are URIs. The implementation is very similar to SPIFFE-based tokens. Tokens must conform to the following: * The issuer of the token must partially match the domain in the configuration. This means that the scheme, top level domain, and second level domain must match. It is also expected that we validate that the requester who adds the configuration for the issuer has control over both the issuer and domain configuration fields (ACME). * The domain of the configuration and hostname of the subject of the token must match exactly. Slightly reworked the API test to test this issuer type. I'll follow up in a later PR with some more refactoring around this class, I think we can exercise the codepaths for all issuers. Signed-off-by: Hayden Blauzvern <[email protected]>
efd4de7
to
fc39b28
Compare
Codecov Report
@@ Coverage Diff @@
## main #455 +/- ##
=======================================
Coverage ? 46.58%
=======================================
Files ? 14
Lines ? 1024
Branches ? 0
=======================================
Hits ? 477
Misses ? 478
Partials ? 69 Continue to review full report at Codecov.
|
cc @znewman01 |
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. Just some nits, nothing I think of as blocking.
Signed-off-by: Hayden Blauzvern <[email protected]>
Thanks for the comments @jchestershopify! |
This implements the second part of sigstore#398, adding support for OIDC subjects that are simply usernames. A configured domain will be appended to the username and included as a SAN email address. Like sigstore#455, token issuers must partially match the configured domain. The top level and second level domain must match, and it's expected that we validate ownership for what's configured in the issuer and domain fields. Signed-off-by: Hayden Blauzvern <[email protected]>
This implements the second part of sigstore#398, adding support for OIDC subjects that are simply usernames. A configured domain will be appended to the username and included as a SAN email address. Like sigstore#455, token issuers must partially match the configured domain. The top level and second level domain must match, and it's expected that we validate ownership for what's configured in the issuer and domain fields. Signed-off-by: Hayden Blauzvern <[email protected]>
This implements the second part of sigstore#398, adding support for OIDC subjects that are simply usernames. A configured domain will be appended to the username and included as a SAN email address. Like sigstore#455, token issuers must partially match the configured domain. The top level and second level domain must match, and it's expected that we validate ownership for what's configured in the issuer and domain fields. Signed-off-by: Hayden Blauzvern <[email protected]>
This implements the second part of sigstore#398, adding support for OIDC subjects that are simply usernames. A configured domain will be appended to the username and included as a SAN email address. Like sigstore#455, token issuers must partially match the configured domain. The top level and second level domain must match, and it's expected that we validate ownership for what's configured in the issuer and domain fields. Signed-off-by: Hayden Blauzvern <[email protected]>
* Add Username scoped to domain OIDC type This implements the second part of #398, adding support for OIDC subjects that are simply usernames. A configured domain will be appended to the username and included as a SAN email address. Like #455, token issuers must partially match the configured domain. The top level and second level domain must match, and it's expected that we validate ownership for what's configured in the issuer and domain fields. Signed-off-by: Hayden Blauzvern <[email protected]> * Refactor API tests This refactor adds tests for all supported OIDC types, and makes it simpler to add new tests for new OIDC types. * Add tests for K8s and GitHub OIDC types. * Add additional verification for issued certificate values * Add dedicated test for RootCert success, don't call RootCert in every test. * Move common expectations to function. This provides a single place to check response values. * Move common set up to dedicated functions. * Lowercase all error messages, because style. Signed-off-by: Hayden Blauzvern <[email protected]>
Implementing the first part of #398, which adds support
for subjects in OIDC tokens that are URIs. The implementation
is very similar to SPIFFE-based tokens.
Tokens must conform to the following:
configuration. This means that the scheme, top level domain, and
second level domain must match. It is also expected that we validate
that the requester who adds the configuration for the issuer has
control over both the issuer and domain configuration fields (ACME).
token must match exactly.
Slightly reworked the API test to test this issuer type. I'll
follow up in a later PR with some more refactoring around this
class, I think we can exercise the codepaths for all issuers.
Also planning to write documentation on the supported issuers.
Signed-off-by: Hayden Blauzvern [email protected]
Summary
Ticket Link
Ref #398
Release Note