From 378db2bc3c52961d27f1f103f336aefa303dd464 Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Thu, 10 Mar 2016 19:55:38 -0500 Subject: [PATCH] Add default policy to response auth object --- vault/core.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vault/core.go b/vault/core.go index 8725945b9..2cc8021bf 100644 --- a/vault/core.go +++ b/vault/core.go @@ -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 {