You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICT, there's nothing stopping GitHub from issuing an OIDC token with any iss claim they'd like, which would let them impersonate, say, Google. This means that if any accepted OIDC issuer is compromised, all of them should be considered compromised.@haydentherapper has identified a separate mechanism that addresses this; see below.
@haydentherapper's investigation (lightly edited for formatting):
When a token, the issuer claim is extracted from it:
The mapping from issuer to token verifier is built from the linked mapping too.
If GitHub issues a token whose issuer claim is not the GitHub URL, then Fulcio will find a verifier that verifies a different token or finds no verifier at all.
Dex is the only special case - The issuer in the token and configuration is "oauth2.sigstore.dev", but we also provide the claim that will be used to populate the certificate—IssuerClaim:
Given that there's a 1-1 mapping between issuer value and verifier, is this needed? If I understand the request, it would be to add a configuration field to check that the issuer value in the token matches what's in the configuration, but this is effectively what we've got already, it's just that the key of the mapping is that configuration.
First, I could be totally convinced that we should just close this, so maybe that's the right thing to do.
I guess I'm more concerned about the second half: we dispatch to the appropriate verifier based on the OIDC token, but then the issuer that winds up in the ultimate cert isn't double-checked against the config at all. So if this line was somehow wrong for the GitHub issuer, nothing would happen.
Nowhere in there does it say which issuers that verifier is allowed to create certs for. It tells you how to get that value (IssuerClaim) but not what issuer values are allowed.
I was just thinking that we could have a new "AllowedIssuers" (name needs editing) config value and add a double-check that the Issuers from the X.509 cert is in that set. By default it could just be the same as the IssuerURL (so it matters mostly for Dex).
Again, I don't think anything is wrong right now, but can't hurt to be defensive.
The below describes a hypothetical issue. Right now, we do everything correctly. But I'd like to see us be a bit more defensive here.
We populate the 1.3.6.1.4.1.57264.1.1 extension in issued certificates (per the certificate specification) based on the
iss
claims in the OIDC token.For GitHub, we do it like so:
fulcio/pkg/identity/github/principal.go
Line 90 in 7d5114e
fulcio/pkg/identity/github/principal.go
Line 114 in 7d5114e
AFAICT, there's nothing stopping GitHub from issuing an OIDC token with any@haydentherapper has identified a separate mechanism that addresses this; see below.iss
claim they'd like, which would let them impersonate, say, Google. This means that if any accepted OIDC issuer is compromised, all of them should be considered compromised.@haydentherapper's investigation (lightly edited for formatting):
My request: we should allow configuring explicit allowed issuer value(s) for each issuer that Fulcio supports, and defensively check that they match.
The text was updated successfully, but these errors were encountered: