@@ -501,11 +501,13 @@ for more information.
501
501
# ## Verification
502
502
503
503
` .spec.verify` is an optional field to enable the verification of [Cosign](https://github.com/sigstore/cosign)
504
- signatures. The field offers two subfields :
504
+ signatures. The field offers three subfields :
505
505
506
506
- ` .provider` , to specify the verification provider. Only supports `cosign` at present.
507
507
- ` .secretRef.name` , to specify a reference to a Secret in the same namespace as
508
508
the OCIRepository, containing the Cosign public keys of trusted authors.
509
+ - ` .matchOIDCIdentity` , to specify a list of OIDC identity matchers. Please see
510
+ [Keyless verification](#keyless-verification) for more details.
509
511
510
512
` ` ` yaml
511
513
---
@@ -555,6 +557,18 @@ For publicly available OCI artifacts, which are signed using the
555
557
[Cosign Keyless](https://github.com/sigstore/cosign/blob/main/KEYLESS.md) procedure,
556
558
you can enable the verification by omitting the `.verify.secretRef` field.
557
559
560
+ To verify the identity subject and the OIDC issuer present in the Fulcio
561
+ certificate, you can specify a list of OIDC identity matchers using
562
+ `.spec.verify.matchOIDCIdentity`. The matcher provides two required fields :
563
+
564
+ - ` .issuer` , to specify a regexp that matches against the OIDC issuer.
565
+ - ` .subject` , to specify a regexp that matches against the subject identity in
566
+ the certificate.
567
+ Both values should follow the [Go regular expression syntax](https://golang.org/s/re2syntax).
568
+
569
+ The matchers are evaluated in an OR fashion, i.e. the identity is deemed to be
570
+ verified if any one matcher successfully matches against the identity.
571
+
558
572
Example of verifying artifacts signed by the
559
573
[Cosign GitHub Action](https://github.com/sigstore/cosign-installer) with GitHub OIDC Token :
560
574
@@ -568,6 +582,9 @@ spec:
568
582
url: oci://ghcr.io/stefanprodan/manifests/podinfo
569
583
verify:
570
584
provider: cosign
585
+ matchOIDCIdentity:
586
+ - issuer: "^https://token.actions.githubusercontent.com$"
587
+ subject: "^https://github.com/stefanprodan/podinfo.*$"
571
588
` ` `
572
589
573
590
The controller verifies the signatures using the Fulcio root CA and the Rekor
0 commit comments