Adam Harwell 6abfbee61a Add token-based auth method to VaultKeyManager
Add support for token-based authentication with Vault, enabling
castellan to authenticate using a token read from a file. This
covers Kubernetes ServiceAccount tokens, JWT/OIDC tokens, and
other file-based token mechanisms supported by Vault.

A new auth_method option (choices: 'approle', 'jwt', 'kubernetes';
default: 'approle') controls the authentication method. This makes
auth selection explicit and authoritative rather than implicit.

When auth_method is jwt or kubernetes, these options are used:
- token_role: Vault role name (required)
- token_file: path to the token file (required)
- auth_path: mount path of the Vault auth backend, used in the
  login URL /v1/auth/<auth_path>/login. Defaults to auth_method
  value when not set. Override for non-default mount paths (e.g.
  'kubernetes-my-cluster' instead of 'kubernetes'). See:
  https://developer.hashicorp.com/vault/api-docs/auth/kubernetes#login

The implementation reads the token from the configured file and
POSTs it as a JWT to the Vault auth backend's login endpoint.
The resulting Vault token is cached with TTL-based expiry, using
the same caching mechanism shared with AppRole auth via a common
_vault_login() method.

The root_token_id option continues to take priority over any
configured auth_method when set.

Generated-By: claude-opus-4-6 (OpenCode)
Signed-off-by: flux.adam@gmail.com
Change-Id: I2a3fd872d046467a2ca9dca0856bbfa43a6c239e
2026-06-15 02:08:07 -04:00
2026-05-06 14:39:04 +01:00
2026-02-23 14:59:10 +00:00
2019-04-19 19:32:42 +00:00
2014-11-20 15:39:45 -06:00
2026-05-06 14:39:04 +01:00
2018-07-11 08:56:06 +07:00
2014-11-20 15:39:45 -06:00
2026-05-06 16:09:34 +01:00
2025-11-21 22:02:25 +09:00
2026-01-27 17:12:35 +09:00
2026-05-06 14:39:04 +01:00
S
Description
Generic Key Manager interface for OpenStack
Readme 6.2 MiB
Languages
Python 99.8%
Shell 0.2%