How OpenSearch LDAP authentication works with Active Directory
Organizations that want staff to sign in to OpenSearch and OpenSearch Dashboards with their existing directory accounts can do so because the OpenSearch Security plugin supports Active Directory and LDAP as authentication backends. Group membership in the directory can also drive role assignment, so access in OpenSearch follows the same groups that already govern access to file shares, applications and workstations. DeployOpen plans and implements this integration inside your own infrastructure, and the directory itself stays where it is. OpenSearch reads from it and does not replace it.
The Security plugin separates two steps. The authentication backend checks the username and password against the directory, which answers the question of who the user is. The authorization backend then looks up the groups that user belongs to and maps them to OpenSearch backend roles, which answers the question of what the user may do. These steps can use the same LDAP server or different ones, and the mapping from backend roles to OpenSearch roles is configured separately in the security configuration files. Before any build work, confirm which directory your organization will bind to, which group attributes hold the membership you need, and whether nested groups must be resolved, since each of these changes how the authorization side behaves.
Active Directory is usually the directory in play, and Microsoft's comparison notes that most on-premises applications authenticate against it through LDAP, Windows-integrated authentication or header-based methods. Because OpenSearch uses the LDAP path, the directory team must confirm that a service account with read access to users and groups is available, that the domain controllers accept the connection, and that the directory can answer the lookups at the volume your logins will create. Ask your directory administrators to confirm these points early, because they determine the bind settings, the TLS configuration and the caching decisions covered in the rest of this topic.
What you need before connecting OpenSearch to the directory
Connecting OpenSearch to LDAP or Active Directory touches three areas: the directory itself, the OpenSearch cluster that will query it, and the network path between them. Settle ownership, credentials, certificates and ports on each side before editing any security configuration, because a gap in one area usually shows up as a login failure in another.
Directory servers and endpoints
Identify which domain controllers or LDAP servers OpenSearch will query, and whether they are Active Directory Domain Services or OpenLDAP. Active Directory replicates data to every domain controller in a domain, so confirm which controllers are reachable from the OpenSearch nodes and which one should be the primary endpoint. Ask the directory team for the hostnames, not only IP addresses, because the certificate check depends on them.
AD DS overviewBind account with least privilege
OpenSearch needs a bind account to search the directory for users and groups. Request a dedicated, read-only account limited to the search base that holds OpenSearch users, and confirm it can read group membership attributes. Agree on who owns the account, how its password is rotated and who is notified if it is locked or disabled, since a broken bind account stops every directory login at once.
Service account ownership
Name an owner on the directory side and an owner on the OpenSearch side for the bind account and the group names used in role mapping. Directory teams often rename or restructure groups, and an unannounced change silently removes access to roles. Record who approves changes to the search base, the group filter and the mapping, and where that record is kept.
Security-enabled cluster with TLS
The cluster must run the OpenSearch Security plugin with TLS enabled on both the transport layer between nodes and the REST layer that clients use. Directory authentication runs through the REST layer, so plan REST TLS before adding the backend. Confirm that the admin certificate and the admin user can apply security configuration, because you will need that path to load changes and to roll back a bad backend setting.
OpenSearch security docsDirectory CA certificate on the nodes
When OpenSearch connects to the directory over LDAPS or StartTLS, each node must trust the certificate authority that signed the directory server certificate. Obtain the root and any intermediate CA certificates from the directory team, place them in the truststore that the nodes read, and test the chain from each node. A certificate that works on one node but not another produces intermittent login failures that are hard to trace.
Network paths and ports
Open the path from every OpenSearch node that handles authentication to each directory server on the agreed port, which is typically 636 for LDAPS or 389 for plain LDAP. Check firewalls, network segmentation and any load balancer in between. Confirm the settings against the OpenSearch docs for your version, because option names and defaults for the LDAP and Active Directory backends can change between releases.
LDAP backend docsConfiguring the LDAP backend step by step
This sequence takes an OpenSearch cluster from its current Security configuration to a tested directory login, with each change backed up, applied through the Security admin tooling and verified before the next one starts. The result is a pilot account that signs in through the directory and receives the backend roles that the group mapping should give it.
Confirm and back up the current Security configuration
The cluster owner exports the existing Security configuration files, including config.yml, roles.yml, roles_mapping.yml and internal_users.yml, and stores them in version control or another controlled location. Confirm which authentication domains are active and which local accounts, including an admin account reachable with a certificate, will still work if the directory is unavailable. The step is done when the exported files can be reloaded into a test cluster and the admin certificate login succeeds there.
Define the LDAP authentication and authorization domains
In config.yml, the security engineer adds an authentication domain of type ldap under authc and an authorization domain under authz that point to the same directory. Keep the existing basic internal domain in place during the pilot so a local admin remains available. The step is done when the file parses without errors and the planned domain order is written down, since OpenSearch tries domains in the order they are listed.
Set the server, bind DN and search base and filters
The engineer sets the directory host and port, the bind distinguished name of a read-only service account, its password, the user search base and filter, and the attribute used for the username. The authorization section gets the group search base and filter and the attribute that holds the group name, so that directory groups can be read as backend roles. Confirm these values against the directory's own schema with the directory team, because Active Directory and OpenLDAP use different attribute names. The step is done when a directory query run with the same bind account and filter returns the pilot user and that user's groups.
Add TLS trust for the directory
The engineer places the certificate authority that signs the directory's certificate in the configuration location the Security plugin reads, and enables TLS on the LDAP domain with the correct trust settings. Plaintext binds should not be used for production logins, so ask the directory team whether LDAPS or StartTLS is offered and which certificate chain applies. The step is done when the cluster logs no certificate errors on startup and a connection test to the directory completes with a verified certificate.
Map directory groups to OpenSearch roles
The security engineer maps the directory groups that should receive access to existing OpenSearch roles in roles_mapping.yml, using backend roles from the directory as the matching key. Keep the mapping narrow, and confirm with the owners of each role which directory groups they expect. The step is done when the mapping file lists each intended group and the change is saved in version control with a reviewer's approval.
Apply the change with the Security admin tooling
The operator runs securityadmin.sh with an admin certificate to push the updated files into the cluster's security index, using the cluster's own certificates and the correct cluster name. Applying the files through the tool rather than editing the live index keeps the configuration reproducible. The step is done when the tool reports a successful update and the Security configuration shows the new LDAP domain as active.
Test login and group resolution with a pilot account
The operator signs in to OpenSearch Dashboards and the REST API with a pilot directory account in a group that is mapped to a test role, then checks the authenticated user's backend roles. The same test should be run with a directory account that is disabled or removed, which must be rejected, and with a user outside the mapped groups, who should see no elevated access. The step is done when the pilot user receives the expected roles, the disabled account is refused and the results are recorded before the change is extended to more users.
Choosing between Active Directory and generic LDAP settings
An on-premises Active Directory domain is the most common directory behind OpenSearch access in Windows-heavy organizations. Microsoft describes Active Directory Domain Services as the directory that stores users, computers and other objects and replicates that data to every domain controller in a domain. For OpenSearch, the practical work is pointing the LDAP backend at a domain controller or load-balanced endpoint, choosing a bind account with read rights, and mapping group membership to backend roles. Kerberos matters too: if Linux hosts that run OpenSearch are joined to the domain as a Kerberos realm, that setup is separate from the LDAP bind and should be planned on its own.
- Bind account: Use a dedicated low-privilege service account with read access to user and group objects, not a personal administrator account.
- Search base and user filter: Scope the search base to the OUs that hold OpenSearch users, since domain-wide searches are slower and broader than needed.
- Group attribute: Confirm which attribute carries group membership (commonly
memberOfin AD) and whether nested groups are expanded in your configuration. - Transport security: Confirm that the domain controllers offer LDAPS or StartTLS with a certificate your OpenSearch nodes trust.
- Kerberos realm: Treat Linux domain joins and Kerberos as a separate project from the LDAP backend.
Confirm the exact attribute names, group distinguished names and certificate chain in your own domain before you write the backend configuration.
A generic LDAP directory such as OpenLDAP, which slapd implements as an LDAPv3 server, usually has no Windows domain behind it, so the schema is the operator's own choice. OpenLDAP 2.6 supports strong authentication through SASL and certificate authentication through TLS, and its MDB backend is the main database. Because the schema is not fixed by a vendor, the attribute names in OpenSearch settings must match what your directory actually stores, and object classes for users and groups may differ from the Active Directory defaults.
- Object classes: Check whether users use
inetOrgPersonor another class, and whether groups aregroupOfNames,groupOfUniqueNamesor posixGroup style entries. - Membership model: Some directories store members on the group object, others store group membership on the user, which changes how group lookups are written.
- Bind DN format: Confirm the distinguished name format for the bind account and the user search filter used for login.
- Replication topology: Check whether the directory uses single-provider replication or multi-provider replication, since the LDAP URL you configure should point to a highly available endpoint.
- Certificates: Confirm which CA signs the directory certificate and that OpenSearch nodes trust it.
Ask the directory owner for a sample user entry and a sample group entry, and test the filters against them before enabling the backend.
Many organizations that run Active Directory also sync identities to Microsoft Entra ID with Microsoft Entra Connect. Microsoft's comparison notes that most on-premises applications authenticate against Active Directory with LDAP, Windows-integrated authentication or header-based authentication, while SaaS applications usually need a federation system such as AD FS. For OpenSearch, this means the on-premises directory remains the source the LDAP backend reads, but the user's sign-in path for browser access may run through a federated identity provider. The choice depends on whether the workforce signs in to Dashboards through a browser protocol or through directory bind.
- Source of truth: Confirm whether the directory that holds the group memberships you need is on-premises Active Directory or Entra ID, since synced groups may differ in scope.
- Browser sign-in: If users sign in to Dashboards through a federated provider, plan that as a separate SAML or OpenID Connect configuration rather than an LDAP bind.
- Service access: Automation and API clients may still need a directory-backed or key-based path, so decide that separately.
- Group sync scope: Confirm which groups sync to Entra ID, since filtered or cloud-only groups may not appear where you expect.
- Attribute consistency: Compare user attributes in both directories before mapping them to OpenSearch backend roles.
Confirm with your identity team which system is authoritative for each group that grants OpenSearch access, and document it before the mapping is built.
The directory type is only the first decision. The right settings follow from where authoritative group membership lives, which sign-in paths users need, and which teams own the directory. A single directory type can still need more than one OpenSearch authentication path, for example LDAP for API and admin access alongside a browser protocol for Dashboards. Settling these questions early avoids rebuilding role mappings after the first pilot.
- Authoritative groups: Identify the directory that holds the groups behind each OpenSearch role before writing any mapping.
- Sign-in paths: List which users and services use Dashboards, the REST API and automation, and match each path to a backend.
- Ownership: Name the team that controls the bind account, certificates and group changes, and how changes are requested.
- Test accounts: Plan test users in each relevant group so you can verify access in a non-production cluster first.
- Fallback access: Decide how administrators will sign in if the directory is unavailable, and keep that path tightly controlled.
Review the chosen path with the identity owner and your security team, and confirm the exact configuration keys against the current OpenSearch security documentation for your version.
Mapping directory groups and attributes to OpenSearch roles
This table traces a directory login from the user identifier and group membership through the backend roles to the OpenSearch roles and role mappings that grant access. Read each row as a question of ownership: which system sets the value, and which system decides what the user can actually do. The main takeaway is that the directory supplies identity and group membership, while OpenSearch roles define permissions, including document and field restrictions.
| Element | Where it is set | Role in access decisions |
|---|---|---|
| User identifier (username) | Directory attribute such as sAMAccountName or uid, passed through the LDAP bind or search | Identifies the account at login. Confirm which attribute your directory uses as the unique user name before mapping anything. |
| Group DN or group name | Directory group membership, read by an LDAP search against group objects | Authoritative only for membership. Nested groups and group naming differ between AD and OpenLDAP, so confirm how your search returns them. |
| Backend roles | Produced by the authorization backend from directory groups or attributes | Intermediate labels. They grant nothing by themselves until a role mapping links them to an OpenSearch role. |
| Role mapping | Set in OpenSearch by an administrator, stored in the security configuration | Authoritative link from backend roles or users to OpenSearch roles. Changes here affect every directory user in the mapped group. |
| OpenSearch roles and permissions | Set in OpenSearch, including index patterns, cluster privileges and tenant access | Authoritative for what a user may do. A backend role only grants what the target role allows. |
| Document and field security rules | Defined inside the OpenSearch role, not in the directory | Authoritative for which documents and fields are visible. Directory attributes cannot restrict documents unless a role refers to them. |
| Directory attributes used in queries (for example, department or title) | Set in the directory and read at login if the configuration requests them | Not authoritative for access once cached. Attribute changes may not appear until the cache expires or the user signs in again. |
How a directory login reaches an OpenSearch role
The flow starts with a user signing in to OpenSearch Dashboards or a REST client, which reaches a node running the Security plugin. The plugin opens a TLS connection to the directory, binds and searches for the user, and resolves group membership into backend roles. Role mapping then turns those backend roles into OpenSearch roles that authorize the request. Check each boundary: the user network to the cluster, and the cluster to the directory, since the directory connection carries credentials and group data.
Trust boundaries and hand-offs from a directory login to an authorized OpenSearch request.
Security settings for directory-backed OpenSearch access
Connecting OpenSearch to LDAP or Active Directory moves the authentication trust to a system your directory team runs. The cards below cover the settings that keep that connection narrow: how the cluster verifies the directory, which account it binds with, which groups can reach admin roles, and which logins stay outside the directory.
Verify the directory's TLS certificate
Configure the LDAP connection so OpenSearch validates the directory server's certificate chain against a trusted CA rather than accepting any certificate. Check that the hostname in the configuration matches a name on the certificate, and use the LDAPS or StartTLS port your directory team actually operates. A cluster that skips verification can send bind passwords to a host impersonating the directory. Confirm chain validation is on before the first production login.
LDAP backend docsUse a read-only bind account
OpenSearch needs a service account to search the directory for users and groups. Give it read access to the search base only, with no write rights and no membership in privileged groups. Store its password in the cluster's secure configuration, not in plain files shared across teams, and set a rotation schedule that the directory team and the OpenSearch owner both track. Rotating the password means updating the cluster configuration, so plan that change with the rest of the cluster's maintenance.
Restrict groups that map to admin roles
Every directory group that maps to an OpenSearch backend role grants whatever that role allows, including cluster-wide permissions. Review which AD or LDAP groups can reach roles such as all_access or security_manager, and limit membership to named administrators. Nested group membership and broad groups like domain users can silently widen access, so check the resolved membership, not only the group name. Document the mapping so a directory change is reviewed before it reaches the cluster.
Keep emergency access outside the directory
Keep the admin certificate and a small set of local emergency accounts that do not depend on LDAP or AD. If the directory is down, misconfigured or locked out, these are the only paths left for the security team to run securityadmin.sh or repair the authentication settings. Store their credentials in a sealed process owned by people who are not the directory administrators, and test that the emergency path works without touching production users.
Review authentication events in audit logs
Enable audit logging for failed and successful authentication, and forward those events to the log store your security team reviews. Look for repeated failures against one account, logins from unexpected hosts, and role changes that follow a group membership change. Confirm which events your audit configuration records, because the set of logged categories determines what you can investigate later. Agree on who reviews the events and how often before go-live.
Pair directory login with rate limiting
Directory accounts can be guessed or locked out through the LDAP backend just like local users, so the cluster's login throttling matters here too. Confirm the throttling settings cover the directory-backed login path and agree on what happens when a directory account is locked, since the directory's own lockout policy may apply as well. The detailed settings are covered on the login rate limiting page.
Why directory logins fail and how to fix them
This table lists the failures teams most often hit when OpenSearch authenticates or maps roles against a directory, with the likely cause, a diagnostic step and a fix for each. Work down the rows in order, since TLS and bind problems block every later check. Confirm exact log messages and configuration keys against the OpenSearch LDAP documentation for your version before you change production settings.
| Failure | Likely cause | Diagnostic step | Fix |
|---|---|---|---|
| TLS trust error to the directory | The directory certificate is not signed by a CA that the OpenSearch nodes trust, or the chain is incomplete | Test the connection from an OpenSearch node with the same CA file and confirm the handshake succeeds before touching OpenSearch settings | Install the full CA chain in the trust store the security plugin reads, then restart or reapply configuration and retest |
| Wrong bind DN or password | The service account DN is written in the wrong format, the account is disabled or locked, or the password was rotated in AD but not in OpenSearch | Bind with an LDAP client using the same DN and password, and check the directory account status and recent failed bind events | Correct the bind DN, confirm the account is enabled and not expired, and store the new password through your secrets process |
| Search base or filter misses nested groups | The user search base is too narrow, or group membership is read only from direct memberships and nested groups are not resolved | Run the user and role searches manually against a test account and compare the results with the group nesting shown in AD | Widen the search base to cover the OUs holding users and groups, and adjust the role search so nested membership is resolved as your design requires |
| Users sign in but have no backend roles | No directory group matched the role search, so the user has no backend role to map to an OpenSearch role | Check the backend roles the security plugin reports for the user and compare them with the group names in the directory | Fix the search filter or attribute used for group names, then confirm the user receives the expected backend roles |
| Role mapping does not match the directory group name | The mapping uses a short group name where the backend role carries a distinguished name, or the case or prefix differs | Read the backend role string for a test user and compare it character by character with the mapping key | Update the role mapping to use the exact backend role value, and keep mappings in version control so changes are reviewed |
| Cache returns stale group membership | The security plugin caches user and role lookups, so a group change in AD does not appear until the cache expires | Remove the user from a group in a test directory, then sign in again and compare the backend roles with the directory after the expected interval | Set the cache lifetime to match your change process, and clear the cache or restart the affected nodes when an urgent access change must take effect |
| Admin account locked out after a bad apply | A configuration change pointed the admin path at a directory that cannot authenticate, and no local admin path remained | Check whether a local admin certificate or internal user still works on each node, and review the most recent configuration version applied | Restore the last known good security configuration with the admin certificate, and keep a local break-glass admin available outside the directory before any future change |
How caching and group changes affect access
The Security plugin caches authenticated users and their backend roles, so removing someone from a directory group may not cut off their OpenSearch access right away. Access depends on what the cluster has already cached, not only on what the directory says now. Before go-live, confirm in the OpenSearch security docs how user and role caching works for your version, which settings control the cache lifetime (for example, any cache-related keys in config.yml), and whether there is an API or securityadmin.sh action that clears cached entries. Write those answers into the runbook so the on-call team does not have to find them during an incident.
Plan a test for offboarding and role removal before you rely on directory groups for access. In a non-production cluster, sign in as a test user, confirm the expected roles and index access, remove that user from the mapped AD or LDAP group, and then check at intervals whether existing sessions and new logins lose the permissions you expect. Record the elapsed time and whether a cache clear was needed. Also test a disabled or locked account, since the directory state and the cached session can disagree. Repeat the test after each Security plugin upgrade, because caching behavior can change between versions.
Review the mapping whenever the directory schema or group names change. A renamed or moved AD group, a changed userbase or usersearch filter, or a different attribute used for the username can silently stop matching, which may leave users with no roles or, worse, match a broader group than intended. Check the role mappings against the current group distinguished names, confirm that the attribute used for the username is still populated, and re-run your access tests. Assign one owner for mapping changes so directory administrators and OpenSearch administrators agree on each change before it is applied.
Questions buyers ask about OpenSearch directory integration
What does OpenSearch LDAP or Active Directory integration cost?
The cost is mostly labor, and it is set by the directory and the number of groups, not by the OpenSearch license, which is Apache 2.0 with no paid edition. Costs fall into four parts: discovery of the directory structure and group model, network and TLS work to reach the domain controllers, role mapping and testing across the groups that matter, and handover. Directory licensing is a separate line. The Windows Server 2025 pricing page lists suggested prices for Standard and Datacenter, and it requires a client access license for each user or device that accesses the server, so check whether your directory is already licensed. Ask any partner for a written scope that itemizes these parts and states what is one-time and what recurs.
How long does directory integration take, and what sets the duration?
The duration depends on how clean the group model is, how many AD or LDAP groups must map to OpenSearch backend roles, and how quickly the network and certificate prerequisites are cleared. A single bind account with a small set of groups moves faster than an environment with nested groups, multiple domains or unclear ownership. Time is also spent waiting on firewall changes, certificate issuance and approval for the bind account. Ask for a written timeline with named dependencies and a testing phase that covers every role mapping before cutover.
What must our team provide before integration work starts?
Plan to provide directory read access, a dedicated bind account with the least rights needed to search users and groups, the CA certificate chain that signs the domain controllers or LDAP server, and network paths from the OpenSearch nodes to the directory on the LDAP ports. You also need named owners for each group that will map to an OpenSearch role, plus a test set of accounts in each group. Confirm the exact ports, search base and attribute names with your directory team, because these vary by environment. List these items in the written scope so gaps are found before work starts.
Can our internal team set up LDAP or Active Directory authentication alone?
Yes, if your team already runs OpenSearch Security and has someone who can read directory structure, manage certificates and test role mappings. The OpenSearch Security documentation covers the Active Directory and LDAP backend, so the work is configuration and testing, not new software. The risk is in the gaps: a missed nested group, an expired CA certificate or a role mapping that grants more access than intended. Teams that want an outside review often bring in a partner for the directory design and testing, then run the configuration themselves. Decide which parts you will own before you ask for quotes.
Do Active Directory and Entra ID both apply to this integration?
They can both apply, but they are different services. Microsoft describes Active Directory Domain Services as an on-premises directory that most on-premises apps reach through LDAP or Windows-integrated authentication, and Entra ID as the cloud identity service that Entra Connect can sync from an existing AD. An OpenSearch cluster that reaches a domain controller over LDAP uses AD, while a SAML or OpenID Connect setup usually uses Entra ID. Confirm which directory holds your users and groups before you choose a backend, and see the sibling SAML page if your login flow runs through Entra ID.
What ongoing work follows the initial integration?
Recurring work includes rotating the TLS certificates used for the directory connection, reviewing the bind account password and its rights, updating role mappings when groups are created, renamed or retired, and checking that removed users lose access in OpenSearch as expected. Windows Server versions also move through lifecycle stages, so the domain controllers your cluster depends on need a planned upgrade path, and the Windows Server 2022 mainstream support end date is a reason to check your schedule. Ask for a runbook, a named owner for each recurring task and a retest after any change to the directory.
Does directory integration replace the OpenSearch Security configuration review?
No. Directory integration decides who can sign in and which backend roles they receive, but the roles themselves still control index, document and field access. An LDAP group that maps to a broad role can expose more data than intended, so the review must cover role definitions, document-level and field-level rules and audit logging. Ask a provider to include that review in the written scope and to test each mapped group with a real account.
How DeployOpen works on this
DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own infrastructure. For OpenSearch directory authentication, that means agreeing the directory design, the role mapping and the TLS settings in writing before any cluster change, then delivering a tested configuration your identity and security teams can review.
How we scope
- Written scope covers which directory services, domain controllers and OpenSearch clusters are in the engagement.
- We record the LDAP or AD settings to be used, including bind account, search base and certificate trust.
- Group-to-role mapping rules are listed so every AD group that grants access is named and approved.
- Engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts.
How we build
- Configure the LDAP authentication and authorization backends in the Security plugin configuration files.
- Map directory groups to backend roles, then test each role against sample accounts from every group.
- Enable TLS to the directory and confirm the certificate chain, hostnames and failover domain controllers.
- Set authentication caching and failure behavior, and test how changes to group membership take effect.
How we hand over
- Deliver the configuration files, role mapping table and a record of the test accounts and results.
- Document the bind account permissions, the rotation steps for its password and certificate renewal.
- Provide a runbook covering lockout symptoms, directory outages and how to read authentication logs.
- Walk your identity and security teams through the design so they can review it against their own policies.
How we support
- Ongoing support, OpenSearch upgrades and continuous testing are available as retainers.
- Retainers can cover re-testing after directory changes, such as new domains or domain controllers.
- Confirm with us how upgrades to new OpenSearch versions will be tested against the directory settings.
- Ask for the support boundaries, response arrangements and change process in the written quote.

