https://github.com/agx/ldapsp
Foreman Realm smart proxy for creating LDAP entries
https://github.com/agx/ldapsp
erlang foreman ldap smartproxy
Last synced: 8 months ago
JSON representation
Foreman Realm smart proxy for creating LDAP entries
- Host: GitHub
- URL: https://github.com/agx/ldapsp
- Owner: agx
- License: gpl-3.0
- Created: 2016-11-07T18:47:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-19T11:04:48.000Z (over 4 years ago)
- Last Synced: 2025-02-14T04:11:57.513Z (8 months ago)
- Topics: erlang, foreman, ldap, smartproxy
- Language: Erlang
- Size: 2.14 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Realm smart proxy for the Foreman
[](https://travis-ci.org/agx/ldapsp)
ldapsp is a simple smart proxy for the [Foreman][] that creates LDAP
entries on host creation and removes them on destroy. It uses
Foreman's realm [smart proxy API][].## Running
To run in development mode usemake shell
The proxy will then listen on port 8080. You can check this like
$ curl http://localhost:8080/features
["realm"]See *tests/test.sh* for more usage examples. To build releases,
etc. check the [rebar3][] documentation.## Configuration in the Foreman
Add the smart proxy via Foreman Web-GUI (Infrastructure → Smart
Proxies → New Smart Proxy). Foreman will detect the *realm* feature.## Configuration of ldapsp
*priv/ldapsp.config* has the ldap connection parameters while
*priv/policy.erl* determines how the created ldap entries will look
like. The default policy creates entries of the form:dn: cn=, dc=example, dc=com
objectclass: top
objectclass: groupOfUniqueNames
cn:
uniqueMember: cn=, dc=example, dc=comYou can replace the module with whatever [Erlang][] module you like as
long as it implements *add_host/3* and *del_host/2*.For SSL it's simplest to put e.g. apache in front of it.
[Foreman]: https://theforeman.org/
[rebar3]: https://www.rebar3.org/v3.0/docs
[smart proxy API]: http://projects.theforeman.org/projects/smart-proxy/wiki/API
[Erlang]: https://www.erlang.org/