Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublic
Assigneesstack72

Relationships

#1717 access token mint writes to user vault, not serve's _token-secrets control plane in HA mode

Opened by stack72 · 8/19/2026

Description

When swamp serve runs with an S3 datastore in HA mode, token secrets are managed through the S3 control plane in the _token-secrets vault. However, swamp access token mint writes the minted token secret to a user-created vault (e.g. token-vault via local_encryption), not to the _token-secrets control-plane vault that serve validates against.

This means:

  • A token minted via CLI on instance A cannot authenticate on instance B
  • Single-instance mode works because serve and the CLI share the same filesystem .swamp/ directory
  • HA deployments with a shared S3 datastore have a broken token plane

Steps to Reproduce

  1. Start two serve instances in token mode with a shared S3 datastore (ministack)
  2. Mint a token via swamp access token mint test-tok --principal user:admin on instance A's repo
  3. Attempt to connect to instance B using the minted token via WebSocket
  4. Connection is rejected with HTTP 401

Expected Behavior

Tokens minted via the CLI should be written to the _token-secrets control-plane vault (in S3 when an S3 datastore is configured), making them available to all instances in the cluster.

Environment

Found during swamp-uat serve test development. The ignored test is at tests/cli/serve/oauth/cluster_basics_test.ts — "swamp serve cluster shares minted tokens across instances".

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 4 MOREREVIEW

Open

8/19/2026, 12:59:58 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack728/20/2026, 6:39:18 AM

Sign in to post a ripple.