From cd1790972e44d341f85a53ea0a352387f9d64348 Mon Sep 17 00:00:00 2001 From: selfhoster1312 Date: Fri, 21 Aug 2026 12:12:50 +0200 Subject: [PATCH] meta: Rename ldap-rp (that one's available) --- Cargo.lock | 38 +++++++++++++++++++------------------- Cargo.toml | 2 +- README.md | 13 +++++++------ src/config.rs | 4 ++-- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28f88df..cb8a19d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -718,6 +718,25 @@ dependencies = [ "nom", ] +[[package]] +name = "ldap-rp" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "futures-util", + "indexmap 2.14.0", + "ldap3", + "ldap3_proto", + "log", + "pretty_env_logger", + "serde", + "tokio", + "tokio-listener", + "tokio-util", + "toml", +] + [[package]] name = "ldap3" version = "0.12.1" @@ -814,25 +833,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "multildap" -version = "0.1.0" -dependencies = [ - "anyhow", - "clap", - "futures-util", - "indexmap 2.14.0", - "ldap3", - "ldap3_proto", - "log", - "pretty_env_logger", - "serde", - "tokio", - "tokio-listener", - "tokio-util", - "toml", -] - [[package]] name = "nix" version = "0.26.4" diff --git a/Cargo.toml b/Cargo.toml index 88772a3..aa0f7a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "multildap" +name = "ldap-rp" version = "0.1.0" edition = "2024" diff --git a/README.md b/README.md index 44e38e1..c990a7e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# multildap +# ldap-rp Proxy LDAP requests to different LDAP servers based on base DN. Based on code from [kanidm/ldap-proxy](https://github.com/kanidm/ldap-proxy/) under the [MPL license](LICENSE.md). @@ -8,6 +8,7 @@ Proxy LDAP requests to different LDAP servers based on base DN. Based on code fr - [x] LDAP bind requests - [x] LDAP search requests - [x] Configurable listening port +- [ ] Default fallback to `/etc/ldap-rp/config.toml` - [x] Unix Domain Socket support (incoming requests) - [ ] Unix Domain Socket garbage collection (incoming requests) - [ ] Unix Domain Socket support (outgoing requests) @@ -36,13 +37,13 @@ to = "example.com" backend = "127.0.0.1:5389" ``` -By default, `multildap` will look for a config file in `/etc/multildap/config.toml` but you can change that -with the `--config` CLI flag. +~~By default, `ldap-rp` will look for a config file in `/etc/ldap-rp/config.toml` but you can change that +with the `--config` CLI flag.~~ You can now run: ``` -multildap --config config.toml +ldap-rp --config config.toml ``` # Testing your setup @@ -52,7 +53,7 @@ Once you have a LDAP server running, you can test your settings with the `ldapwh ```bash # Test when listening on port 3389 ldapwhoami -H ldap://localhost:3389 -D "cn=b,ou=people,dc=a,dc=localhost" -W -# Test when listening on socket /run/multildap/multildap.sock, where `/` is escaped +# Test when listening on socket /run/ldap-rp/ldap-rp.sock, where `/` is escaped # with `%2F` and the protocol is changed to `ldapi` -ldapwhoami -H ldapi://%2Frun%2Fmultildap%2Fmultildap.sock -D "cn=b,ou=people,dc=a,dc=localhost" -W +ldapwhoami -H ldapi://%2Frun%2Fldap-rp%2Fldap-rp.sock -D "cn=b,ou=people,dc=a,dc=localhost" -W ``` diff --git a/src/config.rs b/src/config.rs index 27b2d13..4366047 100644 --- a/src/config.rs +++ b/src/config.rs @@ -25,11 +25,11 @@ impl Config { ListenerAddress::Path(p) => { if tokio::fs::try_exists(p).await? { warn!( - "Socket {} already exists, probably because multildap was not shut down correctly.", + "Socket {} already exists, probably because ldap-rp was not shut down correctly.", p.display() ); warn!( - "If another multildap instance is still listening on there, it will no longer receive new connections." + "If another ldap-rp instance is still listening on there, it will no longer receive new connections." ); } listen