mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: sts to return appropriate errors (#9161)
This commit is contained in:
@@ -119,17 +119,11 @@ func checkAssumeRoleAuth(ctx context.Context, r *http.Request) (user auth.Creden
|
||||
case authTypeSigned:
|
||||
s3Err := isReqAuthenticated(ctx, r, globalServerRegion, serviceSTS)
|
||||
if STSErrorCode(s3Err) != ErrSTSNone {
|
||||
if s3Err == ErrInvalidAccessKeyID {
|
||||
return user, ErrSTSInvalidAccessKey
|
||||
}
|
||||
return user, STSErrorCode(s3Err)
|
||||
}
|
||||
var owner bool
|
||||
user, owner, s3Err = getReqAccessKeyV4(r, globalServerRegion, serviceSTS)
|
||||
if STSErrorCode(s3Err) != ErrSTSNone {
|
||||
if s3Err == ErrInvalidAccessKeyID {
|
||||
return user, ErrSTSInvalidAccessKey
|
||||
}
|
||||
return user, STSErrorCode(s3Err)
|
||||
}
|
||||
// Root credentials are not allowed to use STS API
|
||||
|
||||
Reference in New Issue
Block a user