No description
Find a file
2021-12-21 17:07:56 +01:00
ldap_frontend add CSRF validation 2021-12-21 16:57:39 +01:00
.gitignore initial commit 2021-12-21 08:30:36 +01:00
LICENCE add LICENCE and README.md 2021-12-21 17:07:56 +01:00
README.md add LICENCE and README.md 2021-12-21 17:07:56 +01:00
requirements.txt add CSRF validation 2021-12-21 16:57:39 +01:00

ldap frontend for Queeres Zentrum Wiesbaden

Licenced under CC BY-NC-SA 4.0. See LICENCE file for full licence text.

Setting it up

config.json

{
    "ldap": {
        "server": "ldap://localhost:389",
        "username": "uid=ldap-frontend,ou=Applications,dc=qzwi,dc=de",
        "password": "my_super_secure_password",
        "group_base": "ou=Groups,dc=qzwi,dc=de",
        "user_base": "ou=Users,dc=qzwi,dc=de"
    },
    "template": {
        "group_admin": "(&(objectclass=inetOrgPerson)(uid={})(memberOf=ou=qzwi-admins,ou=Groups,dc=qzwi,dc=de))",
        "group_dn": "ou={},ou=Groups,dc=qzwi,dc=de",
        "group_members": "(&(objectclass=inetOrgPerson)(memberOf=ou={},ou=Groups,dc=qzwi,dc=de))",
        "group_nonmembers": "(&(objectclass=inetOrgPerson)(!(memberOf=ou={},ou=Groups,dc=qzwi,dc=de)))",
        "user_dn": "uid={},ou=Users,dc=qzwi,dc=de",
        "user_search": "(&(objectclass=inetOrgPerson)(uid={}))"
    },
    "title": "Usermanagement QZWI"
}

ldap-frontend.service

[Unit]
Description=LDAP frontend
After=network.target
Requires=slapd.service # remove this if your server is not running on same machine

[Service]
User=www-data
Group=www-data
Environment=APP_CONFIG=/opt/ldap-frontend/config.json
Environment=FLASK_SECRET_KEY=reallysecure
WorkingDirectory=/opt/ldap-frontend/src
ExecStart=/opt/ldap-frontend/venv/bin/gunicorn --threads 4 --bind 127.0.0.1:23000 'ldap_frontend:app'

[Install]
WantedBy=multi-user.target