Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Vault action fails if the key does not contain a dot #505

Open
Basil-V-Jose opened this issue Nov 27, 2023 · 1 comment
Open

[BUG] - Vault action fails if the key does not contain a dot #505

Basil-V-Jose opened this issue Nov 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Basil-V-Jose
Copy link

Basil-V-Jose commented Nov 27, 2023

Vault server version

v1.14.1

vault-action version

v2.7.4

Describe the bug

I'm unable to retrieve secrets where key does not contains a dot via this action

To Reproduce

      - name: Retrieve secret from Vault
        uses: hashicorp/[email protected]
        with:
          method: jwt
          url: ${{ secrets.VAULT_URL }}
          namespace: ${{ secrets.NAMESPACE }}
          role: read-access
          secrets: |
            Sample/data/TEST/SHARED/DB 'username' | sharedTestDBUsername ;

Expected behavior

I expect the secret to be retrieved and put in env as needed. If I modify the key in vault to username.workaround, and edit the above yaml, action fetches the secret.

      - name: Retrieve secret from Vault
        uses: hashicorp/[email protected]
        with:
          method: jwt
          url: ${{ secrets.VAULT_URL }}
          namespace: ${{ secrets.NAMESPACE }}
          role: read-access
          secrets: |
            Sample/data/TEST/SHARED/DB 'username.workaround' | sharedTestDBUsername ;

Log Output

Error: Unable to retrieve result for data.data."'username'". No match data was found. Double check your Key or Selector.

@Basil-V-Jose Basil-V-Jose added the bug Something isn't working label Nov 27, 2023
@robmonte
Copy link
Member

Hi @Basil-V-Jose

Thanks for reporting this. If you are still having this issue, can you possibly provide more context such as the output of the KV secret read? That will help us investigate what may have occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants