fix: ldap:username variable substitution in policies

This commit is contained in:
Harshavardhana
2021-07-11 18:38:52 -07:00
parent cd36019450
commit d86ef6256d
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -64,8 +64,8 @@ const (
parentClaim = "parent"
// LDAP claim keys
ldapUser = "ldapUser"
ldapUsername = "ldapUsername"
ldapUser = "ldapUser"
ldapUserN = "ldapUsername"
)
func parseOpenIDParentUser(parentUser string) (userID string, err error) {
@@ -543,9 +543,9 @@ func (sts *stsAPIHandlers) AssumeRoleWithLDAPIdentity(w http.ResponseWriter, r *
expiryDur := globalLDAPConfig.GetExpiryDuration()
m := map[string]interface{}{
expClaim: UTCNow().Add(expiryDur).Unix(),
ldapUsername: ldapUsername,
ldapUser: ldapUserDN,
expClaim: UTCNow().Add(expiryDur).Unix(),
ldapUser: ldapUserDN,
ldapUserN: ldapUsername,
}
if len(sessionPolicyStr) > 0 {