-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from JasonTheDeveloper/feat/notation
feat(notation): sign artifacts using notation
- Loading branch information
Showing
7 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ bin/ | |
cue/cue.mod/gen/ | ||
cue/go.mod | ||
cue/go.sum | ||
|
||
.notation/podinfo.csr | ||
.notation/podinfo.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Podinfo signed releases | ||
|
||
Podinfo release assets such as the Helm chart and the Flux artifact | ||
are published to GitHub Container Registry and are signed with | ||
[Notation](https://github.com/notaryproject/notation). | ||
|
||
## Generate signing keys | ||
|
||
Generate a new signing key pair: | ||
|
||
```sh | ||
openssl genrsa -out podinfo.key 2048 | ||
openssl req -new -key podinfo.key -out podinfo.csr -config codesign.cnf | ||
openssl x509 -req -days 1826 -in podinfo.csr -signkey podinfo.key -out notation.crt -extensions v3_req -extfile codesign.cnf | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ req ] | ||
default_bits = 2048 | ||
default_keyfile = privatekey.pem | ||
distinguished_name = req_distinguished_name | ||
req_extensions = v3_req | ||
prompt = no | ||
|
||
[ req_distinguished_name ] | ||
C = RO | ||
ST = BU | ||
L = Bucharest | ||
O = Notary | ||
CN = stefanprodan.com | ||
|
||
[ v3_req ] | ||
keyUsage = critical,digitalSignature | ||
extendedKeyUsage = critical,codeSigning | ||
#subjectKeyIdentifier = hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDbDCCAlSgAwIBAgIUP7zhmTw5XTWLcgBGkBEsErMOkz4wDQYJKoZIhvcNAQEL | ||
BQAwWjELMAkGA1UEBhMCUk8xCzAJBgNVBAgMAkJVMRIwEAYDVQQHDAlCdWNoYXJl | ||
c3QxDzANBgNVBAoMBk5vdGFyeTEZMBcGA1UEAwwQc3RlZmFucHJvZGFuLmNvbTAe | ||
Fw0yNDAyMjUxMDAyMzZaFw0yOTAyMjQxMDAyMzZaMFoxCzAJBgNVBAYTAlJPMQsw | ||
CQYDVQQIDAJCVTESMBAGA1UEBwwJQnVjaGFyZXN0MQ8wDQYDVQQKDAZOb3Rhcnkx | ||
GTAXBgNVBAMMEHN0ZWZhbnByb2Rhbi5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB | ||
DwAwggEKAoIBAQDtH4oPi3SyX/DGv6NdjIvmApvD9eeSgsmHdwpAly8T9D2me+fx | ||
Z+wRNJmq4aq/A1anX+Sg28iwHzV+1WKpsHnjYzDAJSEYP2S8A5H1nGRKUoibdijw | ||
C3QBh5C75rjF/tmZVSX/Vgbf3HJJEsF4WUxWabLxoV2QLo7UlEsQd9+bSeKNMncx | ||
1+E6FdbRCrYo90iobvZJ8K/S2zCWq/JTeHfTnmSEDhx6nMJcaSjvMPn3zyauWcQw | ||
dDpkcaGiJ64fEJRT2OFxXv9u+vDmIMKzo/Wjbd+IzFj6YY4VisK88aU7tmDelnk5 | ||
gQB9eu62PFoaVsYJp4VOhblFKvGJpQwbWB9BAgMBAAGjKjAoMA4GA1UdDwEB/wQE | ||
AwIHgDAWBgNVHSUBAf8EDDAKBggrBgEFBQcDAzANBgkqhkiG9w0BAQsFAAOCAQEA | ||
6x+C6hAIbLwMvkNx4K5p7Qe/pLQR0VwQFAw10yr/5KSN+YKFpon6pQ0TebL7qll+ | ||
uBGZvtQhN6v+DlnVqB7lvJKd+89isgirkkews5KwuXg7Gv5UPIugH0dXISZU8DMJ | ||
7J4oKREv5HzdFmfsUfNlQcfyVTjKL6UINXfKGdqNNxXxR9b4a1TY2JcmEhzBTHaq | ||
ZqX6HK784a0dB7aHgeFrFwPCCP4M684Hs7CFbk3jo2Ef4ljnB5AyWpe8pwCLMdRt | ||
UjSjL5xJWVQvRU+STQsPr6SvpokPCG4rLQyjgeYYk4CCj5piSxbSUZFavq8v1y7Y | ||
m91USVqfeUX7ZzjDxPHE2A== | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"default": "stefanprodan.com", | ||
"keys": [ | ||
{ | ||
"name": "stefanprodan.com", | ||
"keyPath": "/home/runner/.config/notation/localkeys/notation.key", | ||
"certPath": "/home/runner/.config/notation/localkeys/notation.crt" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"version": "1.0", | ||
"trustPolicies": [ | ||
{ | ||
"name": "stefanprodan.com", | ||
"registryScopes": [ | ||
"ghcr.io/stefanprodan/podinfo-deploy", | ||
"ghcr.io/stefanprodan/charts/podinfo" | ||
], | ||
"signatureVerification": { | ||
"level" : "strict" | ||
}, | ||
"trustStores": [ "ca:stefanprodan.com" ], | ||
"trustedIdentities": [ | ||
"x509.subject: C=RO, ST=BU, L=Bucharest, O=Notary, CN=stefanprodan.com" | ||
] | ||
} | ||
] | ||
} |