Commit b7f4efa7 authored by Luc LABBE's avatar Luc LABBE Committed by Pierre Smeyers
Browse files

feat: allow explicit KV version (as env variable)

parent 829ca440
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@ The tool requires the following environment variables to be set (as GitLab CI se
| `VAULT_TOKEN`     | The authentication token <br/>_Required for the [Token](https://www.vaultproject.io/docs/auth/token) Auth Method_ | _none_ |
| `VAULT_JWT_TOKEN` | The signed [JSON Web Token](https://en.wikipedia.org/wiki/JSON_Web_Token) to login <br/>_Required for the [JWT/OIDC](https://www.vaultproject.io/docs/auth/jwt) Auth Method_ | `$CI_JOB_JWT` |
| `VAULT_JWT_ROLE`  | Name of the role against which the login is being attempted  <br/>_Required for the [JWT/OIDC](https://www.vaultproject.io/docs/auth/jwt) Auth Method_ | `default_role` |
| `VAULT_KV_VERSION`  | [Key/Value (KV) version](https://developer.hashicorp.com/vault/docs/secrets/kv) to use | `0` _(automatic)_ |

### Authentication method support

+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ var (
	vaultAuthMethod          = EnvStr("VAULT_AUTH_METHOD").Or("auto")
	vaultClientToken         = os.Getenv("VAULT_TOKEN")
	expirationTimeSec        = time.Now().Unix() + 86400 // 24 hours from start time
	kvEngineVersion          = 0
	kvEngineVersion          = EnvInt("VAULT_KV_VERSION").Or(0)
	clientToken              string
)