Skip to content

[Bug]: VAULT_TOKEN and TLS environment variables missing from config.json (cannot be set via docker plugin set) #60

@imran-techvoyager

Description

@imran-techvoyager

🐛 Bug Description

Several environment variables used by the Vault and OpenBao providers are read
in the Go code but are not declared in config.json. Since Docker plugins only
accept variables explicitly declared there, these cannot be set via
docker plugin set, making token auth and TLS impossible to configure through
the normal plugin interface.

Affected variables (read in code but absent from config.json):

  • VAULT_TOKEN (vault.go:37)
  • VAULT_CACERT (vault.go:42)
  • VAULT_CLIENT_CERT (vault.go:43)
  • VAULT_CLIENT_KEY (vault.go:44)
  • OPENBAO_CACERT (openbao.go:42)
  • OPENBAO_CLIENT_CERT (openbao.go:43)
  • OPENBAO_CLIENT_KEY (openbao.go:44)

Similar in nature to #26, where MONITORING_PORT and ENABLE_MONITORING were
missing from config.json.


🔁 Steps to Reproduce

  1. Install and configure the plugin with SECRETS_PROVIDER=vault
  2. Run: docker plugin set YOUR_PLUGIN_NAME VAULT_TOKEN=mytoken
  3. Enable the plugin: docker plugin enable YOUR_PLUGIN_NAME
  4. Attempt to retrieve a secret from Vault using token authentication

✅ Expected Behavior

The VAULT_TOKEN value is passed into the plugin runtime and used by the Vault
provider to authenticate.


❌ Actual Behavior

Docker silently ignores the VAULT_TOKEN value because it is not declared in
config.json. The Vault provider receives an empty token and authentication fails.


🧪 Reproducibility

  • Always
  • Sometimes
  • Rarely
  • Unable to reproduce

📸 Screenshots / Logs

Logs
# providers/vault.go:37 reads VAULT_TOKEN:
Token: getConfigOrDefault(config, "VAULT_TOKEN", "hvs.xxx")

# config.json env array — VAULT_TOKEN is absent.
# Only VAULT_ADDR, VAULT_AUTH_METHOD, VAULT_ROLE_ID,
# VAULT_SECRET_ID, VAULT_MOUNT_PATH are declared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions