Skip to content

Commit

Permalink
set entity id on the token (#3468)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnayak authored Oct 18, 2017
1 parent eabc184 commit d5f3f3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vault/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,7 @@ func (c *Core) sealInitCommon(req *logical.Request) (retErr error) {
Policies: te.Policies,
Metadata: te.Meta,
DisplayName: te.DisplayName,
EntityID: te.EntityID,
}

if err := c.auditBroker.LogRequest(auth, req, c.auditedHeaders, nil); err != nil {
Expand Down Expand Up @@ -1277,6 +1278,7 @@ func (c *Core) StepDown(req *logical.Request) (retErr error) {
Policies: te.Policies,
Metadata: te.Meta,
DisplayName: te.DisplayName,
EntityID: te.EntityID,
}

if err := c.auditBroker.LogRequest(auth, req, c.auditedHeaders, nil); err != nil {
Expand Down
1 change: 1 addition & 0 deletions vault/request_handling.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ func (c *Core) handleLoginRequest(req *logical.Request) (*logical.Response, *log
CreationTime: time.Now().Unix(),
TTL: auth.TTL,
NumUses: auth.NumUses,
EntityID: auth.EntityID,
}

te.Policies = policyutil.SanitizePolicies(te.Policies, true)
Expand Down

0 comments on commit d5f3f3a

Please sign in to comment.