mirror of
https://github.com/pgsty/minio.git
synced 2026-10-07 02:05:58 +03:00
trace: Add bootstrap tracing events (#16286)
This commit is contained in:
@@ -141,15 +141,15 @@ func isValidRegion(reqRegion string, confRegion string) bool {
|
||||
// check if the access key is valid and recognized, additionally
|
||||
// also returns if the access key is owner/admin.
|
||||
func checkKeyValid(r *http.Request, accessKey string) (auth.Credentials, bool, APIErrorCode) {
|
||||
if !globalIAMSys.Initialized() {
|
||||
// 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
|
||||
}
|
||||
|
||||
cred := globalActiveCred
|
||||
if cred.AccessKey != accessKey {
|
||||
if !globalIAMSys.Initialized() {
|
||||
// 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
|
||||
}
|
||||
|
||||
// Check if the access key is part of users credentials.
|
||||
u, ok := globalIAMSys.GetUser(r.Context(), accessKey)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user