fix: negative STS IAM token TTL value (#10866)

master
Steven Reitsma 4 years ago committed by GitHub
parent 06899210a7
commit 4683a623dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/iam.go

@ -725,7 +725,7 @@ func (sys *IAMSys) SetTempUser(accessKey string, cred auth.Credentials, policyNa
sys.store.lock()
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
// temporary user which match with pre-configured canned

Loading…
Cancel
Save