hashicorp / hashicorp/vault-action

Access vault using kubernetes method

Open
#237 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
513
Forks
166
Avg merge
6d 4h
Merged PRs (30d)
1

Description

**Describe the bug**
I am trying to access vault secrets using kube auth on self hosted action runner
I could see the input it requires is the vault role and kubernetes token path

When I use them It fails with `Error: Response code 400 (Bad Request)`

**To Reproduce**

```yaml
- name: Get secrets from Vault
uses: hashicorp/vault-action@v2.3.0
with:
url: https://vaultdev.***********.com
method: kubernetes
role: *************
kubernetesTokenPath: **************
secrets: |
****************** USERNAME | TEST_USERNAME_;
****************** PASSWORD | TEST_PASSWORD ;
```

**Expected behavior**
Fetch secrets from vault

**Log Output**
Get Vault Secrets
##[debug]Retrieving Vault Token from v1/auth/kubernetes/login endpoint
::endgroup::
Error: Response code 400 (Bad Request)
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Get secrets from Vault

**Additional context**
Does this action supported kube auth on self hosted runner - as I see this in readme

kubernetes: you must provide the role paramaters. You can optionally override the kubernetesTokenPath paramater for custom mounted serviceAccounts. Consider kubernetes auth(https://www.vaultproject.io/docs/auth/kubernetes) when using self-hosted runners on Kubernetes:

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the README's Kubernetes authentication section and the login request to v1/auth/kubernetes/login shown in the log. Reproduce the workflow on a self-hosted runner using the provided inputs, then determine why Vault returns HTTP 400. Done means Kubernetes authentication successfully retrieves the requested secrets or the supported configuration is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript, kubernetes
Domain
authentication, ci-cd, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.