Skip to content

Commit 5b3d641

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

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

docs/spec/v1beta2/helmcharts.md

+11
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,14 @@ 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 that the subject and the OIDC issuer present in the Fulcio certificate
311+
you can specify `.spec.verify.cosignIdentityMatch`. It provides two fields:
312+
313+
- `.issuerRegExp`, to sepcify a regexp that matches against the OIDC issuer.
314+
- `.subjectRegExp`, to specify a regexp that matches against the identity in
315+
the certificate.
316+
Both values should follow the [Go regular expression syntax](https://golang.org/s/re2syntax).
317+
310318
Example of verifying HelmCharts signed by the
311319
[Cosign GitHub Action](https://github.com/sigstore/cosign-installer) with GitHub OIDC Token:
312320

@@ -325,6 +333,9 @@ spec:
325333
version: ">=6.1.6"
326334
verify:
327335
provider: cosign
336+
cosignIdentityMatch:
337+
subjectRegExp: "stefanprodan"
338+
issuerRegExp: "^https://token.actions.githubusercontent.com$"
328339
```
329340

330341
```yaml

docs/spec/v1beta2/ocirepositories.md

+13
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ signatures. The field offers two subfields:
506506
- `.provider`, to specify the verification provider. Only supports `cosign` at present.
507507
- `.secretRef.name`, to specify a reference to a Secret in the same namespace as
508508
the OCIRepository, containing the Cosign public keys of trusted authors.
509+
- `.cosignIdentityMatch`, to specify the identity matching criteria if the
510+
artifact was signed using Cosign keyless signing.
509511

510512
```yaml
511513
---
@@ -555,6 +557,14 @@ For publicly available OCI artifacts, which are signed using the
555557
[Cosign Keyless](https://github.com/sigstore/cosign/blob/main/KEYLESS.md) procedure,
556558
you can enable the verification by omitting the `.verify.secretRef` field.
557559

560+
To verify that the subject and the OIDC issuer present in the Fulcio certificate
561+
you can specify `.spec.verify.cosignIdentityMatch`. It provides two fields:
562+
563+
- `.issuerRegExp`, to sepcify a regexp that matches against the OIDC issuer.
564+
- `.subjectRegExp`, to specify a regexp that matches against the identity in
565+
the certificate.
566+
Both values should follow the [Go regular expression syntax](https://golang.org/s/re2syntax).
567+
558568
Example of verifying artifacts signed by the
559569
[Cosign GitHub Action](https://github.com/sigstore/cosign-installer) with GitHub OIDC Token:
560570

@@ -568,6 +578,9 @@ spec:
568578
url: oci://ghcr.io/stefanprodan/manifests/podinfo
569579
verify:
570580
provider: cosign
581+
cosignIdentityMatch:
582+
subjectRegExp: "stefanprodan"
583+
issuerRegExp: "^https://token.actions.githubusercontent.com$"
571584
```
572585

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

0 commit comments

Comments
 (0)