Skip to content

Commit 607ca57

Browse files
authored
Adding missing lookup fields for LDAP configuration in UI (#1698)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
1 parent 86a3072 commit 607ca57

File tree

9 files changed

+81
-183
lines changed

9 files changed

+81
-183
lines changed

models/idp_configuration.go

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operatorapi/embedded_spec.go

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operatorapi/operator_tenant_add.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ func getTenantCreatedResponse(session *models.Principal, params operator_api.Cre
151151
if tenantReq.Idp.ActiveDirectory != nil {
152152
tenantExternalIDPConfigured = true
153153
serverAddress := *tenantReq.Idp.ActiveDirectory.URL
154-
userNameFormat := tenantReq.Idp.ActiveDirectory.UsernameFormat
155-
userNameSearchFilter := tenantReq.Idp.ActiveDirectory.UsernameSearchFilter
156-
groupNameAttribute := tenantReq.Idp.ActiveDirectory.GroupNameAttribute
157154
tlsSkipVerify := tenantReq.Idp.ActiveDirectory.SkipTLSVerification
158155
serverInsecure := tenantReq.Idp.ActiveDirectory.ServerInsecure
159156
lookupBindDN := tenantReq.Idp.ActiveDirectory.LookupBindDn
@@ -176,10 +173,6 @@ func getTenantCreatedResponse(session *models.Principal, params operator_api.Cre
176173
tenantConfigurationENV["MINIO_IDENTITY_LDAP_SERVER_STARTTLS"] = "on"
177174
}
178175

179-
// LDAP Username
180-
tenantConfigurationENV["MINIO_IDENTITY_LDAP_USERNAME_FORMAT"] = userNameFormat
181-
tenantConfigurationENV["MINIO_IDENTITY_LDAP_USERNAME_SEARCH_FILTER"] = userNameSearchFilter
182-
183176
// LDAP Lookup
184177
tenantConfigurationENV["MINIO_IDENTITY_LDAP_LOOKUP_BIND_DN"] = lookupBindDN
185178
tenantConfigurationENV["MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD"] = lookupBindPassword
@@ -189,7 +182,6 @@ func getTenantCreatedResponse(session *models.Principal, params operator_api.Cre
189182
tenantConfigurationENV["MINIO_IDENTITY_LDAP_USER_DN_SEARCH_FILTER"] = userDNSearchFilter
190183

191184
// LDAP Group
192-
tenantConfigurationENV["MINIO_IDENTITY_LDAP_GROUP_NAME_ATTRIBUTE"] = groupNameAttribute
193185
tenantConfigurationENV["MINIO_IDENTITY_LDAP_GROUP_SEARCH_BASE_DN"] = groupSearchBaseDN
194186
tenantConfigurationENV["MINIO_IDENTITY_LDAP_GROUP_SEARCH_FILTER"] = groupSearchFilter
195187

portal-ui/src/screens/Console/Configurations/utils.tsx

Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -404,75 +404,80 @@ export const fieldsConfigurations: any = {
404404
label: "Server Addr",
405405
tooltip: 'AD/LDAP server address e.g. "myldapserver.com:636"',
406406
type: "string",
407-
placeholder: "Enter Server Address",
407+
placeholder: "myldapserver.com:636",
408408
},
409409
{
410-
name: "username_format",
411-
required: true,
412-
label: "Username Format",
410+
name: "tls_skip_verify",
411+
required: false,
412+
label: "TLS Skip Verify",
413413
tooltip:
414-
'List of username bind DNs e.g. "uid=%s","cn=accounts","dc=myldapserver" or "dc=com", you can write one per field',
415-
type: "csv",
416-
placeholder: "Enter Username Format",
414+
'Trust server TLS without verification, defaults to "off" (verify)',
415+
type: "on|off",
417416
},
418417
{
419-
name: "username_search_filter",
420-
required: true,
421-
label: "Username Search Filter",
418+
name: "server_insecure",
419+
required: false,
420+
label: "Server Insecure",
422421
tooltip:
423-
'User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"',
424-
type: "string",
425-
placeholder: "Enter Username Search Filter",
422+
'Allow plain text connection to AD/LDAP server, defaults to "off"',
423+
type: "on|off",
426424
},
427425
{
428-
name: "group_search_filter",
426+
name: "server_starttls",
427+
required: false,
428+
label: "Start TLS connection to AD/LDAP server",
429+
tooltip: "Use StartTLS connection to AD/LDAP server",
430+
type: "on|off",
431+
},
432+
{
433+
name: "lookup_bind_dn",
429434
required: true,
430-
label: "Group Search Filter",
435+
label: "Lookup Bind DN",
431436
tooltip:
432-
'Search filter for groups e.g. "(&(objectclass=groupOfNames)(memberUid=%s))"',
437+
"DN for LDAP read-only service account used to perform DN and group lookups",
433438
type: "string",
434-
placeholder: "Enter Group Search Filter",
439+
placeholder: "cn=admin,dc=min,dc=io",
435440
},
436441
{
437-
name: "username_search_base_dn",
442+
name: "lookup_bind_password",
438443
required: false,
439-
label: "Username Search Base DN",
440-
tooltip: "List of username search DNs, you can write one per field",
441-
type: "csv",
442-
placeholder: "Enter Username Search Base DN",
444+
label: "Lookup Bind Password",
445+
tooltip:
446+
"Password for LDAP read-only service account used to perform DN and group lookups",
447+
type: "string",
448+
placeholder: "admin",
443449
},
444450
{
445-
name: "group_name_attribute",
451+
name: "user_dn_search_base_dn",
446452
required: false,
447-
label: "Group Name Attribute",
448-
tooltip: 'Search attribute for group name e.g. "cn"',
449-
type: "string",
450-
placeholder: "Enter Group Name Attribute",
453+
label: "User DN Search Base DN",
454+
tooltip: "Base LDAP DN to search for user DN",
455+
type: "csv",
456+
placeholder: "dc=myldapserver",
451457
},
452458
{
453-
name: "sts_expiry",
459+
name: "user_dn_search_filter",
454460
required: false,
455-
label: "STS Expiry",
456-
tooltip:
457-
'temporary credentials validity duration in s,m,h,d. Default is "1h"',
461+
label: "User DN Search Filter",
462+
tooltip: "Search filter to lookup user DN",
458463
type: "string",
459-
placeholder: "Enter STS Expiry",
464+
placeholder: "(sAMAcountName=%s)",
460465
},
461466
{
462-
name: "tls_skip_verify",
467+
name: "group_search_filter",
463468
required: false,
464-
label: "TLS Skip Verify",
465-
tooltip:
466-
'Trust server TLS without verification, defaults to "off" (verify)',
467-
type: "on|off",
469+
label: "Group Search Filter",
470+
tooltip: "Search filter for groups",
471+
type: "string",
472+
placeholder: "(&(objectclass=groupOfNames)(member=%d))",
468473
},
469474
{
470-
name: "server_insecure",
475+
name: "group_search_base_dn",
471476
required: false,
472-
label: "Server Insecure",
473-
tooltip:
474-
'Allow plain text connection to AD/LDAP server, defaults to "off"',
475-
type: "on|off",
477+
label: "Group Search Base DN",
478+
tooltip: "list of group search base DNs",
479+
type: "csv",
480+
placeholder: "dc=minioad,dc=local",
476481
},
477482
{
478483
name: "comment",

portal-ui/src/screens/Console/Tenants/AddTenant/AddTenant.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,9 @@ const AddTenant = ({
118118
const ADURL = fields.identityProvider.ADURL;
119119
const ADSkipTLS = fields.identityProvider.ADSkipTLS;
120120
const ADServerInsecure = fields.identityProvider.ADServerInsecure;
121-
const ADUserNameSearchFilter =
122-
fields.identityProvider.ADUserNameSearchFilter;
123121
const ADGroupSearchBaseDN = fields.identityProvider.ADGroupSearchBaseDN;
124122
const ADGroupSearchFilter = fields.identityProvider.ADGroupSearchFilter;
125-
const ADGroupNameAttribute = fields.identityProvider.ADGroupNameAttribute;
126123
const ADUserDNs = fields.identityProvider.ADUserDNs;
127-
const ADUserNameFormat = fields.identityProvider.ADUserNameFormat;
128124
const ADLookupBindDN = fields.identityProvider.ADLookupBindDN;
129125
const ADLookupBindPassword = fields.identityProvider.ADLookupBindPassword;
130126
const ADUserDNSearchBaseDN = fields.identityProvider.ADUserDNSearchBaseDN;
@@ -600,11 +596,8 @@ const AddTenant = ({
600596
url: ADURL,
601597
skip_tls_verification: ADSkipTLS,
602598
server_insecure: ADServerInsecure,
603-
username_format: ADUserNameFormat,
604-
username_search_filter: ADUserNameSearchFilter,
605599
group_search_base_dn: ADGroupSearchBaseDN,
606600
group_search_filter: ADGroupSearchFilter,
607-
group_name_attribute: ADGroupNameAttribute,
608601
user_dns: ADUserDNs,
609602
lookup_bind_dn: ADLookupBindDN,
610603
lookup_bind_password: ADLookupBindPassword,

0 commit comments

Comments
 (0)