Last active
January 17, 2022 16:06
-
-
Save gitrgoliveira/1fd5d1d5f68371a76cf8a3e4f4eac8f3 to your computer and use it in GitHub Desktop.
vault setup bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vault auth enable jwt | |
vault write auth/jwt/config \ | |
oidc_discovery_url="https://token.actions.githubusercontent.com" \ | |
bound_issuer="https://token.actions.githubusercontent.com" \ | |
default_role="demo" | |
# "user_claim": "workflow" defines the entity alias. | |
vault write auth/jwt/role/demo -<<EOF | |
{ | |
"role_type": "jwt", | |
"bound_subject": "", | |
"bound_claims": { | |
"sub": ["repo:gitrgoliveira/vault-action-exampleapp:ref:refs/*"] | |
}, | |
"bound_claims_type": "glob", | |
"bound_audiences": "https://github.com/gitrgoliveira", | |
"user_claim": "workflow", | |
"policies": "vault-action", | |
"ttl": "1h" | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment