Skip to content

Commit

Permalink
Set request token entry within fetchACLTokenEntryAndEntity (#5880)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvn authored and jefferai committed Dec 3, 2018
1 parent 1bc959a commit e9751fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions command/seal_migration_test.go
@@ -1,3 +1,5 @@
// +build !enterprise

package command

import (
Expand Down
2 changes: 0 additions & 2 deletions vault/core.go
Expand Up @@ -1146,8 +1146,6 @@ func (c *Core) sealInitCommon(ctx context.Context, req *logical.Request) (retErr
return retErr
}

req.SetTokenEntry(te)

// Audit-log the request before going any further
auth := &logical.Auth{
ClientToken: req.ClientToken,
Expand Down
2 changes: 2 additions & 0 deletions vault/request_handling.go
Expand Up @@ -136,6 +136,8 @@ func (c *Core) fetchACLTokenEntryAndEntity(ctx context.Context, req *logical.Req
c.logger.Error("failed to lookup token", "error", err)
return nil, nil, nil, nil, ErrInternalError
}
// Set the token entry here since it has not been cached yet
req.SetTokenEntry(te)
default:
te = req.TokenEntry()
}
Expand Down

0 comments on commit e9751fd

Please sign in to comment.