Skip to content

feat(stack-kms-vault): HashiCorp Vault Transit key vendor backend (CIP-5310) - #1529

Closed
freshtonic wants to merge 1 commit into
james/cip-5307-aws-kms-key-vendor-backend-stack-kms-awsfrom
james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault
Closed

freshtonic wants to merge 1 commit into
james/cip-5307-aws-kms-key-vendor-backend-stack-kms-awsfrom
james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault

Conversation

@freshtonic

@freshtonic freshtonic commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Layer 5 of the CIP-5203 stack. Implements CIP-5310.

  • New crate stack-kms-vault: a hand-written Transit client (encrypt, decrypt, rewrap).
  • stack_kms_vendor::bound binds the AAD into the wrapped key itself. Vault ignores context on a key that is not derived, and Azure (CIP-5309) needs the same mechanism.
  • Auth: token, AppRole, and Kubernetes (native only).
  • Tests: recorded fixtures, the contract suite, and a vault server -dev CI job.
  • The crate is staged in the stack-kms-vendor release group.

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

@changeset-bot

changeset-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: aeb384d

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

@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

@freshtonic freshtonic changed the title james/cip 5310 hashicorp vault transit key vendor backend stack kms vault feat(stack-kms-vault): HashiCorp Vault Transit key vendor backend (CIP-5310) Nov 6, 2026
@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 added this pull request to stack #1523 November 6, 2026 00:26
@freshtonic
freshtonic force-pushed the james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault branch from 37aebb1 to bfdd74a Compare November 6, 2026 02:15
@freshtonic
freshtonic force-pushed the james/cip-5307-aws-kms-key-vendor-backend-stack-kms-aws branch from 3721ee0 to 8d2579a Compare November 6, 2026 02:15
@freshtonic
freshtonic force-pushed the james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault branch from bfdd74a to 95da1a1 Compare November 6, 2026 05:10
@freshtonic
freshtonic force-pushed the james/cip-5307-aws-kms-key-vendor-backend-stack-kms-aws branch from 8d2579a to 14f5bdd Compare November 6, 2026 05:10
@freshtonic
freshtonic force-pushed the james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault branch from 95da1a1 to 0642192 Compare November 6, 2026 05:13
@freshtonic
freshtonic force-pushed the james/cip-5307-aws-kms-key-vendor-backend-stack-kms-aws branch from 089a740 to ee3980e Compare November 9, 2026 04:16
@freshtonic
freshtonic force-pushed the james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault branch from 0642192 to 3dd5da9 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-5307-aws-kms-key-vendor-backend-stack-kms-aws branch from ee3980e to f9afbdf Compare November 10, 2026 02:37
@freshtonic
freshtonic force-pushed the james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault branch 2 times, most recently from 447acd9 to f9b71cc 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 one-item batch_input wire format stays, and the multi-item batches and VaultConfig::batch_size are gone. The fixtures were recorded again from vault server -dev 1.20.4. The dev-server tests passed locally.

@freshtonic
freshtonic force-pushed the james/cip-5307-aws-kms-key-vendor-backend-stack-kms-aws branch from 677cc5a to f07f74a Compare November 12, 2026 05:24
@freshtonic
freshtonic force-pushed the james/cip-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault branch from f9b71cc to aeb384d 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 #1627, 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-5310-hashicorp-vault-transit-key-vendor-backend-stack-kms-vault 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