mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
sa: Allow empty policy to indicate parent user's policy is inherited (#9185)
This commit is contained in:
@@ -215,7 +215,7 @@ func (sts *stsAPIHandlers) AssumeRole(w http.ResponseWriter, r *http.Request) {
|
||||
// This policy is the policy associated with the user
|
||||
// requesting for temporary credentials. The temporary
|
||||
// credentials will inherit the same policy requirements.
|
||||
m[iamPolicyClaimName()] = policyName
|
||||
m[iamPolicyClaimNameOpenID()] = policyName
|
||||
|
||||
if len(sessionPolicyStr) > 0 {
|
||||
m[iampolicy.SessionPolicyName] = base64.StdEncoding.EncodeToString([]byte(sessionPolicyStr))
|
||||
@@ -351,7 +351,7 @@ func (sts *stsAPIHandlers) AssumeRoleWithJWT(w http.ResponseWriter, r *http.Requ
|
||||
// be set and configured on your identity provider as part of
|
||||
// JWT custom claims.
|
||||
var policyName string
|
||||
if v, ok := m[iamPolicyClaimName()]; ok {
|
||||
if v, ok := m[iamPolicyClaimNameOpenID()]; ok {
|
||||
policyName, _ = v.(string)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user