Skip to content

fix(cli): register cloud KMS providers - #1892

Merged
paralta merged 4 commits into
agntcy:mainfrom
Baltsat:fix/1882-cloud-kms-providers
Jul 28, 2026
Merged

paralta merged 4 commits into
agntcy:mainfrom
Baltsat:fix/1882-cloud-kms-providers

Conversation

@Baltsat

@Baltsat Baltsat commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • register Sigstore’s AWS, Azure, GCP, and HashiCorp Vault KMS providers for dirctl sign
  • add credential-free regression coverage for all four supported KMS prefixes
  • keep the provider dependency graph inside the CLI module rather than the shared client library
  • keep the repository tests module tidy with its local CLI replacement

Root cause

SignerVerifierFromKeyRef accepts KMS references, but Sigstore providers register through package init functions. The dirctl sign process did not import those provider packages, so the provider registry was empty and KMS URIs failed as unrecognized schemes.

Validation

Using Go 1.26.5 on Linux ARM64:

  • exact regression fails on the unpatched current main with all four providers absent
  • go -C cli test ./cmd/sign -run "^TestKMSProvidersRegistered$" -count=1
  • go -C cli test ./... -count=1
  • go -C cli vet ./...
  • go -C cli build ./...
  • golangci-lint 2.11.3 against the CLI module: 0 issues
  • go -C cli mod tidy -diff
  • go -C tests mod tidy -diff
  • go -C tests list -deps ./...
  • golangci-lint 2.11.3 across the tests module: 0 issues
  • production-file revert makes the regression fail; restoring it makes the test pass
  • git diff --check

The test verifies registration without cloud credentials or network calls. Live signing still depends on each provider’s credentials and service availability.

Implementation and validation used Codex assistance. I reviewed the final diff, dependency placement, and test results.

Fixes #1882

@Baltsat
Baltsat requested a review from a team as a code owner July 25, 2026 12:01
Copilot AI review requested due to automatic review settings July 25, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Jul 25, 2026
@ramizpolic
ramizpolic requested review from paralta and tkircsi July 27, 2026 16:51
Register the Sigstore AWS, Azure, GCP, and HashiCorp Vault providers in the dirctl sign command package so shared client consumers do not inherit their dependency graph.

Signed-off-by: Konstantin Baltsat <[email protected]>
@Baltsat
Baltsat force-pushed the fix/1882-cloud-kms-providers branch from 4d9c074 to dfa54ee Compare July 28, 2026 11:09
@Baltsat Baltsat changed the title fix(cosign): register cloud KMS providers fix(cli): register cloud KMS providers Jul 28, 2026
@akijakya
akijakya requested a review from Copilot July 28, 2026 11:14
Record the indirect cloud KMS dependencies required by the local CLI replacement so repository-wide lint and license dependency discovery can load the tests module.

Signed-off-by: Konstantin Baltsat <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Signed-off-by: Konstantin Baltsat <[email protected]>
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tkircsi

tkircsi commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@Baltsat Thanks for your contributing! Could you also update the related documentation in the docs/content/dir? Thanks a lot!

Signed-off-by: Konstantin Baltsat <[email protected]>
@Baltsat

Baltsat commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — I added the related KMS signing documentation in 381f0ff:

  • CLI reference with supported KMS URI formats and a Google Cloud KMS example
  • trust-model coverage for KMS-backed keys
  • a usage-guide walkthrough for AWS KMS, Google Cloud KMS, Azure Key Vault, and HashiCorp Vault

Local documentation validation passed: MkDocs build, codespell, pymarkdown, and git diff --check.

@paralta
paralta merged commit 2cba404 into agntcy:main Jul 28, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-49 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: dirctl sign — support cloud KMS key providers (awskms/gcpkms/azurekms)

5 participants