Testing the LDAP Mapper in Kubernetes
This guide describes a simple smoke test for the ldap-mapper in Kubernetes.
The steps apply regardless of whether the backend LDAP is provided by a Dogu or a component.
Prerequisites
- A running
ldap-mapperpod in namespaceecosystem - A reachable backend LDAP
kubectlwith the correct contextldapsearchavailable in theldap-mappercontainer
1. Create a temporary service account in the mapper
kubectl -n ecosystem exec deploy/ldap-mapper -- /create-sa.sh smoke-test-clientExample output:
bind_dn: uid=smoke-test-client,ou=service_accounts
password: <generated-password>These values are required for the LDAP bind against the mapper.
Note:
- After a redeploy of the
ldap-mapper, the test service account should be created again if/var/ces/configis not mounted persistently.
2. Search for a user through the mapper
kubectl -n ecosystem exec deploy/ldap-mapper -- sh -lc '
ldapsearch -o ldif-wrap=no -x \
-H ldap://127.0.0.1:3893 \
-D "uid=smoke-test-client,ou=service_accounts" \
-w "<generated-password>" \
-b "ou=People,dc=cloudogu,dc=com" \
"(&(objectclass=person)(uid=admin))" \
dn cn uid mail
'Expected result:
- successful bind against the mapper
- at least one hit for the requested user
- the public base DN of the mapper is the internal CES view, i.e.
ou=People,dc=cloudogu,dc=com
3. Search for a group through the mapper
kubectl -n ecosystem exec deploy/ldap-mapper -- sh -lc '
ldapsearch -o ldif-wrap=no -x \
-H ldap://127.0.0.1:3893 \
-D "uid=smoke-test-client,ou=service_accounts" \
-w "<generated-password>" \
-b "ou=Groups,dc=cloudogu,dc=com" \
"(&(objectclass=groupOfNames)(cn=cesAdmin))" \
dn cn description member
'Expected result:
- successful bind against the mapper
- at least one hit for the requested group
- the public base DN of the mapper is the internal CES view, i.e.
ou=Groups,dc=cloudogu,dc=com
4. Run the test locally via port-forward
Alternatively, the mapper can be exposed locally:
kubectl -n ecosystem port-forward svc/ldap-mapper 3893:3893You can then run the same test locally:
ldapsearch -o ldif-wrap=no -x \
-H ldap://127.0.0.1:3893 \
-D "uid=smoke-test-client,ou=service_accounts" \
-w "<generated-password>" \
-b "ou=People,dc=cloudogu,dc=com" \
"(&(objectclass=person)(uid=admin))" \
dn cn uid mail5. Remove the temporary test service account
kubectl -n ecosystem exec deploy/ldap-mapper -- /remove-sa.sh smoke-test-clientLast updated on 3/23/2026