mirror of
https://github.com/pgsty/minio.git
synced 2026-07-25 23:16:16 +03:00
fix: ldap:username variable substitution in policies
This commit is contained in:
+5
-5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user