mirror of
https://github.com/minio/minio.git
synced 2025-11-25 03:56:17 -05:00
support ldap:username for policy substitution (#12390)
LDAPusername is the simpler form of LDAPUser (userDN), using a simpler version is convenient from policy conditions point of view, since these are unique id's used for LDAP login.
This commit is contained in:
@@ -148,6 +148,7 @@ var AllSupportedKeys = append([]Key{
|
||||
AWSUserID,
|
||||
AWSUsername,
|
||||
LDAPUser,
|
||||
LDAPUsername,
|
||||
// Add new supported condition keys.
|
||||
}, JWTKeys...)
|
||||
|
||||
@@ -167,6 +168,7 @@ var CommonKeys = append([]Key{
|
||||
AWSUserID,
|
||||
AWSUsername,
|
||||
LDAPUser,
|
||||
LDAPUsername,
|
||||
}, JWTKeys...)
|
||||
|
||||
func substFuncFromValues(values map[string][]string) func(string) string {
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
package condition
|
||||
|
||||
const (
|
||||
// LDAPUser - LDAP username, in MinIO this value is equal to your authenticating LDAP user.
|
||||
// LDAPUser - LDAP user DN, in MinIO this value is equal to user DN of the authenticated user.
|
||||
LDAPUser Key = "ldap:user"
|
||||
|
||||
// LDAPUsername - LDAP username, in MinIO is the authenticated simply user.
|
||||
LDAPUsername Key = "ldap:username"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user