Skip to content

Commit b922d80

Browse files
committed
Verify all Stackable images instead of just 23.7 operator images
1 parent ab86517 commit b922d80

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

modules/tutorials/examples/verify-signatures/kyverno-policy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ spec:
1616
- Pod
1717
verifyImages:
1818
- imageReferences:
19-
- docker.stackable.tech/*-operator:23.7.*
19+
- docker.stackable.tech/*
2020
attestors:
2121
- entries:
2222
- keyless:
2323
issuer: "https://token.actions.githubusercontent.com"
24-
subject: "https://github.com/stackabletech/*-operator/.github/workflows/build.yml@refs/tags/23.7.*"
24+
subject: "https://github.com/stackabletech/*/.github/workflows/build.yml@refs/*"
2525
rekor:
26-
url: https://rekor.sigstore.dev
26+
url: https://rekor.sigstore.dev

modules/tutorials/pages/enabling_verification_of_image_signatures.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
= Enabling verification of image signatures
22

3-
Image signing is a security measure that helps ensure the authenticity and integrity of container images. Starting with SDP 23.7, all our operator images are signed https://docs.sigstore.dev/cosign/openid_signing/["keyless"] (signing of product images and Helm charts will follow). By verifying these signatures, cluster administrators can ensure that the operator images pulled from Stackable's container registry are authentic and have not been tampered with.
3+
Image signing is a security measure that helps ensure the authenticity and integrity of container images. Starting with SDP 23.7, all our images are signed https://docs.sigstore.dev/cosign/openid_signing/["keyless"]. By verifying these signatures, cluster administrators can ensure that the images pulled from Stackable's container registry are authentic and have not been tampered with.
44
Since Kubernetes does not have native support for verifying image signatures yet, we will use a tool called https://kyverno.io/[Kyverno] in this tutorial.
55

6+
IMPORTANT: Releases prior to SDP 23.7 do not have signed images. If you are using an older release and enforce image signature verification, Pods with Stackable images will be prevented from starting.
7+
68
== Installing Kyverno
79
Kyverno can be easily installed via Helm:
810

@@ -17,7 +19,7 @@ Other installation methods and options to run Kyverno in a highly-available fash
1719

1820
== Creating a policy to verify image signatures
1921

20-
Now that Kyverno is installed, we can create a policy that verifies that all operator images that are part of the SDP 23.7 releases are signed by Stackable's CI pipeline (Github Actions):
22+
Now that Kyverno is installed, we can create a policy that verifies that all images provided by Stackable are signed by Stackable's CI pipeline (Github Actions):
2123

2224
[source,yaml]
2325
include::example$verify-signatures/kyverno-policy.yaml[]
@@ -28,6 +30,6 @@ Apply this policy to the cluster by saving it as `kyverno-policy.yaml` and runni
2830
kubectl apply -f kyverno-policy.yaml
2931
----
3032

31-
The policy will be applied to all namespaces in the cluster. It checks all newly created Pods that run any image matching the expression `docker.stackable.tech/+++*+++-operator:23.7.+++*+++` (all Stackable operators version 23.7.+++*+++) and ensures that these images have been signed by a Stackable Github Action from the release 23.7 (`https://github.com/stackabletech/+++*+++-operator/.github/workflows/build.yml@refs/tags/23.7.+++*+++`). If the signature of an operator image is invalid or missing, the policy will deny the pod creation.
33+
The policy will be applied to all namespaces in the cluster. It checks all newly created Pods that run any image matching the expression `docker.stackable.tech/+++*+++` (all images provided by Stackable) and ensures that these images have been signed by a Stackable Github Action (`https://github.com/stackabletech/+++*+++/.github/workflows/build.yml@refs/+++*+++`). If the signature of an image is invalid or missing, the policy will deny the pod creation.
3234
For a more detailed explanation of the policy options, please refer to the https://kyverno.io/docs/writing-policies/verify-images/sigstore/#keyless-signing-and-verification[Kyverno documentation].
33-
If the `subject` field in the policy is changed to something like `https://github.com/test/+++*+++`, the policy will deny the creation of operator pods because the signature is no longer valid.
35+
If the `subject` field in the policy is changed to something like `https://github.com/test/+++*+++`, the policy will deny the creation of pods with Stackable images because the signature is no longer valid.

0 commit comments

Comments
 (0)