mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix: negative STS IAM token TTL value (#10866)
This commit is contained in:
parent
06899210a7
commit
4683a623dc
@ -725,7 +725,7 @@ func (sys *IAMSys) SetTempUser(accessKey string, cred auth.Credentials, policyNa
|
|||||||
sys.store.lock()
|
sys.store.lock()
|
||||||
defer sys.store.unlock()
|
defer sys.store.unlock()
|
||||||
|
|
||||||
ttl := int64(UTCNow().Sub(cred.Expiration).Seconds())
|
ttl := int64(cred.Expiration.Sub(UTCNow()).Seconds())
|
||||||
|
|
||||||
// If OPA is not set we honor any policy claims for this
|
// If OPA is not set we honor any policy claims for this
|
||||||
// temporary user which match with pre-configured canned
|
// temporary user which match with pre-configured canned
|
||||||
|
Loading…
Reference in New Issue
Block a user