Using vault 0.7.0
It seems that now matter what policy permissions I add, I cannot request a token from a token-role when I'm executing it through the approle.
Using root token
- vault write auth/approle/role/testapprole token_num_uses=10 token_ttl=10m token_max_ttl=20m bound_cidr_list=10.0.0.0/8 bind_secret_id=false policies=mypol
- vault write auth/approle/role/testapprole/role-id role_id=myroleid
- curl -X POST -d '{"role_id":"myroleid"}' http://127.0.0.1:8200/v1/auth/approle/login
- {"request_id":"10160da9-7f1d-984b-8f31-0e294542908e","lease_id":"","renewable":false,"lease_duration":0,"data":null,"wrap_info":null,"warnings":null,"auth":{"client_token":"708b1d2b-8d48-b299-5200-4169920c5272","accessor":"7647319f-85fd-fc63-b5c9-537228abcf7e","policies":["default","mypol"],"metadata":null,"lease_duration":600,"renewable":true}}
Using token from approle
- vault auth 708b1d2b-8d48-b299-5200-4169920c5272
- token: 708b1d2b-8d48-b299-5200-4169920c5272
- token_duration: 569
- token_policies: [default mypol]
- curl -X POST -H "X-Vault-Token:ff489262-344b-c564-4161-cbc9e0bee1dc" -d '{"ttl":"1m"}' http://127.0.0.1:8200/v1/auth/token/create/myrole
- {"errors":["restricted use token cannot generate child tokens"]}
When I look the token created from the approle
accessor 708b1d2b-8d48-b299-5200-4169920c5272
id 7647319f-85fd-fc63-b5c9-537228abcf7e
Since I am creating the token using a token-role, couldn't I be able to do it just by having permissions to the auth/token/roles path?
Can someone point me to the right direction on how to achieve the above?
Many thanks.