populate additional claims for prometheus endpoint (#13011)

service accounts and STS provide additional claims for
policy authorization which needs to be verified along
with Prometheus issuer claim.
This commit is contained in:
Harshavardhana
2021-08-20 11:32:01 -07:00
committed by GitHub
parent e210cb3670
commit 6d04c9c585
3 changed files with 38 additions and 48 deletions

View File

@@ -213,15 +213,6 @@ func getReqAccessCred(r *http.Request, region string) (cred auth.Credentials) {
if cred.AccessKey == "" {
cred, _, _ = getReqAccessKeyV2(r)
}
if cred.AccessKey == "" {
claims, owner, _ := webRequestAuthenticate(r)
if owner {
return globalActiveCred
}
if claims != nil {
cred, _ = globalIAMSys.GetUser(claims.AccessKey)
}
}
return cred
}