Skip to content

Commit

Permalink
fix: add COSIGN_EXPERIMENTAL=1 for verify-blob
Browse files Browse the repository at this point in the history
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
  • Loading branch information
developer-guy committed Sep 16, 2022
1 parent f43839b commit 8ae1b01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
17 changes: 6 additions & 11 deletions cmd/cosign/cli/verify.go
Expand Up @@ -218,28 +218,23 @@ You may specify either a key, a certificate or a kms reference to verify against
The signature may be specified as a path to a file or a base64 encoded string.
The blob may be specified as a path to a file or - for stdin.`,
Example: ` cosign verify-blob (--key <key path>|<key url>|<kms uri>)|(--cert <cert>) --signature <sig> <blob>
Example: ` cosign verify-blob (--key <key path>|<key url>|<kms uri>)|(--certificate <cert>) --signature <sig> <blob>
# Verify a simple blob and message
cosign verify-blob --key cosign.pub --signature sig msg
# Verify a simple blob with remote signature URL, both http and https schemes are supported
cosign verify-blob --key cosign.pub --signature http://host/my.sig
cosign verify-blob --key cosign.pub (--signature <sig path>|<sig url> msg)
# Verify a signature from an environment variable
cosign verify-blob --key cosign.pub --signature $sig msg
# verify a signature with public key provided by URL
cosign verify-blob --key https://host.for/<FILE> --signature $sig msg
cosign verify-blob --key https://host.for/<FILE> --signature $sig msg COSIGN_EXPERIMENTAL=1 cosign verify-blob --key https://host.for/<FILE> --signature $sig msg
# Verify a signature against a payload from another process using process redirection
cosign verify-blob --key cosign.pub --signature $sig <(git rev-parse HEAD)
# Verify a signature against Azure Key Vault
cosign verify-blob --key azurekms://[VAULT_NAME][VAULT_URI]/[KEY] --signature $sig <blob>
cosign verify-blob --key azurekms://[VAULT_NAME][VAULT_URI]/[KEY] --signature $sig <blob>
# Verify a signature against AWS KMS
cosign verify-blob --key awskms://[ENDPOINT]/[ID/ALIAS/ARN] --signature $sig <blob>
Ccosign verify-blob --key awskms://[ENDPOINT]/[ID/ALIAS/ARN] --signature $sig <blob>
# Verify a signature against Google Cloud KMS
cosign verify-blob --key gcpkms://projects/[PROJECT ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY] --signature $sig <blob>
Expand All @@ -254,7 +249,7 @@ The blob may be specified as a path to a file or - for stdin.`,
cosign verify-blob --key gitlab://[PROJECT_ID] --signature $sig <blob>
# Verify a signature against a certificate
cosign verify-blob --cert <cert> --signature $sig <blob>
COSIGN_EXPERIMENTAL=1 cosign verify-blob --certificate <cert> --signature $sig <blob>
`,

Args: cobra.ExactArgs(1),
Expand Down
17 changes: 6 additions & 11 deletions doc/cosign_verify-blob.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ae1b01

Please sign in to comment.