mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-11 09:51:16 -04:00
Set request token entry within fetchACLTokenEntryAndEntity (#5880)
This commit is contained in:
parent
1bc959ad5a
commit
e9751fdfc5
3 changed files with 4 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// +build !enterprise
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue