fix: extract array type for policy claim if present (#10014)

This commit is contained in:
Harshavardhana
2020-07-10 14:48:44 -07:00
committed by GitHub
parent c00d410e61
commit ba756cf366
3 changed files with 16 additions and 12 deletions

View File

@@ -357,8 +357,9 @@ 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[iamPolicyClaimNameOpenID()]; ok {
policyName, _ = v.(string)
policySet, ok := iampolicy.GetPoliciesFromClaims(m, iamPolicyClaimNameOpenID())
if ok {
policyName = strings.Join(policySet.ToSlice(), ",")
}
var subFromToken string