Repository navigation
feat(cli): read Sigstore sign/verify settings from client context - #2260
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Thanks for this Andras. The precedence model (explicit flag, then env, then context, then default) is clear, and copying opts instead of mutating the package global fixes a real leak between invocations. Keeping the OIDC secret and token out of the config file is the right call.
I have one request and a few smaller suggestions, mostly inline.
Requested change: the new ignore_*, trusted_root_path and tuf_mirror_url settings can now relax dirctl verify from a context or an environment variable. Nothing tells the user when that happens (see the inline comment on resolveOIDCOptions).
CI is green. The Codecov gaps are the command wiring (inline comment on push.go).
Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
ae46668 to
2930d7b
Compare
|
Thanks for the review. I've addressed all the inline comments in the latest push, including |
Adds a per-context
sigstoresection to the dirctl client config, so a context can point keyless signing and OIDC verification at a self-hosted Sigstore stack instead of passing every URL and trust flag on each call.DIRECTORY_CLIENT_SIGSTORE_<KEY>environment variable. Precedence: explicit flag, env, context, built-in default. Flags only win when explicitly passed, since their defaults are the public-good URLs.dirctl sign,push --sign,import --signandverify. Key-based signing skips Sigstore resolution.sign.Signnow takes the resolved*Options.sigstore.oidc_client_idis separate from the context's top-leveloidc_client_idused bydirctl auth login. The OIDC client secret and token stay flag-only.Tested with unit tests for config/env resolution and per-command precedence, and a smoke test of the built binary confirming the Fulcio URL is taken from config, env and flag in turn.
Closes #2256