Skip to content

Commit dd648db

Browse files
committed
docs: add docs for cosign identity matching
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
1 parent b4eda85 commit dd648db

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/spec/v1beta2/helmcharts.md

+15
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,18 @@ For publicly available HelmCharts, which are signed using the
307307
[Cosign Keyless](https://github.com/sigstore/cosign/blob/main/KEYLESS.md) procedure,
308308
you can enable the verification by omitting the `.verify.secretRef` field.
309309

310+
To verify the identity subject and the OIDC issuer present in the Fulcio
311+
certificate, you can specify a list of OIDC identity matchers using
312+
`.spec.verify.matchOIDCIdentity`. The matcher provides two required fields:
313+
314+
- `.issuer`, to specify a regexp that matches against the OIDC issuer.
315+
- `.subject`, to specify a regexp that matches against the subject identity in
316+
the certificate.
317+
Both values should follow the [Go regular expression syntax](https://golang.org/s/re2syntax).
318+
319+
The matchers are evaluated in an OR fashion, i.e. the identity is deemed to be
320+
verified if any one matcher successfully matches against the identity.
321+
310322
Example of verifying HelmCharts signed by the
311323
[Cosign GitHub Action](https://github.com/sigstore/cosign-installer) with GitHub OIDC Token:
312324

@@ -325,6 +337,9 @@ spec:
325337
version: ">=6.1.6"
326338
verify:
327339
provider: cosign
340+
matchOIDCIdentity:
341+
- issuer: "^https://token.actions.githubusercontent.com$"
342+
subject: "^https://github.com/stefanprodan/podinfo.*$"
328343
```
329344

330345
```yaml

docs/spec/v1beta2/ocirepositories.md

+15
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,18 @@ For publicly available OCI artifacts, which are signed using the
555555
[Cosign Keyless](https://github.com/sigstore/cosign/blob/main/KEYLESS.md) procedure,
556556
you can enable the verification by omitting the `.verify.secretRef` field.
557557

558+
To verify the identity subject and the OIDC issuer present in the Fulcio
559+
certificate, you can specify a list of OIDC identity matchers using
560+
`.spec.verify.matchOIDCIdentity`. The matcher provides two required fields:
561+
562+
- `.issuer`, to specify a regexp that matches against the OIDC issuer.
563+
- `.subject`, to specify a regexp that matches against the subject identity in
564+
the certificate.
565+
Both values should follow the [Go regular expression syntax](https://golang.org/s/re2syntax).
566+
567+
The matchers are evaluated in an OR fashion, i.e. the identity is deemed to be
568+
verified if any one matcher successfully matches against the identity.
569+
558570
Example of verifying artifacts signed by the
559571
[Cosign GitHub Action](https://github.com/sigstore/cosign-installer) with GitHub OIDC Token:
560572

@@ -568,6 +580,9 @@ spec:
568580
url: oci://ghcr.io/stefanprodan/manifests/podinfo
569581
verify:
570582
provider: cosign
583+
matchOIDCIdentity:
584+
- issuer: "^https://token.actions.githubusercontent.com$"
585+
subject: "^https://github.com/stefanprodan/podinfo.*$"
571586
```
572587

573588
The controller verifies the signatures using the Fulcio root CA and the Rekor

0 commit comments

Comments
 (0)