mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
Add default policy to response auth object
This commit is contained in:
parent
a389a3cd10
commit
baeb602fd8
@ -672,7 +672,10 @@ func (c *Core) handleLoginRequest(req *logical.Request) (*logical.Response, *log
|
||||
}
|
||||
|
||||
if !strListSubset(te.Policies, []string{"root"}) {
|
||||
// Append 'default' policy to the token being created
|
||||
te.Policies = append(te.Policies, "default")
|
||||
// Update the response with the policies associated with token
|
||||
auth.Policies = append(auth.Policies, "default")
|
||||
}
|
||||
|
||||
if err := c.tokenStore.create(&te); err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user