Skip to content

feat(api): vault sessions require member-key proof - #145

Closed
BRAVO68WEB wants to merge 2 commits into
mainfrom
feat/vault-session-cert-proof
Closed

BRAVO68WEB wants to merge 2 commits into
mainfrom
feat/vault-session-cert-proof

Conversation

@BRAVO68WEB

@BRAVO68WEB BRAVO68WEB commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Vault sessions require a member-key signature (this PR). miniKMS counterpart: minikms#11 now removes `CreateSessionManaged` and requires an API client cert when TLS is on.

  • `getVaultSessionToken` signs `IssueSessionChallenge`
  • Compose/Swarm: `MINIKMS_TLS_ENABLED=true`, control-plane CA + server + client PEMs
  • Deploy CLI generates those PEMs under `/opt/envsync/deploy/` if missing

Program / phase

  • N/A

No-piggyback checklist

  • Does not make product A depend on product B via spawn, re-export, or rename-only API
  • Shared code is a library (kernel/domain/ui), not a second entrypoint of another product
  • If this creates or provisions an organization, it matches the channel matrix (§1.1a)
  • Self-host web session never gains a new org-create path
  • New enterprise API/UI modules are registered for the enterprise package path (not only silently inside core forever) — note follow-up phase if interim
  • OSS deploy changes do not call into `deploy-cli` / enterprise deploy sources

Tests

  • Mock / unit (if API)
  • E2E or pack smoke (if behavior/deploy)
  • N/A docs-only

miniKMS session/vault unit tests pass. Deploy render tests pass.

Risk / rollout

Must ship a miniKMS image built from minikms#11 with this API. Old images still accept managed sessions and no mTLS; new miniKMS with TLS+client CA will reject an API that does not present the client cert.

Local: set the `MINIKMS_TLS_*_FILE` paths in `.env` (see `.env.example`) and recreate the miniKMS container.

getVaultSessionToken unwraps the system member key, signs a
server nonce, and calls CreateSessionByCert. Serial-only
CreateSessionManaged is no longer used. Missing durable member
keys fail closed with MEMBER_KEY_UNAVAILABLE.
@b68-pilot b68-pilot Bot added the size/L label Sep 26, 2026
Enable control-plane TLS with a dedicated gRPC CA. Compose and Swarm
mount server and API client certs; the API presents the client cert.
Vault sessions already use cert proof; serial-only mint is gone on
the miniKMS side.
@BRAVO68WEB

Copy link
Copy Markdown
Contributor Author

Superseded by #147 for the v0.23.0 recut (cert-proof sessions + deploy CLI gRPC cert init + compose/e2e mTLS). Closing after #147 merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant