Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): regexp support in cosign keyless verification #1327

Merged
merged 2 commits into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions content/en/docs/writing-policies/verify-images/sigstore/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,35 @@ spec:
url: https://rekor.sigstore.dev
```

The following policy verifies an image signed using [keyless signing](https://docs.sigstore.dev/signing/overview/) with regular expressions for subject and issuer:

```yaml
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-image-keyless
spec:
validationFailureAction: Enforce
webhookTimeoutSeconds: 30
rules:
- name: check-image-keyless
match:
any:
- resources:
kinds:
- Pod
verifyImages:
- imageReferences:
- "ghcr.io/kyverno/test-verify-image:signed-keyless"
attestors:
- entries:
- keyless:
subjectRegExp: https://github\.com/.+
issuerRegExp: https://token\.actions\.githubusercontent.+
rekor:
url: https://rekor.sigstore.dev
```

### Keyless signing

To sign images using the keyless flow, use the following cosign command:
Expand Down Expand Up @@ -497,6 +526,7 @@ attestors:
url: https://rekor.sigstore.dev
```


## Using a Key Management Service (KMS)

Kyverno and Cosign support using Key Management Services (KMS) such as AWS, GCP, Azure, and HashiCorp Vault. This integration allows referencing public and private keys using a URI syntax, instead of embedding the key directly in the policy.
Expand Down