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: bump-up tsa + e2e (CLI + K8S) #1685

Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7de1d62
chore: bump-up tsa + e2e 1
junczhu Aug 5, 2024
67af336
chore: bump-up tsa + e2e 2
junczhu Aug 5, 2024
00cc24c
chore: bump-up tsa + e2e 3
junczhu Aug 5, 2024
01a4c61
chore: bump-up tsa + e2e 4
junczhu Aug 5, 2024
76a707c
chore: bump-up tsa + e2e 5
junczhu Aug 5, 2024
aac85d3
chore: bump-up tsa + e2e 6
junczhu Aug 5, 2024
5f83210
chore: bump-up tsa + e2e 7
junczhu Aug 5, 2024
a4cd99a
chore: bump-up tsa + e2e 8
junczhu Aug 5, 2024
5a87124
chore: bump-up tsa + e2e 9
junczhu Aug 5, 2024
4882074
chore: bump-up tsa + e2e 10
junczhu Aug 5, 2024
e7dc8f3
chore: bump-up tsa + e2e 11
junczhu Aug 5, 2024
b50f1de
chore: bump-up tsa + e2e 12
junczhu Aug 5, 2024
f565978
chore: bump-up tsa + e2e 13
junczhu Aug 5, 2024
736044b
chore: bump-up tsa + e2e 14
junczhu Aug 5, 2024
27b1f70
chore: bump-up tsa + e2e 15
junczhu Aug 6, 2024
a92f414
chore: bump-up tsa + e2e 16
junczhu Aug 6, 2024
9f11a9b
chore: bump-up tsa + e2e 17
junczhu Aug 6, 2024
5bdfa21
chore: bump-up tsa + e2e 18
junczhu Aug 6, 2024
e8436c1
chore: bump-up tsa + e2e 19
junczhu Aug 6, 2024
a1f9c07
chore: bump-up tsa + e2e 20
junczhu Aug 15, 2024
a03029e
chore: resolve conflict
junczhu Aug 2, 2024
a86b1e1
test: resolve comments
junczhu Aug 22, 2024
909d7d0
chore: bump-up notation rc.1
junczhu Aug 22, 2024
15a91d8
chore: add comment for tsa cli case in e2e test
junczhu Aug 22, 2024
37df4aa
feat: disable remix cert type in certstore
junczhu Aug 22, 2024
1acdbfb
chore: fix conflict
junczhu Aug 22, 2024
600beb0
chore: fix dependency
junczhu Aug 23, 2024
7172dd4
test: fix cli e2e
junczhu Aug 23, 2024
c755ba4
test: fix cli e2e
junczhu Aug 23, 2024
91fd63d
test: fix e2e test
junczhu Aug 23, 2024
f635f8a
test: fix e2e test 2
junczhu Aug 23, 2024
81a7017
test: fix e2e test 3
junczhu Aug 23, 2024
5db8eb5
test: fix e2e test 4
junczhu Aug 24, 2024
11de2c0
test: fix e2e test 5
junczhu Aug 25, 2024
fee6b7d
test: fix e2e test 6
junczhu Aug 25, 2024
cbc8f34
test: add k8s e2e scenarios 2
junczhu Aug 25, 2024
6910905
test: add k8s e2e scenarios 3
junczhu Aug 26, 2024
adf1ec3
test: add k8s e2e scenarios 4
junczhu Aug 26, 2024
395ad2a
test: add k8s e2e scenarios 5
junczhu Aug 26, 2024
73770ea
test: add k8s e2e scenarios 6
junczhu Aug 26, 2024
2602fcb
test: add k8s e2e scenarios 7
junczhu Aug 26, 2024
409870b
test: add k8s e2e scenarios 8
junczhu Aug 26, 2024
83aa067
test: add k8s e2e scenarios 9
junczhu Aug 26, 2024
fadb65b
test: add k8s e2e scenarios 10
junczhu Aug 26, 2024
abcf1f3
test: add k8s e2e scenarios 11
junczhu Aug 26, 2024
3c39057
chore: update test and comments
junczhu Aug 26, 2024
0498038
chore: update test and comments 2
junczhu Aug 26, 2024
7457cf6
docs: add related refactor issue link
junczhu Aug 27, 2024
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 .github/licenserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ header:
limitations under the License.

paths-ignore:
- "**/*.{md,svg,yaml,crt,json,pub,yml,pb.go,proto}"
- "**/*.{md,svg,yaml,crt,cer,json,pub,yml,pb.go,proto}"
- "CODEOWNERS"
- "PROJECT"
- "NOTICE"
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ KIND_KUBERNETES_VERSION ?= 1.29.2
GATEKEEPER_VERSION ?= 3.16.0
DAPR_VERSION ?= 1.12.5
COSIGN_VERSION ?= 2.2.3
NOTATION_VERSION ?= 1.1.0
NOTATION_VERSION ?= 1.2.0-rc.1
ORAS_VERSION ?= 1.1.0

HELM_VERSION ?= 3.14.2
Expand All @@ -56,6 +56,8 @@ TRIVY_VERSION ?= 0.49.1
GATEKEEPER_NAMESPACE = gatekeeper-system
RATIFY_NAME = ratify

TIMESTAMP_URL = http://timestamp.digicert.com

# Local Registry Setup
LOCAL_REGISTRY_IMAGE ?= ghcr.io/project-zot/zot-linux-amd64:v2.0.2
TEST_REGISTRY = localhost:5000
Expand Down Expand Up @@ -98,6 +100,7 @@ install:
ratify-config:
cp ./test/bats/tests/config/* ${INSTALL_DIR}
cp ./test/bats/tests/certificates/wabbit-networks.io.crt ${INSTALL_DIR}/ratify-certs/notation/wabbit-networks.io.crt
cp ./test/bats/tests/certificates/tsarootca.cer ${INSTALL_DIR}/ratify-certs/notation/tsarootca.cer
cp ./test/bats/tests/certificates/cosign.pub ${INSTALL_DIR}/ratify-certs/cosign/cosign.pub
cp -r ./test/bats/tests/schemas/ ${INSTALL_DIR}

Expand Down Expand Up @@ -295,10 +298,16 @@ e2e-notation-setup:
${GITHUB_WORKSPACE}/bin/oras cp --from-oci-layout .staging/notation/notation.tar:v0 ${TEST_REGISTRY}/notation:unsigned
rm .staging/notation/notation.tar

printf 'FROM ${ALPINE_IMAGE}\nCMD ["echo", "notation tsa signed image"]' > .staging/notation/Dockerfile
docker buildx create --use
docker buildx build --output type=oci,dest=.staging/notation/notation.tar -t notation:v0 .staging/notation
${GITHUB_WORKSPACE}/bin/oras cp --from-oci-layout .staging/notation/notation.tar:v0 ${TEST_REGISTRY}/notation:tsa
rm .staging/notation/notation.tar

rm -rf ~/.config/notation
.staging/notation/notation cert generate-test --default "ratify-bats-test"

NOTATION_EXPERIMENTAL=1 .staging/notation/notation sign --allow-referrers-api -u ${TEST_REGISTRY_USERNAME} -p ${TEST_REGISTRY_PASSWORD} ${TEST_REGISTRY}/notation@`${GITHUB_WORKSPACE}/bin/oras manifest fetch ${TEST_REGISTRY}/notation:signed --descriptor | jq .digest | xargs`
NOTATION_EXPERIMENTAL=1 .staging/notation/notation sign --timestamp-url ${TIMESTAMP_URL} --timestamp-root-cert ./test/bats/tests/certificates/tsarootca.cer --allow-referrers-api -u ${TEST_REGISTRY_USERNAME} -p ${TEST_REGISTRY_PASSWORD} ${TEST_REGISTRY}/notation@`${GITHUB_WORKSPACE}/bin/oras manifest fetch ${TEST_REGISTRY}/notation:tsa --descriptor | jq .digest | xargs`
NOTATION_EXPERIMENTAL=1 .staging/notation/notation sign --allow-referrers-api -u ${TEST_REGISTRY_USERNAME} -p ${TEST_REGISTRY_PASSWORD} ${TEST_REGISTRY}/all@`${GITHUB_WORKSPACE}/bin/oras manifest fetch ${TEST_REGISTRY}/all:v0 --descriptor | jq .digest | xargs`

e2e-notation-leaf-cert-setup:
Expand Down
12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ require (
github.com/golang/protobuf v1.5.4
github.com/google/go-containerregistry v0.20.2
github.com/gorilla/mux v1.8.1
github.com/notaryproject/notation-core-go v1.0.3
github.com/notaryproject/notation-go v1.0.1
github.com/notaryproject/notation-core-go v1.1.0-rc.1
github.com/notaryproject/notation-go v1.2.0-rc.1
github.com/notaryproject/notation-plugin-framework-go v1.0.0
github.com/open-policy-agent/cert-controller v0.8.0
github.com/open-policy-agent/frameworks/constraint v0.0.0-20230411224310-3f237e2710fa
github.com/open-policy-agent/opa v0.63.0
Expand Down Expand Up @@ -97,7 +98,7 @@ require (
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
github.com/go-ldap/ldap/v3 v3.4.6 // indirect
github.com/go-ldap/ldap/v3 v3.4.8 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
Expand All @@ -107,6 +108,7 @@ require (
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mozillazg/docker-credential-acr-helper v0.3.0 // indirect
github.com/notaryproject/tspclient-go v0.2.0 // indirect
github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
Expand Down Expand Up @@ -153,7 +155,7 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/docker-credential-helpers v0.8.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fxamacker/cbor/v2 v2.6.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-logr/logr v1.4.2
github.com/go-logr/stdr v1.2.2 // indirect
Expand Down Expand Up @@ -233,7 +235,7 @@ require (
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.25.0
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sys v0.22.0 // indirect
Expand Down
Loading
Loading