diff --git a/.github/workflows/docker-build-static.yml b/.github/workflows/docker-build-static.yml index 22c6908..0cb13f9 100644 --- a/.github/workflows/docker-build-static.yml +++ b/.github/workflows/docker-build-static.yml @@ -80,7 +80,7 @@ jobs: restore-keys: | lldap-ui- - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 - name: install rollup nodejs run: npm install -g rollup - name: install wasm-pack with cargo @@ -119,7 +119,7 @@ jobs: - name: smoke test run: rustc --version - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 - uses: actions/cache@v3 with: path: | @@ -164,11 +164,11 @@ jobs: CARGO_HOME: ${GITHUB_WORKSPACE}/.cargo steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 - name: smoke test run: rustc --version - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 - uses: actions/cache@v3 with: path: | @@ -214,7 +214,7 @@ jobs: CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: x86_64-linux-musl-gcc steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 - uses: actions/cache@v3 with: path: | @@ -262,7 +262,7 @@ jobs: - name: install rsync run: sudo apt update && sudo apt install -y rsync - name: fetch repo - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 - name: Download armhf lldap artifacts uses: actions/download-artifact@v3 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 71a7949..bf4ebb1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -34,7 +34,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v3.1.0 - uses: Swatinem/rust-cache@v1 - name: Build run: cargo build --verbose --workspace @@ -53,7 +53,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v3.1.0 - uses: Swatinem/rust-cache@v1 @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v3.1.0 - uses: Swatinem/rust-cache@v1 @@ -87,7 +87,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v3.1.0 - name: Install Rust run: rustup toolchain install nightly --component llvm-tools-preview && rustup component add llvm-tools-preview --toolchain stable-x86_64-unknown-linux-gnu diff --git a/CHANGELOG.md b/CHANGELOG.md index 0488826..1a42a54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.1] - 2022-10-10 + +### Added + + - Added support for STARTTLS for SMTP. + - Added support for user profile pictures, including importing them from OpenLDAP. + - Added support for every config value to be specified in a file. + - Added support for PKCS1 keys. + +### Changed + + - The `dn` attribute is no longer returned as an attribute (it's still part of the response). + - Empty attributes are no longer returned. + - The docker image now uses the locally-downloaded assets. + ## [0.4.0] - 2022-07-08 ### Breaking diff --git a/Cargo.lock b/Cargo.lock index 5f894f5..2f3efda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2100,7 +2100,7 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "lldap" -version = "0.4.0" +version = "0.4.2-alpha" dependencies = [ "actix", "actix-files", @@ -2166,7 +2166,7 @@ dependencies = [ [[package]] name = "lldap_app" -version = "0.4.0" +version = "0.4.2-alpha" dependencies = [ "anyhow", "base64", @@ -2285,7 +2285,7 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "migration-tool" -version = "0.3.0-alpha.1" +version = "0.4.2-alpha" dependencies = [ "anyhow", "base64", diff --git a/README.md b/README.md index 8c27493..a7fcc4c 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,11 @@ variables `LLDAP_JWT_SECRET_FILE` or `LLDAP_LDAP_USER_PASS_FILE`, and the file contents are loaded into the respective configuration parameters. Note that `_FILE` variables take precedence. -Example for docker compose for `:stable` tag: -* When defined with `user: ##:##` , ensure `/data` directory had permission for the defined user, else `1000:1000` used. +Example for docker compose: +* You can use either the `:latest` tag image or `:stable` as used in this example. +* `:latest` tag image contains recently pushed code or feature tests, in which some instability can be expected. +* If `UID` and `GID` no defined LLDAP will use default `UID` and `GID` number `1000` + ```yaml version: '3' @@ -110,37 +113,6 @@ volumes: services: lldap: image: nitnelave/lldap:stable - # Change this to the user:group you want. - user: "33:33" - ports: - # For LDAP - - "3890:3890" - # For the web front-end - - "17170:17170" - volumes: - - "lldap_data:/data" - # Alternatively, you can mount a local folder - # - "./lldap_data:/data" - environment: - - LLDAP_JWT_SECRET=REPLACE_WITH_RANDOM - - LLDAP_LDAP_USER_PASS=REPLACE_WITH_PASSWORD - - LLDAP_LDAP_BASE_DN=dc=example,dc=com -``` - -Example for docker compose for `:latest` tag: -* `:latest` tag image contain recent pushed codes or feature test, breaks is expected. -* If `UID` and `GID` no defined LLDAP will use default `UID` and `GID` number `1000` - -```yaml -version: '3' - -volumes: - lldap_data: - driver: local - -services: - lldap: - image: nitnelave/lldap:latest ports: # For LDAP - "3890:3890" @@ -256,10 +228,12 @@ folder for help with: - [Authelia](example_configs/authelia_config.yml) - [Bookstack](example_configs/bookstack.env.example) - [Calibre-Web](example_configs/calibre_web.md) + - [Dokuwiki](example_configs/dokuwiki.md) - [Dolibarr](example_configs/dolibarr.md) - [Emby](example_configs/emby.md) - [Gitea](example_configs/gitea.md) - [Grafana](example_configs/grafana_ldap_config.toml) + - [Hedgedoc](example_configs/hedgedoc.md) - [Jellyfin](example_configs/jellyfin.md) - [Jitsi Meet](example_configs/jitsi_meet.conf) - [KeyCloak](example_configs/keycloak.md) diff --git a/app/Cargo.toml b/app/Cargo.toml index 5ff4197..d41c0a6 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lldap_app" -version = "0.4.0" +version = "0.4.2-alpha" authors = ["Valentin Tolmer <valentin@tolmer.fr>"] edition = "2021" diff --git a/example_configs/dokuwiki.md b/example_configs/dokuwiki.md new file mode 100644 index 0000000..1f54547 --- /dev/null +++ b/example_configs/dokuwiki.md @@ -0,0 +1,25 @@ +# Configuration for dokuwiki + +LDAP configuration is in ```/dokuwiki/conf/local.protected.php```: + +``` +<?php +$conf['useacl'] = 1; //enable ACL +$conf['authtype'] = 'authldap'; //enable this Auth plugin +$conf['plugin']['authldap']['server'] = 'ldap://lldap_server:3890'; #IP of your lldap +$conf['plugin']['authldap']['usertree'] = 'ou=people,dc=example,dc=com'; +$conf['plugin']['authldap']['grouptree'] = 'ou=groups, dc=example, dc=com'; +$conf['plugin']['authldap']['userfilter'] = '(&(uid=%{user})(objectClass=person))'; +$conf['plugin']['authldap']['groupfilter'] = '(&(objectClass=group)(memberUID=member))'; +$conf['plugin']['authldap']['attributes'] = array('cn', 'displayname', 'mail', 'givenname', 'objectclass', 'sn', 'uid', 'memberof'); +$conf['plugin']['authldap']['version'] = 3; +$conf['plugin']['authldap']['binddn'] = 'cn=admin,ou=people,dc=example,dc=com'; +$conf['plugin']['authldap']['bindpw'] = 'ENTER_YOUR_LLDAP_PASSWORD'; +``` + +DokuWiki by default, ships with an LDAP Authentication Plugin called ```authLDAP``` that allows authentication against an LDAP directory. +All you need to do is to activate the plugin. This can be done on the DokuWiki Extensions Manager. + +Once the LDAP settings are defined, proceed to define the default authentication method. +Navigate to Table of Contents > DokuWiki > Authentication. +On the Authentication backend, select ```authldap``` and save the changes. diff --git a/example_configs/hedgedoc.md b/example_configs/hedgedoc.md new file mode 100644 index 0000000..de36c90 --- /dev/null +++ b/example_configs/hedgedoc.md @@ -0,0 +1,16 @@ +# Configuration for hedgedoc + +[Hedgedoc](https://hedgedoc.org/) is a platform to write and share markdown. + +### Using docker variables + +Any member of the group ```hedgedoc``` can log into hedgedoc. +``` +- CMD_LDAP_URL=ldap://lldap:3890 +- CMD_LDAP_BINDDN=uid=admin,ou=people,dc=example,dc=com +- CMD_LDAP_BINDCREDENTIALS=insert_your_password +- CMD_LDAP_SEARCHBASE=ou=people,dc=example,dc=com +- CMD_LDAP_SEARCHFILTER=(&(memberOf=cn=hedgedoc,ou=groups,dc=example,dc=com)(uid={{username}})) +- CMD_LDAP_USERIDFIELD=uid +``` +Replace `dc=example,dc=com` with your LLDAP configured domain for all occurances diff --git a/migration-tool/Cargo.toml b/migration-tool/Cargo.toml index 852002f..019f509 100644 --- a/migration-tool/Cargo.toml +++ b/migration-tool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "migration-tool" -version = "0.3.0-alpha.1" +version = "0.4.2-alpha" edition = "2021" authors = ["Valentin Tolmer <valentin@tolmer.fr>"] diff --git a/server/Cargo.toml b/server/Cargo.toml index 9fb2c77..6e8af52 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Valentin Tolmer <valentin@tolmer.fr>"] edition = "2021" name = "lldap" -version = "0.4.0" +version = "0.4.2-alpha" [dependencies] actix = "0.12"