How to validate an LDIF?
Similar to XML, XMLSchema and Schematron are there any libraries to validate an LDIF with an LDAP schema?
How to validate an LDIF?
Similar to XML, XMLSchema and Schematron are there any libraries to validate an LDIF with an LDAP schema?
A better way to solve this is to run the ldap commands with flags that dont actually commit results to the server an example would be ldapadd -H ldap:/// -D "cn=admin,dc=nodomain" -w '<secretThatNobodyKnows>' -n -f
here with -n flag you are telling it to only show you what might happen. The advantage that this method holds over running query against a fake server is that you will actually validating against the same rules where you want to eventually commit to.
ldap-servers like openldap or opends usually check the ldif against the current schema on insertion. So if you need to check your ldif without using your productive ldap server, you could use a small java-based ldap server like openDS that uses the same ldap-schema.
© 2022 - 2024 — McMap. All rights reserved.