PingDirectory

General tips on extending the schema

Consider the following points when extending the schema:

  • Never modify the default schema files because doing so could damage the PingDirectory server’s processing capabilities.

  • Define all attributes before they can be used in an object class. If you are using the Schema Editor to add new schema elements, use the Quick Add Attributes option when defining new object classes.

  • Define the parent object class before creating object classes that inherit from the parent.

  • You must name custom schema files according to the following syntax:

    1. Begin with exactly two digits.

    2. Follow the two digits with a non-digit character.

    3. Follow the non-digit character with a zero or more characters.

    4. End in .ldif.

      The two digits don’t need to be followed by a dash ("-").

      Any files that do not meet this criteria are ignored and either a NOTICE or SEVERE_WARNING message is logged.

    Any file in the <server-root>/config/schema directory with a name that starts with "." or ends with a tilde (’~’), .swp, or .tmp generates a NOTICE message indicating that temporary files will be ignored. Any other file that does not meet the naming criteria generates a SEVERE_WARNING message indicating that it will be ignored.

  • Define custom attributes and object classes in one file. Typically, this file is the 99-user.ldif. You can specify a different file name that the PingDirectory server writes to using the X-SCHEMA-FILE element and the file name in the definition, as in the following example.

    add: attributeTypes attributeTypes: ( 1.3.6.1.4.1.32473.3.1.9.1
      NAME 'contractorStatus'
      EQUALITY booleanMatch
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
      SINGLE-VALUE
      USAGE userApplications
      X-ORIGIN 'Directory Server Example'
      X-SCHEMA-FILE '99-custom.ldif' )
  • In the white space characters in the schema definitions, WSP means zero or more space characters, and SP means one or more space characters. The LDIF specification states that LDIF parsers should ignore exactly one space at the beginning of each continuation line because continuation lines must begin with a space character.

    If you define a new schema definition with each keyword on a separate continuation line, you should add two spaces before an element keyword to guarantee correct formatting. For example, the following attribute definition has two spaces before the keywords NAME, SUP, and X-ORIGIN.

    attributeTypes: ( 2.5.4.32 NAME 'owner' SUP distinguishedName X-ORIGIN 'RFC 4519' )
  • In a replicated topology, any new schema additions are replicated to other replication servers to their respective Schema backend. The additions are written to the file specified by the X-SCHEMA-FILE extension or written to 99-user.ldif if no file is specified.