Skip to main content

LemonLDAP::NG (lemonldap-ng)

WebSSO of the platform, alternative to Keycloak: OpenID Connect provider of the portal and of the Control Plane over the LDAP or Active Directory of the bank, roles from the groups, TOTP, sessions shared in PostgreSQL.

Generated from catalog/services/lemonldap-ng.yaml: do not edit by hand.

Summary​

Version2.23.4
Useinstall and configure, configure and connect
Layerfunctional (AI catalog)
CategoryIdentity and secrets
Installation methodspodman
External connectionoidc
Sandbox onlyno

Licence​

SPDX identifierGPL-2.0-or-later
Licence policylicence exception
Licence exceptionLEX-034 (pending, awaiting the client)
Platform componentlemonldap-ng

Packages and artifacts​

A package the project of the service publishes (its image, its binary archive, its Python or OS package) carries the licence of the service; a third-party package carries the licence written on its row, read from the official upstream metadata.

KindPackageVersionLicenceDetails
container imagedocker.io/lemonldapng/lemonldap-ng2.23.4GPL-2.0-or-laterimage key lemonldap-ng, used by schema, portal, digest sha256:f5286ec04f74ab91a17cb1b52ed23dea07a6b964dc027740889b579b0d9711b6

Images are pinned by tag in the descriptor, and by digest when the descriptor declares one (the offline bundle then refuses a pulled image that does not carry it); the digest is recorded in the mirror of the Manager when the offline bundle is imported, and every pull or load is checked against it.

Supported systems and architectures​

MethodOperating systemsArchitectures
podmanRHEL family (dnf), Debian family (apt), Arch Linux (pacman)x86_64, aarch64 (not restricted by the descriptor)

Certified host systems: RHEL 8/9/10, Rocky Linux 8/9/10, AlmaLinux 8/9/10, Oracle Linux 8/9, CentOS Stream 9/10, Ubuntu 22.04/24.04, Debian 12, Arch Linux (rolling). The host preflight accepts these systems (other releases of a known family give a warning, end of life releases are refused) and the x86_64 and aarch64 architectures.

Prerequisites​

Host​

  • at least 1024 MB of memory (blocking, memory).

Network and ports​

ComponentPort namePortOpened in the host firewall
portalhttp8543/tcpyes

Services and connections needed​

Details and resolution: see Dependencies.

Installation methods and modes​

MethodDefaultWhat the method uses
podmanyesthe container images of the descriptor, run by Podman under systemd

Components​

ComponentKindInstallation methodsPorts
Session tables (schema)one shotpodman-
Portal (portal)masterpodman8543/tcp

Single node (standalone) (default)​

One portal node.

What the mode deploys:

ComponentPlacement
schemamin 1, max 1
portalmin 1, max 1

Cluster (cluster)​

Several portal nodes behind a load balancer, sharing the sessions in PostgreSQL; the public URL is the one of the load balancer.

What the mode deploys:

ComponentPlacement
schemamin 1, max 1
portalmin 2, recommended 2

Install this service​

The install wizard of the Navin Manager plans, validates and runs the installation; you need the services:install permission on the cluster.

  1. Open the wizard. In Clusters, choose the row action Install services of the target cluster. The wizard opens on its first step, Service.

  2. Choose the service. On the Service step, select LemonLDAP::NG. The card shows the licence GPL-2.0-or-later and the dependencies the installation needs. To register an existing oidc service of your organisation instead, turn on Use an existing external service.

  3. Choose the hosts and the mode. On the Hosts step, tick the hosts, then choose the Mode: standalone (default), cluster. Each mode deploys the components listed in Installation methods and modes. With several components, place each one on its hosts in Component placement (Suggest placement proposes a placement that respects the cardinalities).

  4. Bind the dependencies. On the Bindings step, choose for each dependency (database, directory) Install with the platform or Use an existing connection; an optional dependency can stay on No binding.

  5. Configure. On the Configure step, review the parameters (see Configuration parameters); the required ones are users_base. Passwords left empty with a generated default are generated and sealed by the Manager.

  6. Review and install. On the Install step the Manager validates the plan and shows the installation order; when it says "The plan is valid. Ready to install.", choose Install. A highly available mode is installed only when its HA checks pass.

  7. Verify. The operation ends when the health checks of every instance pass (see Health checks); the service then shows as running in Services.

Connect an existing service​

Schemeshttps, http
Default port443
Authenticationrequired
Health check/.well-known/openid-configuration
Authentication methodFieldsDescription
client_credentialsclient_id, client_secretConfidential OpenID Connect client of the portal (client ID and secret, authentication client_secret_basic): the Manager checks them at the token endpoint; the client credentials grant does not need to be allowed.

Official documentation: https://lemonldap-ng.org/documentation/latest/idpopenidconnect.html

High availability​

Clusterreplicas (replication)
High availabilityexternal (external)
Failoverload balancer (load-balancer)
Replicationshared store (shared-store)
Quorumnone (none)
Discoverynone (none)
Entry pointload balancer (load-balancer)
Official documentationhttps://lemonldap-ng.org/documentation/latest/highavailability.html

Prerequisites​

PrerequisiteMust be highly availableModesDescription
databaseyesmodes of level ha or clusterHighly available PostgreSQL holding the sessions of every portal node.

Topology per mode​

ModesHighest catalog levelDistributionQuorum componentFault domainsDescription
standalonestandalone (standalone)single (single)-1One portal node, no fault tolerance.
clusterha (ha)active-active (active-active)-2Portal nodes with the same configuration, sharing the sessions in PostgreSQL, behind a load balancer.

Notes​

  • The portal nodes do not talk to each other: their availability is the one of PostgreSQL, of the directory and of the load balancer.
  • In mode cluster the nodes keep no local cache of the sessions: every session, code and token is read from PostgreSQL, so a request may reach any node. Each node purges the expired sessions every hour.

Configuration parameters​

Network​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Portal port (port)port8543-nonoyesPort of the login pages and of the OpenID Connect endpoints (HTTPS when TLS is on, else HTTP).
TLS (tls_enabled)booltrue-nonoyesServe HTTPS with a certificate of the Manager CA (plain HTTP only behind a TLS load balancer).
Public URL (public_url)urlhttps://{{ host.fqdn }}:{{ config.port }}-nononoAddress of the portal for the browsers and the Control Plane, the issuer of the tokens (the load balancer in mode cluster).

Directory​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Users base DN (users_base)string--yesnonoSubtree of the directory searched for the users, for example ou=people,dc=bank,dc=internal.
Directory kind (directory_kind)enumopenldapopenldap, active_directorynononoopenldap: inetOrgPerson users (uid) and groupOfNames groups; active_directory: person users (sAMAccountName), group groups and the password rules of Active Directory.
Login attribute (login_attribute)string(empty)^([A-Za-z][A-Za-z0-9-]{0,63})?$nononoAttribute matched with the login typed by the user (empty: uid, or sAMAccountName for Active Directory).
User filter (user_filter)string(empty)-nononoLDAP filter of the users, $user being the login (empty: the login attribute and the object class of the directory kind).
Groups base DN (groups_base)string(empty)-nononoSubtree searched for the groups of a user (empty: the users base DN).
Group object class (group_object_class)string(empty)^([A-Za-z][A-Za-z0-9-]{0,63})?$nononoObject class of the groups (empty: groupOfNames, or group for Active Directory).
Member attribute (group_member_attribute)stringmember^[A-Za-z][A-Za-z0-9-]{0,63}$nononoAttribute of a group listing its members: their DN (member, uniqueMember), or their login for memberUid.
Nested groups (nested_groups)boolfalse-nononoAlso give the groups that contain the groups of the user.
Roles of the groups (role_groups)json{"platform_admin": "navin-platform-admins", "tenant_admin": "navin-tenant-admins", "security_officer": "navin-security-officers", "finops": "navin-finops", "developer": "navin-developers", "auditor": "navin-auditors"}-nononoPlatform role given to the members of each directory group (role: name of the group); every user also has the role viewer.
Organisation attribute (tenant_attribute)string(empty)^([A-Za-z][A-Za-z0-9-]{0,63})?$nononoDirectory attribute holding the identifier (slug) of the organisation of the user, given in the claim tenant.
Default organisation (default_tenant)string(empty)^([a-z0-9][a-z0-9-]{0,62})?$nononoOrganisation (slug) of the users whose organisation attribute is empty (empty: none).
Clearance attribute (clearance_attribute)string(empty)^([A-Za-z][A-Za-z0-9-]{0,63})?$nononoDirectory attribute holding the classification level of the user (public, internal, confidential, restricted or secret), given in the claim clearance (empty: internal for every user).

Clients​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
Portal URL (portal_url)urlhttps://{{ host.fqdn }}:3000-nononoAddress of the Navin Enterprise portal: its /auth/callback is the only redirect URI of the client portal.
Portal client (portal_client_id)stringportal^[A-Za-z0-9._-]{1,64}$nononoClient identifier of the portal (portal_client_id of Navin Enterprise).
Control Plane audience (audience)stringcontrol-plane^[A-Za-z0-9._-]{1,64}$nononoAudience added to the access tokens of the portal (oidc_audience of Navin Enterprise).
Other clients (extra_clients)json[]-noyesnoOther OpenID Connect clients, for example the BFF of a sector agent: a list of {"client_id", "redirect_uris", "secret", "audiences", "post_logout_redirect_uris"}; a client without secret is public. Every client uses PKCE S256.

Security​

ParameterTypeDefaultAllowed valuesRequiredSecretRestartDescription
TOTP required (mfa_required)booltrue-nononoEvery user registers a TOTP application at the first login, then gives a code at each login.
Session lifetime (s) (session_timeout_s)int36000min 900, max 86400nononoMaximum lifetime of an SSO session, in seconds.
Idle timeout (s) (idle_timeout_s)int1800min 300, max 28800nononoAn SSO session without activity for this many seconds ends.
Token lifetime (s) (access_token_ttl_s)int300min 60, max 3600nononoLifetime of the access and ID tokens, in seconds.
Token signing key (signing_key)passwordgenerated-noyesyesRSA 3072 bit private key that signs the tokens (RS256); its public key is published at /oauth2/jwks.
Signing key identifier (signing_key_id)stringgenerated-nonoyesIdentifier (kid) of the signing key in the tokens and the JWKS.
Log level (log_level)enumnoticeerror, warn, notice, info, debugnononoLevel of the logs of the portal (journal of the service).

Dependencies​

For each active dependency the Manager takes the first of: the binding chosen in the wizard; a service of the same installation that provides it; a service already installed in the cluster; the only connection of the expected type. Otherwise an optional dependency stays unbound, and a required one is added to the installation in its default mode (the column below names the catalog service added).

BindingProvided byConnection typeEndpointOptionalWhen nothing is boundDescription
databasepostgresqlpostgresqlsqlnopostgresql is added to the installationSessions of the portal (SSO, persistent with the TOTP secrets, OpenID Connect), shared by every portal node.
directory-ldap-nothe installation is refused (dependency_not_installable)Directory of the users and of their groups (LDAP or Active Directory), declared as an LDAP connection of the Manager.

Endpoints​

EndpointSchemeComponentPortPathTLS parameterBinding parametersBinding secretsProvisioning command
httphttpportal8543 (port)-tls_enabledissuer, jwks_url, client_id--

Client configuration files​

Files rendered for the client configuration download:

  • lemonldap-ng.env (client.env.j2)

Health checks​

Liveness (per instance)​

ComponentCheckDetails
portalHTTP {{ 'https' if config.tls_enabled else 'http' }}://{{ host.fqdn }}:{{ config.port }}/.well-known/openid-configurationExpected 200; 60 retries; interval 2 s; timeout 5 s

Readiness (service check)​

CheckDetails
HTTP {{ config.public_url.rstrip('/') }}/.well-known/openid-configurationExpected 200; 10 retries; interval 3 s; timeout 5 s

Preflight checks​

CheckTypeMeaningSeverityComponents
memorymemory_mb {"min": 1024}at least 1024 MB of memoryblockingevery component
port_freeport_free {"param": "port"}port 8543 free on the hostblockingevery component

Uninstall​

Paths removed when the data is purged: {{ paths.data }}, {{ paths.log }}.

  • Login page: {{ config.public_url.rstrip('/') }}/
  • OIDC discovery: {{ config.public_url.rstrip('/') }}/.well-known/openid-configuration

Upstream documentation​