Cloudogu EcoSystem Docs
Software version

Install and Configure the LDAP Mapper Component

This document describes how to run the LDAP mapper as a LOP component via the Helm chart in this repository.

The LDAP mapper is deployed exclusively via Helm. A Dogu CR or Component CR is not used.

Prerequisites

  • Kubernetes cluster with access via kubectl and helm
  • Target namespace, the examples below use ecosystem
  • Pull secret for registry.cloudogu.com, default: ces-container-registries
  • Global CES configuration as a ConfigMap, default name: global-config
  • Secret containing the backend LDAP credentials for the LDAP mapper's read-only service account
  • Optional: persistence for /var/ces/config so that local service accounts survive pod restarts

1. Provide the Global ConfigMap

The component reads global values via doguctl config --global, in particular domain. At least domain must be set.

Example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: global-config
  namespace: ecosystem
data:
  config.yaml: |
    domain: "ces.local"

Create it:

kubectl apply -f global-config.yaml

2. Create the Secret for the Backend LDAP

The LDAP mapper requires the credentials of a read-only service account for the configured backend LDAP. The secret is only referenced by the ldap-mapper; it is not created by the chart.

By default, the chart expects:

  • Secret name: lop-idp-ldap-ldap-mapper-sa
  • Username key: username
  • Password key: password

Example:

apiVersion: v1
kind: Secret
metadata:
  name: lop-idp-ldap-ldap-mapper-sa
  namespace: ecosystem
type: Opaque
stringData:
  username: "ldap-mapper"
  password: "<password>"

Create it:

kubectl apply -f ldap-mapper-backend-secret.yaml

Notes:

  • For the internal LOP IdP LDAP, username is typically just the technical account name, for example ldap-mapper.
  • For external LDAP servers, the value may be a full bind DN depending on the target system.
  • Backend account access should be read-only only.

3. Install via Helm

Install using the chart defaults:

helm upgrade --install ldap-mapper k8s/helm \
  --namespace ecosystem \
  --create-namespace

Install using a custom values file:

helm upgrade --install ldap-mapper k8s/helm \
  --namespace ecosystem \
  --create-namespace \
  -f my-values.yaml

Alternatively, you can use the existing Make target:

make helm-apply

4. Configuration Overview (values.yaml)

AreaKey in values.yamlRequiredEffect
GeneralreplicasNoNumber of pod replicas in the Deployment.
Image & Pullglobal.imagePullSecretsNoPull secret(s) for the container image.
Image & Pullimage.registryYesContainer registry of the LDAP mapper image.
Image & Pullimage.repositoryYesRepository of the LDAP mapper image.
Image & Pullimage.tagYesImage tag of the LDAP mapper container.
Image & Pullimage.pullPolicyYesPull behavior of the Kubernetes container.
Serviceservice.portYesLDAP frontend port of the LDAP mapper.
Backend LDAPconfiguration.backend.typeYesBackend type, for example embedded for the internal LDAP or external.
Backend LDAPconfiguration.backend.hostYesHostname or service name of the backend LDAP.
Backend LDAPconfiguration.backend.portYesPort of the backend LDAP.
Loggingconfiguration.logging.rootNoLog level of the LDAP mapper.
User Mappingconfiguration.mapping.user.base_dnNoExternal user base DN, empty means default based on domain.
User Mappingconfiguration.mapping.user.search_filterNoExternal user search filter.
User Mappingconfiguration.mapping.user.idNoAttribute mapping for the user ID.
User Mappingconfiguration.mapping.user.given_nameNoAttribute mapping for the given name.
User Mappingconfiguration.mapping.user.surnameNoAttribute mapping for the surname.
User Mappingconfiguration.mapping.user.full_nameNoAttribute mapping for the display name.
User Mappingconfiguration.mapping.user.mailNoAttribute mapping for the mail address.
User Mappingconfiguration.mapping.user.groupNoAttribute mapping for group references.
Group Mappingconfiguration.mapping.group.base_dnNoExternal group base DN, empty means default based on domain.
Group Mappingconfiguration.mapping.group.search_filterNoExternal group search filter.
Group Mappingconfiguration.mapping.group.nameNoAttribute mapping for the group name.
Group Mappingconfiguration.mapping.group.descriptionNoAttribute mapping for the group description.
Group Mappingconfiguration.mapping.group.memberNoAttribute mapping for group members.
Backend SecretsecretRefs.backendLdap.nameYesName of the secret containing the backend LDAP credentials.
Backend SecretsecretRefs.backendLdap.usernameKeyYesSecret key containing the username or bind DN.
Backend SecretsecretRefs.backendLdap.passwordKeyYesSecret key containing the password.
Persistencepersistence.sizeNoPVC size for /var/ces/config.
Persistencepersistence.storageClassNameNoStorageClass of the PVC.
Resourcesresources.requests.cpuRecommendedCPU request of the LDAP mapper container.
Resourcesresources.requests.memoryRecommendedMemory request of the LDAP mapper container.
Resourcesresources.limits.memoryRecommendedMemory limit of the LDAP mapper container.
SchedulingnodeSelectorNoNode selector that the LDAP mapper pods are constrained to.
SchedulingaffinityNoPod affinity/anti-affinity configuration.
SchedulingtolerationsNoPod tolerations for taints.
ExtensionextraEnvNoAdditional container environment variables.
ExtensionextraEnvNoAdditional container environment variables.
ExtensionextraVolumesNoExtra volumes that are added to the pod spec.
ExtensionextraVolumeMountsNoMount points for the volumes defined in extraVolumes.
ExtensionextraLabelsNoAdditional labels merged into every resource’s metadata.

Backend Secret Behavior

  • The backend secret is only referenced by the chart.
  • The LDAP mapper only starts meaningfully if host, port, and secret match each other.
  • For the internal LDAP component setup, the defaults are:
    • configuration.backend.type=embedded
    • configuration.backend.host=lop-idp-ldap
    • configuration.backend.port=389
    • secretRefs.backendLdap.name=lop-idp-ldap-ldap-mapper-sa

Persistence Behavior

  • Local LDAP mapper service accounts are stored in /var/ces/config/service_accounts.yaml.
  • A PVC is always used for /var/ces/config.
  • This allows local service accounts to survive pod restarts and regular rollouts.

5. Example Overrides

Example 1: Internal LOP IdP LDAP

configuration:
  backend:
    type: embedded
    host: lop-idp-ldap
    port: "389"

secretRefs:
  backendLdap:
    name: lop-idp-ldap-ldap-mapper-sa
    usernameKey: username
    passwordKey: password

Example 2: External LDAP

configuration:
  backend:
    type: external
    host: ldap.example.org
    port: "389"
  mapping:
    user:
      base_dn: "ou=Users,dc=example,dc=org"
      search_filter: "(objectclass=inetOrgPerson)"
    group:
      base_dn: "ou=Groups,dc=example,dc=org"
      search_filter: "(objectclass=groupOfNames)"

secretRefs:
  backendLdap:
    name: external-ldap-mapper-bind
    usernameKey: username
    passwordKey: password

Example 3: Mount host time configuration

Use extraVolumes, extraVolumeMounts and (optionally) extraEnv to mount the node’s /etc/timezone and /etc/localtime files into the container and keep the TZ variable in sync:

extraEnv:
  - name: TZ
    value: Europe/Berlin

extraVolumes:
  - name: timezone
    hostPath:
      path: /etc/timezone
      type: File
  - name: localtime
    hostPath:
      path: /etc/localtime
      type: File

extraVolumeMounts:
  - name: timezone
    mountPath: /etc/timezone
    readOnly: true
  - name: localtime
    mountPath: /etc/localtime
    readOnly: true

6. Uninstallation

helm uninstall ldap-mapper --namespace ecosystem

Alternatively:

make helm-delete

The PVC is retained or deleted automatically depending on the StorageClass reclaim policy.

Last updated on 3/23/2026