Closed jmls closed 8 years ago
Based on the Vault documentation, those values are not part of the result: https://vaultproject.io/docs/auth/token.html
To get those items you would have to do a lookup of the token after it is created.
oh. wow. I've been trying this like for an hour. I have been trying the lookup-self and did not see the data - I have no idea why I am seeing this now ...
http://myserver:8200/v1/auth/token/lookup-self -H "X-Vault-Token: x__e1976131-814d-49f4-bbed-d7dffe7ff8d4"
{"lease_id":"","renewable":false,"lease_duration":0,"data":{"creation_time":1451511181,"display_name":"token-foobar","id":"x__e1976131-814d-49f4-bbed-d7dffe7ff8d4","meta":{"working":"1"},"num_uses":42,"orphan":false,"path":"auth/token/create","policies":["xyz","default"],"ttl":2592000},"warnings":null,"auth":null}
the only thing I see "wrong" now is that the default policy has still been added
thanks, sorry for the waste of time on the other parts ..
I wonder if that is because you are using the root token to create the token, as to why maybe it is forcing the default as part of the policies.
probably.
I have this code
that gives this result
as you can see, display_name and num_uses don't seem to be present in the returned token, and the no_default_profile flag is ignored. There is a common thread, in that all "ignored" options seem to have underscores in them ...