mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
fix: temp credentials shouldn't allow policy/group changes (#8675)
This PR fixes the issue where we might allow policy changes for temporary credentials out of band, this situation allows privilege escalation for those temporary credentials. We should disallow any external actions on temporary creds as a practice and we should clearly differentiate which are static and which are temporary credentials. Refer #8667
This commit is contained in:
committed by
kannappanr
parent
d140074773
commit
586614c73f
@@ -117,6 +117,11 @@ func (cred Credentials) IsExpired() bool {
|
||||
return cred.Expiration.Before(time.Now().UTC())
|
||||
}
|
||||
|
||||
// IsTemp - returns whether credential is temporary or not.
|
||||
func (cred Credentials) IsTemp() bool {
|
||||
return cred.SessionToken != ""
|
||||
}
|
||||
|
||||
// IsValid - returns whether credential is valid or not.
|
||||
func (cred Credentials) IsValid() bool {
|
||||
// Verify credentials if its enabled or not set.
|
||||
|
||||
Reference in New Issue
Block a user