-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add --ca-roots and --ca-intermediates flags to 'cosign verify' (#3464)
* add --certificate-bundle flag to 'cosign verify' Related to issue #3462. Current commit adds the flag to verify the CLI options. The new flag doesn't have any effect yet (will add in follow-up PRs). Signed-off-by: Dmitry S <[email protected]> * Add --ca-roots flag for 'cosign verify' Add --ca-roots command-line flag for 'cosign verify' to enable verifying cosign signatures using PEM bundles of CA roots. Whether to also add --ca-intermediates flag is TBD. Unit tests will be added in the next commit(s). Fixes #3462. Signed-off-by: Dmitry S <[email protected]> * add functional tests for --ca-roots flag Signed-off-by: Dmitry S <[email protected]> * setup-crane action for e2e_test_pkcs11.sh Signed-off-by: Dmitry S <[email protected]> * rebase on trunk Signed-off-by: Dmitry Savintsev <[email protected]> * transform gencert subpackage to helper function Signed-off-by: Dmitry S <[email protected]> * use the trunk version of workflows/e2e-tests.yml Signed-off-by: Dmitry S <[email protected]> * correct certificate generation for e2e tests Signed-off-by: Dmitry S <[email protected]> * refactor test cert/keys generation and corresponding test Signed-off-by: Dmitry S <[email protected]> * add license header Signed-off-by: Dmitry S <[email protected]> * remove test shell scripts Signed-off-by: Dmitry S <[email protected]> * remove unused certFile param to verifyCertBundle Signed-off-by: Dmitry S <[email protected]> * remove duplicate test functions Signed-off-by: Dmitry S <[email protected]> --------- Signed-off-by: Dmitry S <[email protected]> Signed-off-by: Dmitry Savintsev <[email protected]>
- Loading branch information
Showing
12 changed files
with
847 additions
and
14 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 |
---|---|---|
|
@@ -62,6 +62,10 @@ against the transparency log.`, | |
# verify image with local certificate and certificate chain | ||
cosign verify --cert cosign.crt --cert-chain chain.crt <IMAGE> | ||
# verify image with local certificate and certificate bundles of CA roots | ||
# and (optionally) CA intermediates | ||
cosign verify --cert cosign.crt --ca-roots ca-roots.pem --ca-intermediates ca-intermediates.pem <IMAGE> | ||
# verify image using keyless verification with the given certificate | ||
# chain and identity parameters, without Fulcio roots (for BYO PKI): | ||
cosign verify --cert-chain chain.crt --certificate-oidc-issuer https://issuer.example.com --certificate-identity [email protected] <IMAGE> | ||
|
@@ -115,6 +119,8 @@ against the transparency log.`, | |
CertGithubWorkflowName: o.CertVerify.CertGithubWorkflowName, | ||
CertGithubWorkflowRepository: o.CertVerify.CertGithubWorkflowRepository, | ||
CertGithubWorkflowRef: o.CertVerify.CertGithubWorkflowRef, | ||
CAIntermediates: o.CertVerify.CAIntermediates, | ||
CARoots: o.CertVerify.CARoots, | ||
CertChain: o.CertVerify.CertChain, | ||
IgnoreSCT: o.CertVerify.IgnoreSCT, | ||
SCTRef: o.CertVerify.SCT, | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.