Skip to content

fix(auth): take the backend names that stash keyset prints - #1559

Draft
freshtonic wants to merge 1 commit into
james/kms-vendor-name-typefrom
james/auth-keyset-vendor-names
Draft

freshtonic wants to merge 1 commit into
james/kms-vendor-name-typefrom
james/auth-keyset-vendor-names

Conversation

@freshtonic

Copy link
Copy Markdown
Contributor

Summary

stash keyset create took the backend as aws but printed it as aws-kms. A value from the output was not a valid input. The error message also wrote out the list of short names again by hand. Now both the short names and the full names work, and each side takes its list and its error text from one table.

Changes

  • @cipherstash/auth (keyset.rs): takes the short name or the full name (KeyVendor::name). The error message comes from the BACKENDS table. native.d.ts rebuilt (only a doc comment changed).
  • stash CLI: --backend takes the full names too, from one map (KEYSET_BACKEND_NAMES). The --backend help text says so.
  • skills/stash-cli/SKILL.md: updated.
  • Changeset: @cipherstash/auth and stash patch.

Behaviour change

  • --backend aws-kms, gcp-kms, azure-key-vault and vault-transit are now accepted. The short names still work, so no command line or skill example breaks.
  • The unknown-backend message adds "The full names aws-kms, gcp-kms, azure-key-vault, vault-transit also work."

Verification

Run on the top branch of this stack (james/kms-vendor-dispatch), on macOS:

  • cargo fmt --all --check and cargo clippy --workspace --all-features --all-targets -- -D warnings: pass.
  • mise x --env test -- cargo nextest run --workspace --all-features: 1401 of 1402 pass. The one failure is stack-encrypt::ui derive_diagnostics (trybuild). It fails on every snapshot because of a local rustc wrapper that changes the paths in the compiler output. This stack does not touch stack-encrypt. CI is the check for it.
  • mise run wasm:guest:test: 80 of 80 pass.
  • All four Go guests rebuilt, then go vet ./... and go test -count=1 ./... in languages/golang: pass.
  • pnpm --filter @cipherstash/auth test: 92 pass. pnpm --filter stash test: 1667 pass.
  • Biome on the changed TypeScript and script files: no errors.
  • cargo check of the workspace and the guest (native and wasm32-wasip1) on each branch of the stack: pass.

Related

Refs #1541. Code-smell follow-up to the key vendor backend stack.

keysetCreate took "aws" as the backend, but its result named the same
backend "aws-kms". A value from the output was not a valid input, and
the error message wrote the list of short names again by hand.

The input now takes both the short name and the full name
(KeyVendor::name). One table holds the short names, and the error
message comes from that table. The short names still work, so no
command line or skill example breaks.

The stash CLI checks --backend before it calls the binding, so it
takes the full names too, from one map of short name to full name.
The --backend help and the stash-cli skill say so.
@changeset-bot

changeset-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 14c97af

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@cipherstash/auth Patch
stash Patch
@cipherstash/stack Patch
@cipherstash/wizard Patch
@cipherstash/ffi-integration-tests Patch
@cipherstash/basic-example Patch
@cipherstash/e2e Patch
@cipherstash/bench Patch
@cipherstash/stack-drizzle Patch
@cipherstash/stack-prisma Patch
@cipherstash/stack-supabase Patch
@cipherstash/test-kit Patch
@cipherstash/prisma-example Patch
@cipherstash/auth-darwin-arm64 Patch
@cipherstash/auth-darwin-x64 Patch
@cipherstash/auth-linux-arm64-gnu Patch
@cipherstash/auth-linux-x64-gnu Patch
@cipherstash/auth-linux-x64-musl Patch
@cipherstash/auth-win32-x64-msvc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another 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 added this pull request to stack #1523 November 6, 2026 11:25

This branch has not been deployed

No deployments
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