Mint encapi write token from Vault identity OIDC #12

Merged
benvin merged 1 commits from benvin/oidc-write-token into main 2026-10-25 12:45:12 +11:00
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -13,7 +13,8 @@ define vault_env
export VAULT_TOKEN=$$(vault write -field=token auth/approle/login role_id=$$VAULT_ROLEID); \
fi && \
export CONSUL_HTTP_TOKEN=$$(vault read -field=token consul_root/au/syd1/creds/terraform-enc) && \
export ENCAPI_WRITE_TOKEN=$$(vault kv get -field=ENCAPI_WRITE_TOKEN kv/kubernetes/namespace/encapi/default/environment)
export ENCAPI_WRITE_TOKEN=$$(vault read -field=token identity/oidc/token/terraform-enc) && \
[ -n "$$ENCAPI_WRITE_TOKEN" ] || { echo "failed to read ENCAPI_WRITE_TOKEN" >&2; exit 1; }
endef
init:
+2 -2
View File
@@ -34,8 +34,8 @@ ci/
The encapi provider comes from the internal registry
(`artifactapi.k8s.syd1.au.unkin.net/terraform-unkin/encapi` v0.1.0). Writes to
encapi are authenticated with `ENCAPI_WRITE_TOKEN`, read from Vault by the
Makefile.
encapi are authenticated with `ENCAPI_WRITE_TOKEN`, a Vault identity token
minted by the Makefile from `identity/oidc/token/terraform-enc`.
## Data provenance