A fast, simple, in-memory caching proxy for ldap that allows limiting of dn's and their searches.
  • Rust 94.2%
  • Dockerfile 3.1%
  • Shell 2.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] 023e10b22b
Bump tokio from 1.53.3 to 1.54.1 in the all group (#168)
Bumps the all group with 1 update: [tokio](https://github.com/tokio-rs/tokio).


Updates `tokio` from 1.53.3 to 1.54.1
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.53.3...tokio-1.54.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.54.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 08:51:20 +10:00
.github Bump mozilla-actions/sccache-action in the all group (#157) 2026-08-03 12:48:35 +10:00
scripts fixing dependabot automerge (#33) 2024-05-28 11:49:44 +10:00
src Bump the all group with 3 updates (#153) 2026-06-29 12:47:39 +10:00
tests Proxy header demo complete (#82) 2025-04-04 12:50:27 +10:00
.gitignore Updates 'n testing (#3) 2023-12-08 09:12:34 +10:00
Cargo.lock Bump tokio from 1.53.3 to 1.54.1 in the all group (#168) 2026-10-26 08:51:20 +10:00
Cargo.toml Bump the all group with 3 updates (#153) 2026-06-29 12:47:39 +10:00
CODE_OF_CONDUCT.md Initial 2023-09-02 08:59:42 +10:00
config.toml Add support for allowing all dns 2023-09-09 09:59:35 +10:00
Dockerfile 20260408 Fixes search handling to allow clients that search without binding. (#140) 2026-04-08 16:48:18 +10:00
ldap-proxy.service Updates 'n testing (#3) 2023-12-08 09:12:34 +10:00
LICENSE.md Initial 2023-09-02 08:59:42 +10:00
make.sh Updates 'n testing (#3) 2023-12-08 09:12:34 +10:00
README.md 20260408 allow dn rebinding (#139) 2026-04-08 15:19:25 +10:00

Ldap Proxy

A fast, simple, in-memory caching proxy for ldap that allows limiting of dn's and their searches.

# /data/config.toml for containers.
# /etc/ldap-proxy/config.toml for packaged versions.

bind = "127.0.0.1:3636"
tls_chain = "/tmp/chain.pem"
tls_key = "/tmp/key.pem"

# Number of bytes of entries to store in the cache
# cache_bytes = 137438953472
# Seconds that entries remain valid in cache
# cache_entry_timeout = 1800

# The max ber size of requests from clients
# max_incoming_ber_size = 8388608
# The max ber size of responses from the upstream ldap server
# max_proxy_ber_size = 8388608

# By default only DNs listed in the bind-maps may bind. All other
# DNs that do not have a bind-map entry may not proceed. Setting
# this allows all DNs to bind through the server. When this is
# true, if the DN has a bind-map it will filter the queries of that
# DN. If the DN does not have a bind map, it allows all queries.
#
# Another way to think of this is that setting this to "false"
# makes this an ldap firewall. Setting this to "true" turns this
# into a search-caching proxy.
#
# allow_all_bind_dns = false

ldap_ca = "/tmp/ldap-ca.pem"
ldap_url = "ldaps://idm.example.com"


# Bind Maps
#
# This allows you to configure which DNs can bind, and what search
# queries they may perform.
#
# "" is the anonymous dn
[""]
allowed_queries = [
    ["", "base", "(objectclass=*)"],
    ["o=example", "subtree", "(objectclass=*)"],
]

# In some cases you may want to map anonymous to an authenticated dn. This allows
# setting the dn and credential that will be used in the mapping.
#
# map_to_dn: "uid=remote_user"
# map_to_secret: "12345"

["cn=Administrator"]
# If you don't specify allowed queries, all queries are granted

["cn=user"]
allowed_queries = [
    ["", "base", "(objectclass=*)"],
]

Where do I get it?

  • docker: docker pull firstyear/ldap-proxy:latest
  • podman: podman pull docker.io/firstyear/ldap-proxy:latest