Skip to content

Commit

Permalink
Test two CIP with one authority unsigned
Browse files Browse the repository at this point in the history
Signed-off-by: Denny Hoang <[email protected]>
  • Loading branch information
DennyHoang committed Apr 7, 2022
1 parent 3b6c409 commit 9b907b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/kind-cluster-image-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ jobs:
yq '. | .spec.authorities[0].key.data |= load_str("cosign.pub")' ./test/testdata/cosigned/e2e/cip-key.yaml | \
kubectl apply -f -
- name: Sign demoimage with cosign-test key
- name: Verify with two CIP, one not signed with public key
run: |
if kubectl create -n demo-key-signing job demo --image=${{ env.demoimage }}; then
echo Failed to block unsigned Job creation!
exit 1
fi
- name: Sign demoimage with cosign key
run: |
./cosign sign --key cosign.key --force --allow-insecure-registry ${{ env.demoimage }}
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/cosigned/e2e/cip-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
apiVersion: cosigned.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: image-policy
name: image-policy-key
spec:
images:
- glob: registry.local:5000/cosigned/demo*
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/cosigned/e2e/cip-keyless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
apiVersion: cosigned.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: image-policy
name: image-policy-keyless
spec:
images:
- glob: registry.local:5000/cosigned/demo*
Expand Down

0 comments on commit 9b907b0

Please sign in to comment.