Giter Site home page Giter Site logo

ldap-triggers's Introduction

LDAP-triggers

Tests

This project is hosted at https://github.com/marcbenedi/ldap-triggers .

Setup

$ ldaptriggers --init
# Follow instructions to set it up

$ ldaptriggers --daemon
# Or if you want to debug running it in foreground is recommended
$ ldaptriggers

Dependencies

One of the requirements is python-ldap which is based on OpenLDAP, so you need to have the developemnt files (headers) in order to compile the Python module

sudo apt-get install gcc libpq-dev -y
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel -y
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

Installation

At the moment this package is not available in pip repositories. To install it, create a virtual environment and install the requirements.

$ git clone https://github.com/marcbenedi/ldap-triggers
$ cd ldap-triggers
$ virtualenv -p python3 venv
$ pip install -r requirements.txt
$ pip install --editable .

Important paths

Configuration files are stored in /etc/ldaptriggers/

The triggers are stored in /etc/ldaptriggers/triggers

Logs are stored in /var/log/ldaptriggers.log

Run tests

make tests

Triggers

Triggers are stored in /etc/ldaptriggers/triggers/

You can see some examples in this repository under examples/triggers

The name of the file is very important. It has to follow this pattern:

[action]_[entity]_[name of script].bash

For example, if we want a trigger to be executed when a user is added, it has to have the following name:

add_people_send_email.bash

If instead, we want a trigger when a group is deleted, it has to have the following name:

delete_group_delete_shared_folder.bash

Or when a group is modified:

modify_group_update_name.bash

It is important that the triggers are executable by the root user, as the daemon is run by root

License

This software is avaialble under the following licenses:

  • MIT

For more details check LICENSE file

Future work

Check the project's board for more information and track current status.

Contributing

Check out CONTRIBUTING.md for more information.

ldap-triggers's People

Contributors

marcbenedi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

cibex

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.