Cloudogu EcoSystem Docs
Software version

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-mapper pod in namespace ecosystem
  • A reachable backend LDAP
  • kubectl with the correct context
  • ldapsearch available in the ldap-mapper container

1. Create a temporary service account in the mapper

kubectl -n ecosystem exec deploy/ldap-mapper -- /create-sa.sh smoke-test-client

Example 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/config is 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:3893

You 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 mail

5. Remove the temporary test service account

kubectl -n ecosystem exec deploy/ldap-mapper -- /remove-sa.sh smoke-test-client

Last updated on 3/23/2026