Skip to content

Commit 733987e

Browse files
Use VAULT_ID_TOKEN to authenticate pipeline
1 parent bb4aadb commit 733987e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.gitlab-ci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ get_credentials:
2525
tags:
2626
- Fulen
2727
- K8s
28+
id_tokens:
29+
VAULT_ID_TOKEN:
30+
aud: https://git.cscs.ch
2831
script:
29-
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/login role=iam jwt=$CI_JOB_JWT)"
32+
- export VAULT_TOKEN="$(vault write -field=token auth/jwt_idtoken/login role=iam jwt=$VAULT_ID_TOKEN)"
3033
- if [[ ${#VAULT_TOKEN} -lt 3 ]]; then echo "ERROR, Vault token empty"; exit 1; fi
3134
- export JFROG_USER="$(vault kv get -field=JFROG_USER $VAULT_PATH)"
3235
- export JFROG_TOKEN="$(vault kv get -field=JFROG_TOKEN $VAULT_PATH)"

0 commit comments

Comments
 (0)