Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger MODRDN operation if RDN case has changed #184

Open
soisik opened this issue Mar 8, 2022 · 4 comments
Open

Trigger MODRDN operation if RDN case has changed #184

soisik opened this issue Mar 8, 2022 · 4 comments
Milestone

Comments

@soisik
Copy link
Contributor

soisik commented Mar 8, 2022

When checking if an entry should be renamed, LSC compare the destination DN with the source DN ignoring the case.
See https://github.com/lsc-project/lsc/blob/v2.1/src/main/java/org/lsc/beans/BeanComparator.java#L129.

If it's a good thing to ignore case for the attribute names or branch part (CN=/cn= or OU=LOCAL/ou=local...) that are not sensitive to case in directories, it is not always true for the RDN part, for example using the CN attribute (eg. "cn=DOE John" vs "cn=Doe John" are different)

It would be nice to have an option to tell LSC to compare DN's RDN in a case sensitive way when checking if an entry should be renamed. It could be made the default behavior in 2.2.

@davidcoutadeur
Copy link
Contributor

Actually, it's up to the schema to decide wether the attribute must or must not be case insensitive.
Some attributes use "case insensitive" comparison rules, other "case sensitive".

It's a bit overkill to let the LSC load the schema and determine the rules, but maybe could we define in lsc.xml some static configuration, for example:

<comparisonRules>
  <cn>caseInsensitive</cn>
  <uid>caseInsensitive</uid>
  ...
</comparisonRules>

@davidcoutadeur
Copy link
Contributor

By the way, the comparison rule for cn is caseIgnoreMatch, so "cn=DOE John" should be equal to "cn=Doe John"

@coudot
Copy link
Member

coudot commented Mar 8, 2022

See also #54

@rouazana
Copy link
Contributor

It's a bit overkill to let the LSC load the schema and determine the rules

Modern LDAP libraries such as Apache Directory's one allow to load the schema from the LDAP directory and to have a schema-aware DN comparison.
We could try this.

@coudot coudot added this to the Future milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants