Skip to content

Error: failed to retrieve vault token. code: ERR_NON_2XX_3XX_RESPONSE, message: Response code 400 (Bad Request), vaultResponse: {"errors":["could not load configuration"]}[BUG]  #560

@ragh2711

Description

@ragh2711

Vault server version

v1.16.2

vault-action version

v3

Describe the bug

JWT token is not working on our new vault setup and we are getting the below error

Error: failed to retrieve vault token. code: ERR_NON_2XX_3XX_RESPONSE, message: Response code 400 (Bad Request), vaultResponse: {"errors":["could not load configuration"]}[BUG]

Please find the snip of the workflow
env:
VAULT_ADDR: "https://secrets.********.net"
VAULT_NAMESPACE: "admin/*************"
VAULT_ROLE: " kpt-platform-testqa-wus3-rg_rw_role"

- name: Pull HC Vault secrets
  uses: hashicorp/vault-action@v3 
  id: secrets 
  with: 
    method: jwt 
    url: ${{env.VAULT_ADDR}}
    namespace: ${{env.VAULT_NAMESPACE}}
    role: ${{env.VAULT_ROLE}}
    secrets: |
        ********************/data/testqa CLIENT_ID | ARM_CLIENT_ID ;
       ********************/data/testqa CLIENT_SECRET | ARM_CLIENT_SECRET ;
        ********************/data/testqa TENANT_ID | ARM_TENANT_ID ;
       ********************/data/testqa SUBSCRIPTION_ID | ARM_SUBSCRIPTION_ID ;
       ********************/data/testqa TF_TOKEN | TF_CLOUD_TOKEN

To Reproduce

The yaml of the vault-action step, with any sensitive information masked or removed.

Expected behavior

A clear and concise description of what you expected to happen.

Log Output

For the most verbose logs, add a secret called
ACTIONS_STEP_DEBUG
with the value true. Then, re-run the workflow if possible and post the raw
logs
for the step here with any sensitive information masked or removed.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions