diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ca980064eeeb7b454fef8ed265a0929ff8548a3..6eace1b7e1bb4ef1cebd8e4ed3f6b4afe0bce205 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ before_script: build:apt: extends: .build script: - - ./debian/create_changelog.py uffd-ldap > debian/changelog + - ./debian/create_changelog.py uffd-ldapd > debian/changelog - dpkg-buildpackage -us -uc - mv ../*.deb ./ - dpkg-deb -I *.deb @@ -36,9 +36,9 @@ linter:buster: script: - pip3 install $PYLINT_PIN pylint-gitlab # this force-updates jinja2 and some other packages! - pip3 install -r requirements.txt - - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter 'server.py' > codeclimate.json - - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter 'server.py' > pylint.html - - python3 -m pylint --rcfile .pylintrc --output-format=text 'server.py' + - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter 'uffd-ldapd' > codeclimate.json + - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter 'uffd-ldapd' > pylint.html + - python3 -m pylint --rcfile .pylintrc --output-format=text 'uffd-ldapd' artifacts: when: always paths: @@ -52,9 +52,9 @@ linter:bullseye: script: - pip3 install $PYLINT_PIN pylint-gitlab # this force-updates jinja2 and some other packages! - pip3 install -r requirements.txt - - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter 'server.py' > codeclimate.json - - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter 'server.py' > pylint.html - - python3 -m pylint --rcfile .pylintrc --output-format=text 'server.py' + - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter 'uffd-ldapd' > codeclimate.json + - python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter 'uffd-ldapd' > pylint.html + - python3 -m pylint --rcfile .pylintrc --output-format=text 'uffd-ldapd' artifacts: when: always paths: diff --git a/.pylintrc b/.pylintrc index 9745cc661f38be21873d3c850a683056c4d88531..86c7c867f74725784ebd9d590e7cfa40074f1982 100644 --- a/.pylintrc +++ b/.pylintrc @@ -65,6 +65,7 @@ disable=missing-module-docstring, missing-function-docstring, too-few-public-methods, too-many-arguments, + invalid-name, # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option diff --git a/README.md b/README.md index c496b54345880adc9f23fe961bd5cbd93b7fd4e4..60fb62d04e0da271535c28c15e3226c9bbf6c400 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ -LDAP Proxy for Uffd -=================== +Uffd LDAP Proxy Server +====================== -LDAP server that provides user and group data exposed by uffd's API. Based on python-ldapserver. +Proxy server to provide uffd user and group data via LDAP. +Based on [python-ldapserver](https://git.cccv.de/uffd/python-ldapserver). -Requires at least uffd v1.2.0! +To install uffd-ldapd on Debian, add the [uffd Debian repository](https://packages.cccv.de/uffd/) to `/etc/sources.list` and install the package `uffd-ldapd`. +Update the config file `/etc/uffd-ldapd.conf` and restart the service with `systemctl restart uffd-ldapd`. +The proxy server listens on `ldap://127.0.0.1:389/`. + +uffd-ldapd requires at least uffd v1.2.0! diff --git a/debian/contrib/uffd-ldap.conf b/debian/contrib/uffd-ldapd.conf similarity index 100% rename from debian/contrib/uffd-ldap.conf rename to debian/contrib/uffd-ldapd.conf diff --git a/debian/contrib/uffd-ldap.service b/debian/contrib/uffd-ldapd.service similarity index 77% rename from debian/contrib/uffd-ldap.service rename to debian/contrib/uffd-ldapd.service index c905a435bdb5ce2d30ea38c41b353a044c3400a7..ad84cb613bdce48db5aa3947627a7d70ec2b01fd 100644 --- a/debian/contrib/uffd-ldap.service +++ b/debian/contrib/uffd-ldapd.service @@ -1,16 +1,16 @@ [Unit] -Description=LDAP server to integrate uffd users/groups with LDAP applications +Description=Proxy server to provide uffd user and group data via LDAP After=network.target -BindsTo=uffd-ldap.socket +BindsTo=uffd-ldapd.socket [Service] -ExecStart=/usr/bin/uffd-ldap --socket-fd 3 +ExecStart=/usr/sbin/uffd-ldapd --socket-fd 3 Restart=always RestartSec=10 StandardOutput=journal StandardError=journal -SyslogIdentifier=uffd-ldap +SyslogIdentifier=uffd-ldapd DynamicUser=true PrivateUsers=true @@ -37,7 +37,7 @@ SystemCallArchitectures=native SystemCallFilter=@system-service MemoryDenyWriteExecute=true -EnvironmentFile=/etc/uffd-ldap.conf +EnvironmentFile=/etc/uffd-ldapd.conf [Install] WantedBy=default.target diff --git a/debian/contrib/uffd-ldap.socket b/debian/contrib/uffd-ldapd.socket similarity index 50% rename from debian/contrib/uffd-ldap.socket rename to debian/contrib/uffd-ldapd.socket index 01552cf46142ac5014b61262bc8d4bbfe4630bbb..7928a81e8062f8a94f905d80dba012241126e4ab 100644 --- a/debian/contrib/uffd-ldap.socket +++ b/debian/contrib/uffd-ldapd.socket @@ -1,5 +1,5 @@ [Unit] -Description=LDAP server to integrate uffd users/groups with LDAP applications +Description=Proxy server to provide uffd user and group data via LDAP [Socket] ListenStream=127.0.0.1:389 diff --git a/debian/control b/debian/control index 446b49f4339f65c51cde9389dc4702d68cce2be5..8f88951d3e6e6a679ce9fe10c1f1afbe4bfd8fdc 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,14 @@ -Source: uffd-ldap +Source: uffd-ldapd Section: python Priority: optional Maintainer: CCCV <it@cccv.de> Build-Depends: debhelper-compat (= 12), Standards-Version: 4.5.0 -Homepage: https://git.cccv.de/uffd/ldap-proxy -Vcs-Git: https://git.cccv.de/uffd/ldap-proxy.git +Homepage: https://git.cccv.de/uffd/uffd-ldapd +Vcs-Git: https://git.cccv.de/uffd/uffd-ldapd.git -Package: uffd-ldap +Package: uffd-ldapd Architecture: all Depends: ${misc:Depends}, @@ -16,4 +16,4 @@ Depends: python3-requests, python3-cachecontrol, python3-click, -Description: LDAP server to integrate uffd users/groups with LDAP applications +Description: Proxy server to provide uffd user and group data via LDAP diff --git a/debian/install b/debian/install index 554842bcc5eaeac52fc8401e4804e37d5c302754..944fa151cca7c58ab42388790aa4c7cfd94309dd 100644 --- a/debian/install +++ b/debian/install @@ -1,4 +1,4 @@ -server.py /usr/lib/uffd-ldap/ -debian/contrib/uffd-ldap.service /usr/lib/systemd/system/ -debian/contrib/uffd-ldap.socket /usr/lib/systemd/system/ -debian/contrib/uffd-ldap.conf /etc/ +uffd-ldapd /usr/sbin/ +debian/contrib/uffd-ldapd.service /usr/lib/systemd/system/ +debian/contrib/uffd-ldapd.socket /usr/lib/systemd/system/ +debian/contrib/uffd-ldapd.conf /etc/ diff --git a/debian/links b/debian/links deleted file mode 100644 index 90e1e14bb92c9e76084c6b8ca1afa8974a87a041..0000000000000000000000000000000000000000 --- a/debian/links +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/uffd-ldap/server.py /usr/bin/uffd-ldap diff --git a/debian/postinst b/debian/postinst index e0121c1bf36806d4a15616c67b05a9d88a4adaa1..a89c052a6c6cf4e39af228890b6e2125cc46eadc 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e case "$1" in configure) - chmod 0640 /etc/uffd-ldap.conf + chmod 0640 /etc/uffd-ldapd.conf ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/server.py b/uffd-ldapd similarity index 100% rename from server.py rename to uffd-ldapd