-
Notifications
You must be signed in to change notification settings - Fork 210
feat!(sign): add package sign command #4301
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
Open
brandtkeller
wants to merge
30
commits into
main
Choose a base branch
from
3959_package_sign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 19 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8191fad
feat(sign): add zarf package sign command
brandtkeller 2fbae57
feat(sign): add testing for signing
brandtkeller 9880886
feat(sign): support for cosign sign-blob
brandtkeller 7669a8b
feat(sign): add support for oci to oci signing
brandtkeller 6f5399a
feat(sign): add build signing metadata
brandtkeller e5685fc
feat(schema): generate updated schema
brandtkeller 0fe749e
fix(schema): update to support boolptr
brandtkeller c7c0f63
feat(sign): consolidate sign logic to CLI
brandtkeller 8752f64
feat(sign): layout SignPackage unit testing
brandtkeller 1dc1c11
fix(sign): update testing to support new build data
brandtkeller b832a77
fix(sign): update testing to support windows filepaths
brandtkeller 26d04ab
fix(sign): remove test with variance across OS
brandtkeller 3234fe6
Merge branch 'main' of github.com:zarf-dev/zarf into 3959_package_sign
brandtkeller 6321683
fix(sign): revert verify logic for future PR
brandtkeller de13320
feat(sign): add signed build data and e2e test
brandtkeller cb7c656
Merge branch 'main' of github.com:zarf-dev/zarf into 3959_package_sign
brandtkeller b27c755
feat(sign): package signed getter and more atomic file replacement
brandtkeller c10d1a1
chore(docs): move doccomment
brandtkeller edb3284
Merge branch 'main' of github.com:zarf-dev/zarf into 3959_package_sign
brandtkeller ca9b419
fix(sign): review feedback
brandtkeller 726a201
Merge branch 'main' of github.com:zarf-dev/zarf into 3959_package_sign
brandtkeller 2ba210e
fix(cosign): update options to embed cosign options
brandtkeller c6908d6
fix(unit): update error message
brandtkeller 73022f5
feat(sign): migrate IsSigned to package layout
brandtkeller 2dac1a2
fix(sign): set signed build data by default
brandtkeller 48f1820
Merge branch 'main' into 3959_package_sign
brandtkeller 049b00a
fix(cosign): move cosign utils to internal
brandtkeller 63fa773
fix(sign): rework api options requirements
brandtkeller 04f254e
Merge branch 'main' of github.com:zarf-dev/zarf into 3959_package_sign
brandtkeller dbf8c92
chore(docs): generate docs updates
brandtkeller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,73 @@ | ||
| --- | ||
| title: zarf package sign | ||
| description: Zarf CLI command reference for <code>zarf package sign</code>. | ||
| tableOfContents: false | ||
| --- | ||
|
|
||
| <!-- Page generated by Zarf; DO NOT EDIT --> | ||
|
|
||
| ## zarf package sign | ||
|
|
||
| Signs an existing Zarf package | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Signs an existing Zarf package with a private key. The package can be a local tarball or pulled from an OCI registry. The signature is created by signing the zarf.yaml file and does not modify the package checksums. | ||
|
|
||
| ``` | ||
| zarf package sign PACKAGE_SOURCE [flags] | ||
| ``` | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
|
|
||
| # Sign an unsigned package | ||
| $ zarf package sign zarf-package-demo-amd64-1.0.0.tar.zst --signing-key ./private-key.pem | ||
|
|
||
| # Re-sign with a new key (overwrite existing signature) | ||
| $ zarf package sign zarf-package-demo-amd64-1.0.0.tar.zst --signing-key ./new-key.pem --overwrite | ||
|
|
||
| # Sign a package from an OCI registry and output to local directory | ||
| $ zarf package sign oci://ghcr.io/my-org/my-package:1.0.0 --signing-key ./private-key.pem --output ./signed/ | ||
|
|
||
| # Sign a package and publish directly to OCI registry | ||
| $ zarf package sign zarf-package-demo-amd64-1.0.0.tar.zst --signing-key ./private-key.pem --output oci://ghcr.io/my-org/signed-packages | ||
|
|
||
| # Sign with a cloud KMS key | ||
| $ zarf package sign zarf-package-demo-amd64-1.0.0.tar.zst --signing-key awskms://alias/my-signing-key | ||
|
|
||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help help for sign | ||
| -k, --key string Public key to verify the existing signature before re-signing (optional) | ||
| --oci-concurrency int Number of concurrent layer operations when pulling or pushing images or packages to/from OCI registries. (default 6) | ||
| -o, --output string Output destination for the signed package. Can be a local directory or an OCI registry URL (oci://). Default: same directory as source package for files, current directory for OCI sources | ||
| --overwrite Overwrite an existing signature if the package is already signed | ||
| --retries int Number of retries to perform for Zarf operations like git/image pushes (default 3) | ||
| --signing-key string Private key for signing packages. Accepts either a local file path or a Cosign-supported key provider (awskms://, gcpkms://, azurekms://, hashivault://) | ||
| --signing-key-pass string Password for encrypted private key | ||
| --skip-signature-validation Skip validating the signature of the Zarf package | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| -a, --architecture string Architecture for OCI images and Zarf packages | ||
| --features stringToString [ALPHA] Provide a comma-separated list of feature names to bools to enable or disable. Ex. --features "foo=true,bar=false,baz=true" (default []) | ||
| --insecure-skip-tls-verify Skip checking server's certificate for validity. This flag should only be used if you have a specific reason and accept the reduced security posture. | ||
| --log-format string Select a logging format. Defaults to 'console'. Valid options are: 'console', 'json', 'dev'. (default "console") | ||
| -l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info") | ||
| --no-color Disable terminal color codes in logging and stdout prints. | ||
| --plain-http Force the connections over HTTP instead of HTTPS. This flag should only be used if you have a specific reason and accept the reduced security posture. | ||
| --tmpdir string Specify the temporary directory to use for intermediate files | ||
| --zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache") | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [zarf package](/commands/zarf_package/) - Zarf package commands for creating, deploying, and inspecting packages | ||
|
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.