fix: reject service account access key same as root credentials (#19055)

This commit is contained in:
Harshavardhana
2024-02-14 10:37:12 -08:00
committed by GitHub
parent 6fd0b434e2
commit 134db72bb7
2 changed files with 6 additions and 1 deletions

View File

@@ -621,6 +621,11 @@ func (a adminAPIHandlers) AddServiceAccount(w http.ResponseWriter, r *http.Reque
return
}
if createReq.AccessKey == globalActiveCred.AccessKey {
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAddUserInvalidArgument), r.URL)
return
}
var (
targetGroups []string
err error