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

Support periodic tokens with TLS authentication #3533

Closed
phaer opened this issue Nov 3, 2017 · 1 comment
Closed

Support periodic tokens with TLS authentication #3533

phaer opened this issue Nov 3, 2017 · 1 comment
Assignees
Milestone

Comments

@phaer
Copy link

phaer commented Nov 3, 2017

The authentication tokens created by /v1/auth/cert/login seem to be subject to the maximum TTL of the system or their mount, would it be feasible to add a configuration parameter to make them periodic?

We are currently circumventing the issue with a script like:

export VAULT_TMP_TOKEN=$(/usr/bin/curl -s \
    --cacert ${TLS_CA_CERT} \
    --cert ${TLS_CERT} \
     --key ${TLS_KEY} \
     -d "{\"name\": \"${HOSTNAME}\"}" \
     ${VAULT_URI}/v1/auth/cert/login -XPOST \
   | /usr/bin/jq -r .auth.client_token)
export VAULT_TOKEN=$(curl -s -X POST \
    -H "X-Vault-Token: ${VAULT_TMP_TOKEN}" \
     "${VAULT_URI}/v1/auth/token/create/$HOSTNAME" \
  | /usr/bin/jq -r .auth.client_token)
curl -s -X POST \
  -H "X-Vault-Token: ${VAULT_TMP_TOKEN}" \
  "${VAULT_URI}/v1/auth/token/revoke-self"

Which is a bit of a workaround but works, the problem is that it requires extra auth/token/roles and policies just to acquire a periodic token. The use case for the whole thing is to start long running processes by using TLS authentication, consul-template in our case.

What do you think?

@phaer phaer changed the title Support periodic tokens in TLS authentication Support periodic tokens with TLS authentication Nov 3, 2017
@jefferai
Copy link
Member

jefferai commented Nov 3, 2017

Adding to 0.8.4, but may slip to the release after next.

@jefferai jefferai added this to the 0.8.4 milestone Nov 3, 2017
@calvn calvn self-assigned this Nov 8, 2017
@jefferai jefferai modified the milestones: 0.9.0, 0.9.1 Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants