Skip to main content
← Back to list
01Issue
FeatureClosedSwamp Club
AssigneesNone

Relationships

#527 hashicorp-vault should read token from env

Opened by whyyvez · 6/1/2026

Currently the vault token needs to be added as plaintext in the vault config. Update so extension loads tries, $VAULT_TOKEN and then ~/.vault-token. Unless there is something I'm not understanding, the config should not allow plaintext tokens.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

6/2/2026, 9:40:23 AM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

webframp commented 6/1/2026, 7:31:26 PM

Hey @whyyvez — are you referring to the @webframp/vault/hashicorp-vault extension? If so, the source is at https://github.com/webframp/swamp-extensions/tree/main/vault/hashicorp-vault

You're right that storing a plaintext token in the vault config is not ideal. The standard pattern for HashiCorp Vault clients is to check VAULT_TOKEN env var first, then fall back to ~/.vault-token (written by vault login). Happy to look at enhancing the extension to support this credential chain if that's the one you're using.

webframp commented 6/2/2026, 4:01:43 AM

Fixed in PR https://github.com/webframp/swamp-extensions/pull/93 — now published as @webframp/hashicorp-vault v2026.06.01.1.

The token config field is now optional. The extension resolves credentials using the standard HashiCorp Vault client chain:

  1. Explicit token in vault config (highest priority)
  2. VAULT_TOKEN environment variable
  3. ~/.vault-token file (written by vault login)

If none are found, it throws a clear error explaining the options. This means you can now create a vault without any token in the config — just have VAULT_TOKEN set or run vault login first:

swamp vault create @webframp/hashicorp-vault my-vault --config address=https://vault.example.com:8200

Pull the latest version with swamp extension pull @webframp/hashicorp-vault.

whyyvez commented 6/2/2026, 2:06:50 PM

Perfect, thank you!

Sign in to post a ripple.