Search code examples
ldapschemaldifopendj

What is the LDAP schema syntax to specify list of allowed attribute values?


I am new to OpenDJ and LDAP and I want to know what is the LDAP Schema syntax to specify an attribute can have only one of the few values? For example, an User object has an attribute called status that can have only one of these values: Active, In-Active.

Appreciate any help here.


Solution

  • You can achieve what you want by defining a Syntax with the X-ENUM extension: http://docs.forgerock.org/en/opendj/2.6.0/admin-guide/index/chap-schema.html#attr-syntax-schema-definition-extensions

    First define a statusSyntax and then an attribute status that uses that syntax.