How to validate an LDIF?
Asked Answered
E

2

8

How to validate an LDIF?

Similar to XML, XMLSchema and Schematron are there any libraries to validate an LDIF with an LDAP schema?

Emergency answered 9/8, 2010 at 12:52 Comment(0)
C
8

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.

Campagna answered 24/5, 2016 at 15:13 Comment(0)
D
2

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.

Demi answered 9/8, 2010 at 12:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.