Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit b3bf7db

Browse files
committed
test: remove force flag from cosign sign cmd
Signed-off-by: Hector Fernandez <hector@chainguard.dev>
1 parent f1f9e6a commit b3bf7db

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

pkg/apis/config/sigstore_keys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ type CertificateAuthority struct {
9292
// SigstoreKeys.
9393
type SigstoreKeys struct {
9494
// Trusted certificate authorities (e.g Fulcio).
95-
CertificateAuthorities []CertificateAuthority `json:"certificateAuthorities"`
95+
CertificateAuthorities []CertificateAuthority `json:"certificateAuthorities,omitempty"`
9696
// Rekor log specifications
9797
TLogs []TransparencyLogInstance `json:"tLogs,omitempty"`
9898
// Certificate Transparency Log

test/e2e_test_cluster_image_policy_with_tsa.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ echo '::endgroup::'
123123
# Sign it with key
124124
echo '::group:: Sign demoimage with key, and add to rekor'
125125
export TSA_URL=`kubectl -n tsa-system get ksvc tsa -ojsonpath='{.status.url}'`
126-
COSIGN_EXPERIMENTAL=1 COSIGN_PASSWORD="" cosign sign --key cosign.key --force --allow-insecure-registry --rekor-url ${REKOR_URL} --timestamp-server-url ${TSA_URL} ${demoimage}
126+
COSIGN_EXPERIMENTAL=1 COSIGN_PASSWORD="" cosign sign --key cosign.key --allow-insecure-registry --rekor-url ${REKOR_URL} --timestamp-server-url ${TSA_URL} ${demoimage}
127127
echo '::endgroup::'
128128

129129
echo '::group:: Verify demoimage with cosign key'
130-
export TSA_CERT_CHAIN=`kubectl -n tsa-system get secrets tsa-cert-chain -ojsonpath='{.data.cert}'`
131-
cat $TSA_CERT_CHAIN | base64 -w0 >> tsa-cert-chain.pem
130+
export TSA_CERT_CHAIN=`kubectl -n tsa-system get secrets tsa-cert-chain -ojsonpath='{.data.cert-chain}'`
131+
echo "$TSA_CERT_CHAIN" | base64 -d > tsa-cert-chain.pem
132132
COSIGN_EXPERIMENTAL=1 cosign verify --key cosign.pub --timestamp-cert-chain tsa-cert-chain.pem --insecure-skip-tlog-verify --rekor-url ${REKOR_URL} --allow-insecure-registry ${demoimage}
133133
echo '::endgroup::'
134134

test/testdata/trustroot/e2e/with-tsa.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ metadata:
1818
name: my-sigstore-keys
1919
spec:
2020
sigstoreKeys:
21+
certificateAuthorities: []
2122
timestampAuthorities:
2223
- subject:
2324
organization: tsa-organization

0 commit comments

Comments
 (0)