Skip to content

Instantly share code, notes, and snippets.

@wwalker
Last active December 22, 2015 22:27
Show Gist options
  • Save wwalker/df9942ba19c99eee0827 to your computer and use it in GitHub Desktop.
Save wwalker/df9942ba19c99eee0827 to your computer and use it in GitHub Desktop.
Why can't I self renew in vault? Never mind. the feature doesn't exist in 0.3.1, time to upgrade.
curl --tlsv1.2 -v -d @asdf.json -X POST -H "X-Vault-Token: $VAULT_TOKEN" https://127.0.0.1:8200/v1/sys/auth/token/renew-self
{
"auth": {
"client_token": "SAME_AS_IN_VAULT_TOKEN",
"policies": ["pg_devops_secret_ro"],
"lease_duration": 2592000,
"renewable": true
}
}
path "sys/*" {
policy = "deny"
}
path "secret/ops/configs/properties/product_groups/*" {
policy = "read"
}
path "auth/token/lookup-self" {
policy = "read"
}
path "auth/token/renew-self" {
policy = "write"
}
< HTTP/1.1 403 Forbidden
< Content-Type: application/json
< Date: Tue, 22 Dec 2015 18:59:55 GMT
< Content-Length: 33
<
{"errors":["permission denied"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment