Single Sign-On with LDAP
Configure LDAP Single Sign-On authentication and authorization for Connectware users with Active Directory or OpenLDAP integration.
LDAP integration requires a Connectware Enterprise license.
LDAP (Lightweight Directory Access Protocol) is a standardized protocol for accessing directory services. In Connectware, LDAP can be used to authenticate users at login and assign permissions based on information from your directory service, such as Microsoft Active Directory or OpenLDAP.
This guide shows how to enable LDAP login in Connectware, choose an authorization model, and configure your directory so users receive the correct roles.
Prerequisites
Connectware Enterprise license required. For more information, see cybus.io.
Active Directory or OpenLDAP server reachable from Connectware.
LDAP user and group structure prepared according to the configuration steps in this guide.
How LDAP Works in Connectware
Connectware uses LDAP in two steps:
Authentication: When a user signs in, Connectware verifies the username and password against your LDAP directory.
Authorization: After successful authentication, Connectware assigns Connectware roles to the user based on your LDAP configuration.
On the first successful login, Connectware creates a corresponding user in its internal user database. On each subsequent successful login, role assignments are synchronized from LDAP.
You can choose between the following authorization modes:
Group mode: Roles are assigned based on LDAP group membership.
Attribute mode: Roles are assigned based on LDAP user attributes.
In both cases, role management happens in LDAP, not in Connectware.
Choose Your LDAP Authentication Method
Decide how Connectware authenticates users against your LDAP directory. This choice depends on how your directory is structured and how users are organized within it.
Connectware provides the following methods for LDAP authentication:
Authentication with a dedicated bind user
Authentication without a dedicated bind user (direct user authentication)
A bind user is common in LDAP setups with complex directory structures. It is a limited user that you create in your LDAP directory. This user is usually read-only and has permission to search the LDAP directory tree.
You use it when users do not share a single LDAP base DN (i.e., when they are not in the same group). If your users are spread throughout the directory tree, you will likely want to use a bind user.
Direct Authentication Without a Dedicated Bind User
You can authenticate without a dedicated bind user when your LDAP structure meets the following requirements:
All user entries are located in the same branch of the LDAP Directory Information Tree (DIT)
All users share the same base DN
Example: The base DN is
ou=users,dc=corp,dc=comand the DN of all users follows the pattern<RDN_OF_USER>,ou=users,dc=corp,dc=com
Groups are not nested
Example of unsupported nesting: A user is a member of
group A,group Ais a member ofgroup B, andgroup Bis the group linked with a Connectware role.
When no dedicated bind user is used, Connectware takes the given bindDn, adds the userRdn, and binds with the user credentials to the LDAP server. Binding with user credentials is the actual authentication step with an LDAP server.
Authentication Using a Dedicated Bind User
A dedicated bind user is required when your LDAP structure requires searches or involves complex group relationships. Configure this by setting the CYBUS_LDAP_BIND_PASSWORD environment variable.
You need this authentication method when:
User entries are distributed across different DIT locations
Example:
User 1:
cn=user1,ou=production,dc=corp,dc=comUser 2:
cn=user2,ou=operations,dc=corp,dc=com
In this case, Connectware needs to search from a common base DN (
dc=corp,dc=com) to locate user entries
Your setup uses nested groups
The search base must be the common DN shared by all groups and users
If your directory needs additional constraints (e.g., multiple branches), configure a custom LDAP search filter. See LDAP Search Filters.
Choose Your LDAP Authorization Mode
Connectware supports the following LDAP authorization modes:
Group mode: Sets permissions based on LDAP group membership.
Attribute mode: Sets permissions based on LDAP user attributes.
Group Mode
Connectware roles can be associated with LDAP groups. When an LDAP user successfully logs in for the first time, a Connectware user is created. Depending on the LDAP group memberships of the LDAP user, corresponding roles are assigned to the Connectware user automatically. This way, permissions can be easily managed by adding or removing LDAP users to or from the related LDAP groups.
Example
You can link the Connectware role LDAP-Admin to an LDAP group cn=cw-admin,ou=connectware,dc=corp,dc=com. Users in this group automatically receive the role when logging in.
For more information, see Example Setup for Group Mode.
Attribute Mode
When an LDAP user successfully logs in for the first time, a Connectware user is created. A custom attribute in the LDAP user entry specifies which roles should be automatically assigned to the Connectware user. Authorization is controlled by adding or removing Connectware role names in the LDAP user's attributes.
Example
If the custom attribute employeeType contains the value connectware-admin, the admin role is assigned to the user.
For more information, see Example Setup for Attribute Mode.
Enable LDAP Authentication
Enabling LDAP Authentication (Kubernetes)
To enable the LDAP feature in Connectware, set the
global.authentication.ldap.enabledHelm value totrue.Additionally, provide the following Helm values within the
global.authentication.ldapcontext:
bindDn
ou=users,dc=corp,dc=com
Base DN for direct authentication or full DN of a dedicated bind user. See parameter table for details.
url
ldap://ldap.corp.com:389
URL of the LDAP server in format scheme://hostname:port.
Example
If you are using a bind user to search through the directory tree, you must specify the full DN of the bind user as bindDn and provide the following additional values:
bindPassword
ANc97WCO"!xcC=(
Password for the bind user as defined in your LDAP server.
searchBase
dc=corp,dc=com
Base DN for searching users when using a dedicated bind user.
Example
If you do not want to provide the bind user and its password through Helm values (for example, when following a GitOps approach), you can reference an existing Kubernetes secret via existingBindSecret. For more information, see Bind User Credentials via Existing Kubernetes Secret.
After enabling LDAP authentication, you must configure how Connectware derives user roles from LDAP. This is controlled through the
modesetting in theglobal.authentication.ldapcontext. Connectware supportsgroupmode andattributemode.
For more information, see Choose Your LDAP Authorization Mode.
Enabling LDAP Authentication (Docker Compose)
For a list of all environment variables for Docker, see Docker Compose.
Navigate to your Connectware installation directory. If you have used the default values during installation, this is the installation folder:
/opt/connectware.The directory contains an
.envfile that is loaded when starting Connectware. Open the.envfile in a text editor of your choice.Locate the LDAP settings section in the
.envfile. By default, the settings look like this:
Set the individual parameters according to your local directory service configuration.
To set up a configuration with direct authentication (no dedicated bind user), do the following:
Example configuration for LDAP mode attribute:
Example configuration for LDAP mode group:
This configuration would look for users matching the LDAP query cn=username,ou=users,dc=corp,dc=com.
Do not use quotation marks to encapsulate the variable values.
To set up a configuration with a dedicated bind user, do the following:
Example configuration for LDAP mode attribute:
Example configuration for LDAP mode group:
Make sure to change the RDN prefix (cn) if needed for CYBUS_LDAP_BIND_DN=cn=binduser,ou=users,dc=corp,dc=com.
After saving the new configuration, do one of the following:
If your Connectware instance is running as a system service, run
systemctl restart connectwareto restart it.Otherwise, run
docker compose up -dfrom within the installation folder to restart it.
The new configuration is now loaded. The next step is to supply your directory service users with Connectware roles (LDAP mode attribute) or link LDAP groups with Connectware roles (LDAP mode group).
Configure LDAP Parameters
Once the authentication method and authorization model are defined, configure the LDAP parameters required by Connectware. The available parameters depend on the deployment type and the chosen configuration path.
The following tables list all supported LDAP parameters for Kubernetes and Docker Compose deployments.
Helm Values (LDAP)
global.authentication.ldap.enabled
true/false. Enables LDAP integration.
global.authentication.ldap.bindDn
Without bindPassword: Base DN where all user entries are located (e.g., ou=users,dc=corp,dc=com).
With bindPassword: Full DN of a dedicated bind user (e.g., cn=binduser,ou=users,dc=corp,dc=com).
global.authentication.ldap.bindPassword
or global.authentication.ldap.existingBindSecret
Password for the dedicated bind user or reference a Secret with keys bindDn and bindPassword. When provided, bindDn must contain the full DN of the bind user, and searchBase becomes required.
Note: If both are provided, existingBindSecret takes precedence.
global.authentication.ldap.searchBase
Base DN for searching users. Required only when using a dedicated bind user (i.e., when bindPassword is set).
global.authentication.ldap.searchFilter
Optional custom user search filter; overrides default username-based lookup. See LDAP Search Filters.
global.authentication.ldap.url
LDAP/AD server URL, e.g., ldap://host:389 or ldaps://host:636.
global.authentication.ldap.mode
group or attribute.
global.authentication.ldap.rolesAttribute
LDAP attribute containing Connectware roles. Used only with mode: attribute.
global.authentication.ldap.memberAttribute
LDAP attribute indicating group memberships (often memberOf). Used only with mode: group.
global.authentication.ldap.userRdn
LDAP user property (e.g., cn) used as the username at login.
global.authentication.ldap.caChain.trustAllCertificates
true accepts all certificates (not recommended). Default is false.
global.authentication.ldap.caChain.cert
or global.authentication.ldap.caChain.existingConfigMap
Provide full CA chain in PEM via cert: or reference a ConfigMap (file must be ca.crt). No file path option.
Note: If both are provided, existingConfigMap takes precedence.
global.authentication.ldap.autoEnforceMfa
Enforce MFA for LDAP users after first login. Requires global.authentication.mfa.enabled: true and keys configured.
Environment Variables (LDAP)
CYBUS_LDAP_ENABLED
Enables LDAP integration when set to true. If false, LDAP is disabled and all other LDAP parameters are ignored.
CYBUS_LDAP_BIND_DN
Without CYBUS_LDAP_BIND_PASSWORD: Base DN where all user entries are located (e.g., ou=users,dc=corp,dc=com).
With CYBUS_LDAP_BIND_PASSWORD: Full DN of a dedicated bind user (e.g., cn=binduser,ou=users,dc=corp,dc=com).
CYBUS_LDAP_BIND_PASSWORD
Password for the dedicated bind user. When provided, CYBUS_LDAP_BIND_DN must contain the full DN of the bind user, and CYBUS_LDAP_SEARCH_BASE becomes required.
CYBUS_LDAP_SEARCH_BASE
Base DN for searching users. Required only when using a dedicated bind user (i.e., when CYBUS_LDAP_BIND_PASSWORD is set). Example: dc=corp,dc=com.
CYBUS_LDAP_SEARCH_FILTER
Optional custom filter for user search requests. Only valid with a dedicated bind user. See LDAP Search Filters.
CYBUS_LDAP_URL
The URL of the LDAP/AD server.
CYBUS_LDAP_MODE
Specifies the LDAP mode: Either group or attribute.
CYBUS_LDAP_ROLES_ATTRIBUTE
LDAP attribute containing user roles. Only valid with CYBUS_LDAP_MODE=attribute.
CYBUS_LDAP_MEMBER_ATTRIBUTE
LDAP attribute for group memberships. Only valid with CYBUS_LDAP_MODE=group. Usually set to memberOf.
CYBUS_LDAP_USER_RDN
LDAP user property (e.g., cn) containing the username used for Connectware login.
CYBUS_LDAPS_TRUST_ALL_CERTS
When true, accepts all servers without certificate verification for Secure LDAP. Default is false.
CYBUS_LDAPS_CA_FILE
Path to CA file for LDAP server validation. Used with Secure LDAP when CYBUS_LDAPS_TRUST_ALL_CERTS is false.
Note: The CA file must be mounted into the container for this path to be accessible.
CYBUS_LDAP_AUTO_ENFORCE_MFA
When true, enforces MFA for LDAP users after their first login.
Example LDAP Setups
This section shows a complete Docker example setup for both authorization models.
Each example follows the same structure: LDAP preparation, Connectware configuration, and role assignment behavior. You can use these examples as a reference and adapt them to your own directory structure.
Example Setup for Group Mode
In order to assign permissions to Connectware users by grouping their LDAP user entries with LDAP groups, you need to perform the following steps:
Define LDAP groups according to Connectware roles that you want to use.
Configure Connectware with LDAP parameters.
Link LDAP groups with Connectware roles.
Assign LDAP users to these LDAP groups.
Define LDAP Groups According to Connectware Roles
In this example, additional groups are created and associated with Connectware roles. This is not a mandatory practice, but is intended to demonstrate the concept.
We assume that we have the following DIT structure:
Create the groups
cw-adminandcw-minimalas follows:
Now add
user1tocw-minimal.Run the following command to retrieve and display all attributes for
user1. Make sure to changePASSWORDto the actual password ofuser1.
Result of the command:
If you are using OpenLDAP and you do not see the
memberOfattribute, run the following command:
If you can see the
memberOfattribute, your LDAP is correctly configured for group operations. You can proceed with the next configuration steps.If the
memberOfattribute is not visible, your OpenLDAP installation lacks the requiredmemberOfmodule. In this case, your OpenLDAP instance needs additional configuration.
Configure Connectware with LDAP Parameters
Edit the
.envfile as follows:
Make sure to adjust the LDAP URL to match your environment.
Linking LDAP Groups with Connectware Roles
Log into Connectware as administrator and select User > User Management. Select the Roles tab and click Add Role.
In the Create Role dialog, do the following:
In the Name field, enter
LDAP-Admin.To associate this role with the LDAP group
cw-admin, copy the DN of that LDAP group to the field DN of AD Group. In this example, this will becn=cw-admin,ou=connectware,dc=corp,dc=com.
The field is labeled "DN of AD Group" in the UI, but it accepts the DN of any LDAP group, whether from Active Directory or OpenLDAP.
In the Copy Permissions field, select connectware-admin and click Add.
Click Create to add your new role.
Click Add Role again to add another role with the following configuration:
In the Name field, enter
LDAP-Minimal.In the DN of AD Group field, add the DN of the related LDAP group (
cn=cw-minimal,ou=connectware,dc=corp,dc=com).In the Copy Permissions field, select minimum-access and click Add.
Click Create to add your new role.

Assigning LDAP Users to LDAP Groups
You can assign different Connectware roles to your users
user1,user2, anduser3by adding them to or removing them from the groupscw-minimalorcw-admin.When you add
user1to the groupcw-adminand log into Connectware,user1will be created (if it is the first login) and the roleLDAP-Adminwill be assigned automatically.Log out from Connectware, remove
user1from groupcw-admin, and add it tocw-minimal.Log into Connectware with
user1again.user1has limited access and you cannot navigate to the user section. Permissions ofuser1changed according to the LDAP group membership.
If you log in as user2 and user2 is not assigned to any LDAP group yet, user2 will be created but you will see an error dialog saying that no permission was added and thus you will be forced to log out again.
Example Setup for Attribute Mode
LDAP setup.
Configure Connectware with LDAP parameters.
Assign roles to the LDAP user entry.
LDAP Setup
The following examples assume that you have an LDAP DIT structure like the following:
This structure is not mandatory, but be aware to adjust the following examples according to your LDAP setup in the next steps.
Configuring Connectware with LDAP Parameters
Edit your
.envfile as follows:
Make sure to replace the CYBUS_LDAP_URL with your actual LDAP server address and port.
Assigning Roles to LDAP User Entry
To assign roles to LDAP users, you have to add the Connectware role names as values to the user's CYBUS_LDAP_ROLES_ATTRIBUTE that you defined in the
.envfile. In our example, we will use the attribute nameemployeeType.To add the Connectware role
connectware-adminto the LDAP useruser1, add the attributeemployeeType(defined as the roles attribute in the.envfile) with the valueconnectware-adminto the LDAP useruser1.Add the Connectware role
minimum-accesstouser2by adding the attributeemployeeTypewith the valueminimum-accessto the LDAP useruser2.Check if the attributes have been set correctly by running the following command:
Result of the command:
If you now log into Connectware as
user1, the Connectware roleconnectware-adminwill be assigned to useruser1.To revoke access to Connectware for a certain user, the Connectware roles just have to be removed from the LDAP user by deleting the corresponding attribute
employeeType.
Connectware comes with predefined user roles like connectware-admin and minimum-access, but additional roles can be created and assigned to users in the same way.
User Management for LDAP Users in Connectware
When LDAP authentication is enabled, user management in Connectware differs from local user accounts. These differences are important to understand when operating and troubleshooting an LDAP-based setup.

When using LDAP authentication, Connectware user management differs from regular local user accounts in several aspects. The following sections detail these differences and explain how LDAP users are handled within Connectware.

Roles
You cannot add or remove roles from within Connectware. All roles have to be assigned in the user details of the directory user. Modified user roles are synchronized to the Connectware user on each successful login.
Grant Types
Every LDAP user defaults to token authentication. This property is not modifiable.
LDAP User Password
You cannot change the password from within Connectware as it uses the LDAP directory service for authentication.
Deleting LDAP Users
You can still remove LDAP users from the Connectware user database. Note that this only deletes the Connectware internal user information. Deleting this local user information will not prevent the user from logging into Connectware again.
To fully revoke access, you must either remove their Connectware roles in LDAP or remove them from LDAP groups associated with Connectware roles, depending on your integration mode.
Advanced LDAP Configuration
Customizing the User RDN
The user RDN (relative distinguished name) defines which LDAP attribute is used to identify a user during authentication.
By default, Connectware uses the cn attribute as the user identifier during login. This means the username entered at the Connectware login screen is mapped to an LDAP distinguished name constructed with cn=<username>.
You may need to change the user RDN if your directory uses a different attribute to identify users, for example, uid, sn, or sAMAccountName. In such cases, you must configure Connectware to use the appropriate LDAP attribute as the user RDN.
The configured user RDN must match the directory schema used for user entries.
When using direct authentication without a dedicated bind user, the user RDN is combined with the base DN to form the bind DN.
When using a dedicated bind user, the user RDN is used during the search operation to locate the user entry.
Make sure the chosen attribute uniquely identifies users within the configured search scope.
Configuration examples for Kubernetes and Docker Compose are provided in the following sections.
Customizing the User RDN (Kubernetes)
In the
values.yamlfile, configure theglobal.authentication.ldap.userRdnHelm value.
Example
With this configuration, Connectware uses uid=<username> instead of cn=<username> when authenticating users.
Apply the configuration changes via the
helm upgradecommand.
Example
For more information, see Applying Helm Configuration Changes.
Customizing the User RDN (Docker Compose)
Navigate to your Connectware installation directory. If you have used the default values during installation, this is the installation folder:
/opt/connectware.The directory contains an
.envfile that is loaded when starting Connectware. Open the.envfile in a text editor of your choice.Locate the LDAP settings section in the
.envfile and configure theCYBUS_LDAP_USER_RDNenvironment variable.
Example
With this configuration, Connectware constructs user DNs using uid=<username>.
TLS for LDAP Authentication
You can secure LDAP communication by using LDAPS. When TLS is enabled, Connectware validates the certificate presented by the LDAP server.
You can choose from the following options:
Use a certificate signed by a trusted root CA.
Provide a custom CA certificate chain to Connectware.
Disable certificate validation for non-production environments.
Enabling TLS for LDAP Authentication (Kubernetes)
To enable TLS for LDAP, set a valid
ldaps://URL for the Helm valueurlin theglobal.authentication.ldapcontext.Adjust the TCP port number. By default, LDAPS uses port 636.
Enabling TLS for LDAP Authentication (Docker Compose)
To enable TLS for LDAP, set a valid
ldaps://URL forCYBUS_LDAP_URL.Adjust the TCP port number. By default, LDAPS uses port 636.
Providing the CA Certificate
Providing the CA Certificate through Helm Values
To provide the CA certificate, set the Helm value
caChain.certin theglobal.authentication.ldapcontext. Provide the complete certificate chain necessary to validate the LDAP server's certificate.
Example
As an alternative, you can provide the CA certificate through a manually created Kubernetes ConfigMap.
Providing the CA Certificate through a Kubernetes ConfigMap
To provide the CA certificate necessary to validate the certificate used by your LDAP server, you can manually create a Kubernetes ConfigMap that contains the certificate as a file named ca.crt. You will then provide the name of this ConfigMap in the Helm value caChain.existingConfigMap in the global.authentication.ldap context.
Example
Create the Kubernetes ConfigMap from a file named ca.crt in your current directory:
Specify the name of the ConfigMap:
Providing the CA Certificate through Environment Variables
To provide the CA certificate, set
CYBUS_LDAPS_CA_FILEto the path where the certificate will be available inside the container. Provide the complete certificate chain necessary to validate the LDAP server's certificate.The CA certificate file must be mounted into the Connectware container.
Disabling Certificate Validation
While we do not recommend skipping certificate validation for production use, it is possible to tell Connectware to accept any certificate the LDAP server presents.
Disabling Certificate Validation (Kubernetes)
To disable certificate validation, set the Helm value
caChain.trustAllCertificatesin theglobal.authentication.ldapcontext totrue.
Example
Disabling Certificate Validation (Docker Compose)
To disable certificate validation, set
CYBUS_LDAPS_TRUST_ALL_CERTStotrue.
LDAP Search Filter
Connectware uses an LDAP search filter to locate a user entry during authentication. The filter is constructed dynamically based on the configured user RDN, the username entered during login, and an optional custom filter extension.
Filter Format and Construction
By default, Connectware constructs the LDAP search filter as:
Where:
CYBUS_LDAP_USER_RDN(Docker Compose) oruserRdn(Kubernetes) is configured in Connectware.usernameis the value entered by the user during login.
If you configure an additional search filter extension, Connectware combines both parts using an AND condition. The resulting filter has the following structure:
RFC 4515 Encoding Requirements
LDAP search filters must follow RFC 4515. Certain special characters in filter values must be escaped using hexadecimal notation.
See the official RFC for full details: https://datatracker.ietf.org/doc/rfc4515/
Characters Requiring Escaping
The following characters must be escaped when used in LDAP filter values:
*
\2a
Asterisk
(
\28
Left parenthesis
)
\29
Right parenthesis
\
\5c
Backslash
NUL
\00
Null character
Non-ASCII Characters
Non-ASCII characters (such as international characters) should be encoded as hex-escaped UTF-8 bytes. Each byte of the UTF-8 representation must be escaped individually.
Example: The German character ü is represented in UTF-8 as bytes 0xC3 0xBC, which must be escaped as \c3\bc in an LDAP filter.
Encoding Example
When used as an extension, only the escaped expression is added.
When to Use a Custom Search Filter
Extending the search filter is useful in scenarios such as:
Users are not uniquely identifiable by their username alone.
Multiple entries share the same RDN within a large search base.
You want to restrict authentication to a specific subtree or object type.
Example Scenario
Given the following directory structure, we have two entries with the same RDN cn=a.smith:
If the search base is set to dc=corp,dc=com, the username alone is not sufficient to uniquely identify the entry.
To restrict authentication to employees only, you can extend the filter to match entries whose DN contains ou=employees.
Testing the Custom Search Filter
You can validate the filter using ldapsearch before applying it to Connectware:
Configuring the Filter Extension
Configuring the Filter Extension (Kubernetes)
In the
values.yamlfile, configure theglobal.authentication.ldap.searchFilterHelm value.
Example
Be aware that no surrounding brackets are used for the additional expression. Brackets within your expression can be used, e.g., &(objectClass=iNetOrgPerson)(ou:dn:=employees).
Configuring the Filter Extension (Docker Compose)
Navigate to your Connectware installation directory. If you have used the default values during installation, this is the installation folder:
/opt/connectware.The directory contains an
.envfile that is loaded when starting Connectware. Open the.envfile in a text editor of your choice.Locate the LDAP settings section in the
.envfile and configure theCYBUS_LDAP_SEARCH_FILTERenvironment variable.
Bind User Credentials via Existing Kubernetes Secret
If you do not want to provide the bind user for LDAP authentication through the Helm values bindDn and bindPassword within the global.authentication.ldap context, you can also manually create a Kubernetes secret in Connectware's namespace through your preferred method of managing secrets in Kubernetes. You will then need to provide the name of this secret in the Helm value existingBindSecret.
This secret needs to contain two keys, bindDn and bindPassword, containing the parameters that you did not specify directly as Helm values. If you want to use different keys, you can customize these as shown below.
Example
Create your Kubernetes secret:
Specify the name of the secret in your
values.yamlfile:
Customizing Kubernetes Secret Keys
If you want to customize the keys used in the Kubernetes secret, you can do so and specify the keys you want to use instead in the Helm value existingBindSecretDnKey and existingBindSecretPasswordKey within the global.authentication.ldap context.
Example
Create your Kubernetes secret:
Specify the name of the secret in your
values.yamlfile:
Last updated
Was this helpful?

