Closed mcritchlow closed 7 months ago
Thanks for reaching out.
Yes, subjectEmail
matches email. The …@refs/heads/trunk
value clearly isn’t an email.
policy.json
does not currently implement the full space of more than a dozen of values Fulcio might include in the certificate. (And I think fairly strongly that “subject of an undefined kind matches this string” is not sufficiently precise for a security policy.)
Compare the long discussion in #2235.
Ah, that makes sense. Thank you for the response!
So ideally, if I'm reading #2235 correctly, if implemented my policy.json
would instead use a uri
property or something along those lines to distinguish between an actual email address and the URI that the Gitlab OIDC certificate-identify
generates and uses for signing.
So at the moment, this is not implemented and I would need to either use a personal key to sign to work around this rather than using the Gitlab OIDC keyless solution, or wait. Is that right?
With #2235, I think it probably be closer to subjectAutomatedBuildConfigURI
than just uri
. But, yes, either way, a new field.
Got it, thank you. I'll close this then and subscribe to #2235. Thanks again for the help
Hello, I have a project in Gitlab which is building, signing and verifying (via Cosign) some Fedora Silverblue images[1] following the recommended documentation[2].
In the CI pipeline, the signed images can be verified as expected. Similarly, in a (local) alpine container, if i do a separate verification, I'm greeted with:
The Issuer is what I currently have mapped to
oidcIssuer
inpolicy.json
The Subject is what I currently have mapped to
subjectEmail
inpolicy.json
The relevant contents of
policy.json
:And the registries.d entry:
However when trying to do a
podman pull
I get:It feels like there's a missing configuration detail regarding
Required email
. Was I wrong to assume thatSubject
from the cosign verification output and Gitlab documentation maps tosubjectEmail
? Any help/guidance would be much appreciated. Thank you!.