Skip to content

Commit

Permalink
test: replace self-hosted certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
Starkteetje committed Nov 22, 2024
1 parent 022c2f4 commit 0f68629
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 140 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-notary/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
shell: bash
- name: Trust root cert of notary instance
run: |
sudo cp ./test/integration/self-hosted-notary/notary-service-container/server/ca.crt /usr/local/share/ca-certificates/notary_root_ca.crt
sudo cp ./test/integration/self-hosted-notary/notary-service-container/server/notary.crt /usr/local/share/ca-certificates/notary_root_ca.crt
sudo update-ca-certificates
shell: bash
- name: Append notary ip to /etc/hosts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COPY notary-service-container/ test/integration/self-hosted-notary/notary-servic
RUN apt update &&\
apt upgrade -y && \
apt install -y docker notary expect ca-certificates && \
cp ./test/integration/self-hosted-notary/notary-service-container/server/ca.crt /usr/local/share/ca-certificates/notary_root_ca.crt && \
cp ./test/integration/self-hosted-notary/notary-service-container/server/notary.crt /usr/local/share/ca-certificates/notary_root_ca.crt && \
update-ca-certificates

ARG DIGEST
Expand Down
33 changes: 15 additions & 18 deletions test/integration/self-hosted-notary/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,24 @@ application:
- name: default
key: self_hosted_notary_root_key.pub
# CA cert signing the cert of the self-hosted notary
# (test/integration/notary_service_container/certs/root/ca.crt)
# (test/integration/notary_service_container/server/notary.crt)
cert: |
-----BEGIN CERTIFICATE-----
MIIDEzCCAfugAwIBAgIUDDvwp5mG7ckbcvJ0jg9he/rSGzAwDQYJKoZIhvcNAQEL
BQAwGTEXMBUGA1UEAwwOTm90YXJ5IFJvb3QgQ0EwHhcNMjMxMTIyMjIwOTM5WhcN
MjQxMTIxMjIwOTM5WjAZMRcwFQYDVQQDDA5Ob3RhcnkgUm9vdCBDQTC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XIwdjAQBgcqhkjOPQIB
BgUrgQQAIgNiAAT0Nn7WJQUykFnPT12RtldK9ruKhd75uttXV6JwVfV0AtHnPHx/
KH7VzA/nyoXCPGvod5RCX6Idb0LcFq7+/gFlM4tFscmCS53VAuhs1/NhLnEE+sAn
bPqDw1BuReMghAejgZ8wgZwwHQYDVR0OBBYEFH5CMJZfe2/ETr2PWIHB76vYshys
MB8GA1UdIwQYMBaAFH5CMJZfe2/ETr2PWIHB76vYshysMA8GA1UdEwEB/wQFMAMB
Af8wSQYDVR0RBEIwQIINbm90YXJ5LnNlcnZlcoIPKi5ub3Rhcnkuc2VydmVygg1u
b3Rhcnkuc2lnbmVygg8qLm5vdGFyeS5zaWduZXIwCgYIKoZIzj0EAwIDaAAwZQIx
ALoqIiOjUxbrmHMcJY4awMbVrbu2AXmfcrcbaRuKAHHe1v92Xlc8vo1Bvo5BwOzb
cwIwQbAe7FfQKykKWCN6Vs4GfzQVWtQjN0WoMW5L4KgDREjseuU2bRMojWViuBih
vvNj
-----END CERTIFICATE-----
policy:
- pattern: "*:*"
validator: dockerhub-basics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"remote_server": {
"url": "https://notary.server:4443",
"root_ca": "./server/ca.crt"
"root_ca": "./server/notary.crt"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"server": {
"http_addr": ":4443",
"tls_key_file": "./notary-server.key",
"tls_cert_file": "./notary-server.crt"
"tls_key_file": "./notary.key",
"tls_cert_file": "./notary.crt"
},
"trust_service": {
"type": "remote",
"hostname": "notary.signer",
"port": "7899",
"tls_ca_file": "./ca.crt",
"tls_ca_file": "./notary.crt",
"key_algorithm": "ecdsa",
"tls_client_cert": "./notary-server.crt",
"tls_client_key": "./notary-server.key"
"tls_client_cert": "./notary.crt",
"tls_client_key": "./notary.key"
},
"storage": {
"backend": "memory"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICDzCCAZWgAwIBAgIUK6opKzStr7qjcHx40VGw4bprm/IwCgYIKoZIzj0EAwIw
GDEWMBQGA1UEAwwNbm90YXJ5LnNlcnZlcjAeFw0yNDExMjIwOTIwMDNaFw0zNDEx
MjAwOTIwMDNaMBgxFjAUBgNVBAMMDW5vdGFyeS5zZXJ2ZXIwdjAQBgcqhkjOPQIB
BgUrgQQAIgNiAAT0Nn7WJQUykFnPT12RtldK9ruKhd75uttXV6JwVfV0AtHnPHx/
KH7VzA/nyoXCPGvod5RCX6Idb0LcFq7+/gFlM4tFscmCS53VAuhs1/NhLnEE+sAn
bPqDw1BuReMghAejgZ8wgZwwHQYDVR0OBBYEFH5CMJZfe2/ETr2PWIHB76vYshys
MB8GA1UdIwQYMBaAFH5CMJZfe2/ETr2PWIHB76vYshysMA8GA1UdEwEB/wQFMAMB
Af8wSQYDVR0RBEIwQIINbm90YXJ5LnNlcnZlcoIPKi5ub3Rhcnkuc2VydmVygg1u
b3Rhcnkuc2lnbmVygg8qLm5vdGFyeS5zaWduZXIwCgYIKoZIzj0EAwIDaAAwZQIx
ALoqIiOjUxbrmHMcJY4awMbVrbu2AXmfcrcbaRuKAHHe1v92Xlc8vo1Bvo5BwOzb
cwIwQbAe7FfQKykKWCN6Vs4GfzQVWtQjN0WoMW5L4KgDREjseuU2bRMojWViuBih
vvNj
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDBiy79dS7NewsD9G+dB
mJDEWIhpqa9mjxeMBfdaD8kPJJ9qk6Go5CDFoXlCKdaL7J2hZANiAAT0Nn7WJQUy
kFnPT12RtldK9ruKhd75uttXV6JwVfV0AtHnPHx/KH7VzA/nyoXCPGvod5RCX6Id
b0LcFq7+/gFlM4tFscmCS53VAuhs1/NhLnEE+sAnbPqDw1BuReMghAc=
-----END PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"server": {
"grpc_addr": ":7899",
"tls_cert_file": "./notary-signer.crt",
"tls_key_file": "./notary-signer.key",
"client_ca_file": "./ca.crt"
"tls_cert_file": "./notary.crt",
"tls_key_file": "./notary.key",
"client_ca_file": "./notary.crt"
},
"storage": {
"backend": "memory"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICDzCCAZWgAwIBAgIUK6opKzStr7qjcHx40VGw4bprm/IwCgYIKoZIzj0EAwIw
GDEWMBQGA1UEAwwNbm90YXJ5LnNlcnZlcjAeFw0yNDExMjIwOTIwMDNaFw0zNDEx
MjAwOTIwMDNaMBgxFjAUBgNVBAMMDW5vdGFyeS5zZXJ2ZXIwdjAQBgcqhkjOPQIB
BgUrgQQAIgNiAAT0Nn7WJQUykFnPT12RtldK9ruKhd75uttXV6JwVfV0AtHnPHx/
KH7VzA/nyoXCPGvod5RCX6Idb0LcFq7+/gFlM4tFscmCS53VAuhs1/NhLnEE+sAn
bPqDw1BuReMghAejgZ8wgZwwHQYDVR0OBBYEFH5CMJZfe2/ETr2PWIHB76vYshys
MB8GA1UdIwQYMBaAFH5CMJZfe2/ETr2PWIHB76vYshysMA8GA1UdEwEB/wQFMAMB
Af8wSQYDVR0RBEIwQIINbm90YXJ5LnNlcnZlcoIPKi5ub3Rhcnkuc2VydmVygg1u
b3Rhcnkuc2lnbmVygg8qLm5vdGFyeS5zaWduZXIwCgYIKoZIzj0EAwIDaAAwZQIx
ALoqIiOjUxbrmHMcJY4awMbVrbu2AXmfcrcbaRuKAHHe1v92Xlc8vo1Bvo5BwOzb
cwIwQbAe7FfQKykKWCN6Vs4GfzQVWtQjN0WoMW5L4KgDREjseuU2bRMojWViuBih
vvNj
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDBiy79dS7NewsD9G+dB
mJDEWIhpqa9mjxeMBfdaD8kPJJ9qk6Go5CDFoXlCKdaL7J2hZANiAAT0Nn7WJQUy
kFnPT12RtldK9ruKhd75uttXV6JwVfV0AtHnPHx/KH7VzA/nyoXCPGvod5RCX6Id
b0LcFq7+/gFlM4tFscmCS53VAuhs1/NhLnEE+sAnbPqDw1BuReMghAc=
-----END PRIVATE KEY-----

0 comments on commit 0f68629

Please sign in to comment.