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

fix: add akv keys check on cosign-verifier #1427

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion charts/ratify/templates/verifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
name: cosign
artifactTypes: application/vnd.dev.cosign.artifact.sig.v1+json
parameters:
{{- if gt (len .Values.cosignKeys) 0 }}
{{- if or (gt (len .Values.cosignKeys) 0) (and .Values.azurekeyvault.enabled (gt (len .Values.azurekeyvault.keys) 0)) }}
trustPolicies:
- name: default
version: 1.0.0
Expand Down
5 changes: 4 additions & 1 deletion test/bats/azure-test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ SLEEP_TIME=1
assert_success
run kubectl apply -f ./library/default/samples/constraint.yaml
assert_success

# verify that the image can be run with a root cert, root verification cert should have been configured on deployment
run kubectl run demo-leaf --namespace default --image=${TEST_REGISTRY}/notation:leafSigned
assert_success
Expand Down Expand Up @@ -112,6 +112,9 @@ SLEEP_TIME=1
run kubectl apply -f ./library/default/samples/constraint.yaml
assert_success
sleep 5
run kubectl apply -f ./test/bats/tests/config/config_v1beta1_verifier_cosign_akv.yaml
assert_success
sleep 5

run kubectl run cosign-demo --namespace default --image=${TEST_REGISTRY}/cosign:signed-key
assert_success
Expand Down
18 changes: 18 additions & 0 deletions test/bats/tests/config/config_v1beta1_verifier_cosign_akv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: config.ratify.deislabs.io/v1beta1
kind: Verifier
metadata:
name: verifier-cosign
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-weight: "5"
spec:
name: cosign
artifactTypes: application/vnd.dev.cosign.artifact.sig.v1+json
parameters:
trustPolicies:
- name: default
version: 1.0.0
scopes:
- "*"
keys:
- provider: gatekeeper-system/kmprovider-akv
Loading