mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
loadUser() if not able to load() credential return error (#19931)
This commit is contained in:
@@ -152,11 +152,14 @@ func checkKeyValid(r *http.Request, accessKey string) (auth.Credentials, bool, A
|
||||
// Check if server has initialized, then only proceed
|
||||
// to check for IAM users otherwise its okay for clients
|
||||
// to retry with 503 errors when server is coming up.
|
||||
return auth.Credentials{}, false, ErrServerNotInitialized
|
||||
return auth.Credentials{}, false, ErrIAMNotInitialized
|
||||
}
|
||||
|
||||
// Check if the access key is part of users credentials.
|
||||
u, ok := globalIAMSys.GetUser(r.Context(), accessKey)
|
||||
u, ok, err := globalIAMSys.CheckKey(r.Context(), accessKey)
|
||||
if err != nil {
|
||||
return auth.Credentials{}, false, ErrIAMNotInitialized
|
||||
}
|
||||
if !ok {
|
||||
// Credentials could be valid but disabled - return a different
|
||||
// error in such a scenario.
|
||||
|
||||
Reference in New Issue
Block a user