Skip to content

update vault

update vault #15

Workflow file for this run

name: OIDC Access Test Auth
on: push
permissions:
id-token: write
contents: read
jobs:
read-secret:
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v2
# Shout out to Benjamin Pannell at Sierra Softworks for this
# https://sierrasoftworks.com/2021/12/20/vault-github-actions/#policies
- name: Troubleshooting
run: |
curl -sSL -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL" | \
jq "{ jwt: .value, role: \"$VAULT_ROLE\" }" > ./token.json
echo 'GitHub Actions Token Claims'
cat ./token.json | jq -r '.jwt | split(".") | .[1] | @base64d' | jq
echo 'Vault Login Response'
curl -sSLf -X POST -H "Content-Type: application/json" -H "X-Vault-Namespace:" --data @token.json $VAULT_URL/v1/auth/$VAULT_AUTH_PATH/login
# Remove the token file when we're done (if we don't fail)
rm ./token.json
env:
VAULT_URL: https://vault.kalamabdul.com:8200
VAULT_AUTH_PATH: jwt
VAULT_ROLE: demo