https://github.com/gopenguin/minimal-ldap-proxy
Proxy ldap authentication requests to a database backend
https://github.com/gopenguin/minimal-ldap-proxy
databases golang ldap-authentication ldap-server
Last synced: 5 months ago
JSON representation
Proxy ldap authentication requests to a database backend
- Host: GitHub
- URL: https://github.com/gopenguin/minimal-ldap-proxy
- Owner: gopenguin
- License: mit
- Created: 2018-04-22T15:23:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-26T18:56:38.000Z (almost 7 years ago)
- Last Synced: 2024-06-20T19:19:22.255Z (10 months ago)
- Topics: databases, golang, ldap-authentication, ldap-server
- Language: Go
- Size: 43 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minimal-ldap-proxy
Proxy ldap authentication requests to a database backend## Getting started
For local testing you can use a `sqlite` database. You can create with the following commands:
```sh
sqlite3 test.db '
CREATE TABLE "users"
(
id INTEGER not null primary key autoincrement,
name TEXT not null unique,
password TEXT not null,
gname TEXT not null,
sname TEXT not null,
email TEXT NULL
);
CREATE TABLE groups
(
id integer PRIMARY KEY AUTOINCREMENT,
name text NOT NULL
);
CREATE TABLE user_groups
(
user_id integer NOT NULL,
group_id integer NOT NULL,
CONSTRAINT user_groups_user_id_group_id_pk PRIMARY KEY (user_id, group_id)
);
sqlite3 test.db ''
'
``````yaml
driver: sqlite3
conn: "./test.db"
authQuery: "select password from users where name = ?"
searchQuery: "select u.name as cn, u.gname as gn, u.sname as sn, u.email as mail, g.name as memberOf from users as u join user_groups as ug on (u.id = ug.user_id) join groups as g on (g.id = ug.group_id) where u.name = ?"
attributes:
- cn
- gn
- sn
- memberOf
baseDn: "ou=People,dc=example,dc=com"
rdn: "cn"
```