NethServer / dev

NethServer issue tracker
https://github.com/NethServer/dev/issues
62 stars 20 forks source link

LDAP domain name validation #6887

Closed DavidePrincipi closed 6 months ago

DavidePrincipi commented 6 months ago

The current LDAP domain name validator forbids name starting with a number.

Image

Steps to reproduce

Expected results

The domain is created and provisioned correctly

Actual results

The validator prevents me to complete the task

Additional information

Sparse citations from AD documentation:

The first character must be alphabetic or numeric. The FQDN of a domain controller must be smaller than 155 bytes. Minimum name length: Two characters Maximum name length: 63 characters https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/naming-conventions-for-computer-domain-site-ou#dns-domain-names

For OpenLDAP there should be no issue -- https://ldapwiki.com/wiki/Wiki.jsp?page=DC

Can we relax the regular expression that validates the domain name?

Yes, it seems...

Architecturally, domains and computers are represented both as objects in Active Directory and as nodes in DNS. -- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc759186(v=ws.10)#dns-support-for-activedirectory-1


Refs https://community.nethserver.org/t/ns8-rc1-openldap-domain-validation-failed/22690 Discussion https://mattermost.nethesis.it/nethesis/pl/yiiapr73spre8fz45norp4ao6y

Components

core 2.5.4 samba 2.2.2 openldap 2.2.1

stephdl commented 6 months ago

QA (todo)

samba 2.2.3-dev.1 openldap 2.2.2-dev.2

1foo.domain.org and 1domain.org must be valid
foo.domain.org and domain.org must be valid
1foo.domain.org and 1domain.org must be valid
foo.domain.org and domain.org must be valid
nrauso commented 6 months ago

test case 1: VERIFIED test case 2: VERIFIED

DavidePrincipi commented 6 months ago

Released openldap https://github.com/NethServer/ns8-openldap/releases/tag/2.2.2

DavidePrincipi commented 4 months ago

Released samba https://github.com/NethServer/ns8-samba/releases/tag/2.2.3