PingDirectory

Tracking virtual attribute changes in the LDAP changelog

While the LDAP Changelog primarily tracks changes to real attributes, it can also provide information about virtual attributes included in created, updated, or deleted entries.

About this task

The include-virtual-attributes property controls the virtual attribute information to include in changelog entries, and this property might include any or all of the following values:

add-attributes

Indicates that changelog entries for add operations should include a ds-changelog-virtual-attributes attribute that lists the virtual attribute values generated for the entry at the time it was created.

deleted-entry-attributes

Indicates that changelog entries for delete operations should include a ds-changelog-virtual-attributes attribute that lists the virtual attribute values generated for the entry at the time it was deleted.

before-and-after-values

Indicates that changelog entries for modify and modify DN operations should include ds-changelog-before-virtual-values and ds-changelog-after-virtual-values attributes that contain the values of virtual attributes that have been updated.

key-attribute-values

Indicates that changelog entries should include a ds-changelog-entry-key-virtual-values attribute that holds the values for any virtual attributes included in the set of key attributes, as defined by the changelog-include-key-attribute property.

The add-attributes and before-and-after-values values are selected by default.

To enable virtual attribute change tracking in the LDAP Changelog:

Steps

  • Use dsconfig.

    Example:

    The following command enables the LDAP changelog and sets include-virtual-attributes to add-attributes, which indicates that virtual attributes be included in the set of attributes listed for an add operation. The delete-entry-attributes value indicates that virtual attributes should be included in the set of deleted entry attributes listed for a delete operation. The before-and-after-values value indicates that virtual attributes should be included in the set of before and after values for attributes targeted by the changes. The key-attribute-values value indicates that virtual attributes should be included in the set of entry key attribute values.

    $ bin/dsconfig set-backend-prop --backend-name "changelog" \
      --set "enabled:true" \
      --set "include-virtual-attributes:add-attributes" \
      --set "include-virtual-attributes:deleted-entry-attributes" \
      --set "include-virtual-attributes: before-and-after-values" \
      --set "include-virtual-attributes: key-attribute-values"