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

[@actions/attest] Fix bug with customized OIDC issuer #1823

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

bdehamer
Copy link
Contributor

@bdehamer bdehamer commented Sep 4, 2024

Fixes an issue when generating provenance statements for enterprise accounts using customized OIDC issuer value.

Previously, there was a strict comparison of the iss claim in the OIDC token to ensure that it originated from the GitHub Actions provider. However, this did not account for the fact that enterprise accounts may append their enterprise slug to the end of the standard issuer URL.

The comparison has been updated to check that the issuer URL starts with a value that matches the GitHub provider.

See: actions/attest-build-provenance#222

@bdehamer bdehamer force-pushed the bdehamer/enterprise-issuer branch 2 times, most recently from 6b20780 to 6eb1f30 Compare September 4, 2024 16:56
@bdehamer bdehamer marked this pull request as ready for review September 4, 2024 17:19
@bdehamer bdehamer requested a review from a team as a code owner September 4, 2024 17:19
audience: OIDC_AUDIENCE,
issuer
audience: OIDC_AUDIENCE
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jose library only checks for absolute matches, so we're going to remove the check of the iss claim and implement our own regex-based check.

@bdehamer bdehamer force-pushed the bdehamer/enterprise-issuer branch from 6eb1f30 to 5bc3bcc Compare September 4, 2024 17:22
@bdehamer bdehamer force-pushed the bdehamer/enterprise-issuer branch from 5bc3bcc to 2a07de1 Compare September 4, 2024 17:24
@bdehamer bdehamer merged commit 6dd369c into main Sep 5, 2024
14 checks passed
@bdehamer bdehamer deleted the bdehamer/enterprise-issuer branch September 5, 2024 16:17
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.

3 participants