GithubHelp home page GithubHelp logo

389ds-plugin-ssm's Introduction

389ds-plugin-ssm

Server Side Modification plugin

The plugin provides facilities for server-side updating entry based on it's attribute values, modifiers DN, and time.

Compilation

$ apt-get install 389-ds-base-dev libnspr4-dev
$ make clean
$ make ssm

Instalation

$ cp ssm.so /usr/lib/x86_64-linux-gnu/dirsrv/plugins
$ cat SSM.ldif | ldapmodify -H ldap://localhost -D "cn=Directory Manager" -W
$ cp udb.conf /etc/dirsrv/slapd-ldap/
$ systemctl restart dirsrv@ldap

Configuration

Example of configuration file is in udb.conf and test.cfg. Syntax of conf file:

MODIFIED-ATTRIBUTE[,MODIFIED-ATTRIBUTE]
  FILTER↹OPERATION=TARGET-ATTRIBUTE=ACTION↹[OPERATION=TARGET-ATTRIBUTE=ACTION]
  FILTER↹OPERATION=TARGET-ATTRIBUTE=ACTION↹[OPERATION=TARGET-ATTRIBUTE=ACTION]

MODIFIED-LDAP-ATTRIBUTE

A comma-separated list of attributes which modification causes ACTION. Any attribute can be addressed as '*'.

FILTER

LDAP filter for limiting entries which should be subject of an ACTION.

The TAB character serves as FILTER and OPERATION separator. Space is not permitted.

OPERATION

One of possible LDAP operations: = serves for REPLACE, + for ADD, and - for DELETE.

TARGET-ATTRIBUTE

An attribute that should be modified by an ACTION.

ACTION

Possible actions are:

ACTION Explanation
!opinit_time() Place timestamp of entry modification into TARGET-ATTRIBUTE
!conn_dn() Place modifiers DN into TARGET-ATTRIBUTE
!concat(a, b, ...) Serialize strings a, b, ... and separate them by a space. If the first argument is preceded by $ than it is interpreted as the value of the TARGET-ATTRIBUTE.
string1, string2 Multiple strings are interpreted as multiple values assigned into TARGET-ATTRIBUTE

Examples

Every time entryStatus is modified update entryStatusTimestamp with modification timestamp and entryStatusModifier with modifiers DN:

entrystatus
  (objectclass=*)	=entrystatustimestamp=!opinit_time()	=entrystatusmodifier=!conn_dn()

Every time anything is changed on entry construct mail attribute by concating content of uid ttribute and string @example.com:

*
  (uid=*)	mail=!concat($uid,@example.com)

Every time userPassword is updated record change timestamp in passwordTimestamp attribute:

userpassword
  (objectclass=*)	=passwordtimestamp=!opinit_time()

Authors

This plugin was written by Milan Sova for Sun ONE Directory Server 4 around the year 1999. At the time he was working for the Faculty of Electrical Engineering of the Czech Technical University in Prague (FEL CTU). Later he moved to CESNET.

The plugin was ported for 389 Directory Server 1.4 by Jiří Cejp from FEL CTU.

It was documented and published by Jan Tomášek from CESNET.

389ds-plugin-ssm's People

Contributors

semik avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.