Skip to content

feat(go): key vendor backends through the encrypt guest (CIP-5311) - #1532

Closed
freshtonic wants to merge 1 commit into
james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azurefrom
james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest
Closed

freshtonic wants to merge 1 commit into
james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azurefrom
james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest

Conversation

@freshtonic

@freshtonic freshtonic commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Layer 8 of the CIP-5203 stack. Implements CIP-5311 (ADR-0014).

  • The encrypt guest links stack-kms-vendor and the four vendor crates. A vendor request is a step of the step loop: the guest pauses with the signed request, and the host performs it, as it does for ZeroKMS. A credential is a step too. The host supplies short-lived credentials only: AWS temporary credentials, or an OAuth or Vault token. There is no RSA in the guest; the GCP service-account login is behind a default feature.
  • Go API: WithKeyVendor, WithKeysetRecords, WithDefaultKeyset, WithRootKeyTTL, ErrNoZeroKMS. The vendor types are AWSKMS, GoogleCloudKMS, AzureKeyVault, VaultTransit and StaticKey. Credential seams are added; no vendor SDK is added to go.mod.
  • A vendor-only client needs no CipherStash credentials.
  • One guest with all backends.
  • Tests: hermetic Go tests with the static key, and with AWS through a fake RoundTripper that checks SigV4 and call counts.

Decisions are in docs/plans/2026-11-05-key-vendor-backends-decisions.md (CIP-5311 section).

@freshtonic
freshtonic added this pull request to stack #1523 November 6, 2026 01:25
@changeset-bot

changeset-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 747d42f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@freshtonic freshtonic changed the title james/cip 5311 go sdk key vendor backends through the encrypt guest feat(go): key vendor backends through the encrypt guest (CIP-5311) Nov 6, 2026
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing (cargo-mutants, --in-diff, stack-auth + stack-encrypt)

No mutants were generated for the changed lines.

@freshtonic
freshtonic force-pushed the james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest branch from f6e5996 to dda3a35 Compare November 6, 2026 02:15
@freshtonic
freshtonic force-pushed the james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azure branch from 59e08f7 to d375388 Compare November 6, 2026 02:15
@freshtonic
freshtonic force-pushed the james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest branch from dda3a35 to fe5023c Compare November 6, 2026 05:10
@freshtonic
freshtonic force-pushed the james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azure branch 2 times, most recently from c6c6614 to d6e2eda Compare November 6, 2026 05:13
@freshtonic
freshtonic force-pushed the james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest branch 2 times, most recently from 40e1527 to cbe721d Compare November 9, 2026 04:16
@freshtonic
freshtonic force-pushed the james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azure branch from d6e2eda to 9ca407d Compare November 9, 2026 04:16
@freshtonic
freshtonic removed this pull request from stack #1523 November 9, 2026 04:17
@freshtonic
freshtonic added this pull request to stack #1579 November 9, 2026 04:17
@freshtonic
freshtonic force-pushed the james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azure branch from 9ca407d to 9d9c90e Compare November 10, 2026 02:37
@freshtonic
freshtonic force-pushed the james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest branch from cbe721d to 76ed2f2 Compare November 10, 2026 02:37
@freshtonic
freshtonic force-pushed the james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azure branch from 9d9c90e to 780fdff Compare November 12, 2026 03:44
@freshtonic
freshtonic force-pushed the james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest branch from 76ed2f2 to 6f35f29 Compare November 12, 2026 03:44
@freshtonic
freshtonic removed this pull request from stack #1579 November 12, 2026 03:45
@freshtonic
freshtonic added this pull request to stack #1623 November 12, 2026 03:47
@freshtonic

Copy link
Copy Markdown
Contributor Author

Scope reduced (2026-11-12). This branch was rebuilt from one final tree by path, and the follow-up PRs #1555 to #1563 were folded in. The plan is docs/plans/2026-11-12-key-vendor-backends-scope-reduction.md; the decision log's "Scope reduction" section records each change. Decisions: no stack-encrypt change, no v2 leaf, and the wrapped data key mode deferred.

In this PR: the guest drops the per-settle and v2 paths and the ForeignBackend status. Folded in: #1560, #1561 and the Go part of #1563. The Go docs state the index key gap. The CLI PR #1533 is not in this stack: it is a separate PR on #1531, because a stack is linear and the Go and CLI work do not depend on each other.

@freshtonic
freshtonic force-pushed the james/cip-5309-azure-key-vault-key-vendor-backend-stack-kms-azure branch from 780fdff to c905ced Compare November 12, 2026 05:24
@freshtonic
freshtonic force-pushed the james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest branch from 6f35f29 to 747d42f Compare November 12, 2026 05:24
@freshtonic
freshtonic removed this pull request from stack #1623 November 12, 2026 05:28
@freshtonic

Copy link
Copy Markdown
Contributor Author

Replaced by #1630, in the new stack #1633. The code is the same, rebased onto the latest next. The ADRs are now ADR-0013 and ADR-0014, and the text about the wrapped data key mode is removed.

@freshtonic freshtonic closed this Nov 12, 2026
@freshtonic
freshtonic deleted the james/cip-5311-go-sdk-key-vendor-backends-through-the-encrypt-guest branch November 12, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant