Don't check the role period again as we've checked it earlier and it may be greater than the te Period
This commit is contained in:
parent
bcb4ab5422
commit
de60702d76
|
@ -1308,9 +1308,7 @@ func (ts *TokenStore) handleCreateCommon(
|
|||
|
||||
sysView := ts.System()
|
||||
|
||||
if role != nil && role.Period > 0 {
|
||||
te.TTL = role.Period
|
||||
} else if te.Period > 0 {
|
||||
if te.Period > 0 {
|
||||
te.TTL = te.Period
|
||||
} else {
|
||||
// Set the default lease if not provided, root tokens are exempt
|
||||
|
|
Loading…
Reference in a new issue