2017-04-06 21:29:29 -04:00
|
|
|
[[active-directory-realm]]
|
|
|
|
=== Active Directory User Authentication
|
|
|
|
|
|
|
|
You can configure {security} to communicate with Active Directory to authenticate
|
|
|
|
users. To integrate with Active Directory, you configure an `active_directory`
|
|
|
|
realm and map Active Directory users and groups to {security} roles in the
|
|
|
|
<<mapping-roles, role mapping file>>.
|
|
|
|
|
2018-05-01 12:15:13 -04:00
|
|
|
See {ref}/configuring-ad-realm.html[Configuring an Active Directory Realm].
|
2017-04-06 21:29:29 -04:00
|
|
|
|
|
|
|
{security} uses LDAP to communicate with Active Directory, so `active_directory`
|
|
|
|
realms are similar to <<ldap-realm, `ldap` realms>>. Like LDAP directories,
|
|
|
|
Active Directory stores users and groups hierarchically. The directory's
|
|
|
|
hierarchy is built from containers such as the _organizational unit_ (`ou`),
|
|
|
|
_organization_ (`o`), and _domain controller_ (`dc`).
|
|
|
|
|
|
|
|
The path to an entry is a _Distinguished Name_ (DN) that uniquely identifies a
|
|
|
|
user or group. User and group names typically have attributes such as a
|
|
|
|
_common name_ (`cn`) or _unique ID_ (`uid`). A DN is specified as a string, for
|
|
|
|
example `"cn=admin,dc=example,dc=com"` (white spaces are ignored).
|
|
|
|
|
|
|
|
{security} only supports Active Directory security groups. You cannot map
|
|
|
|
distribution groups to roles.
|
|
|
|
|
|
|
|
NOTE: When you use Active Directory for authentication, the username entered by
|
|
|
|
the user is expected to match the `sAMAccountName` or `userPrincipalName`,
|
|
|
|
not the common name.
|
|
|
|
|
2017-07-12 16:01:39 -04:00
|
|
|
The Active Directory realm authenticates users using an LDAP bind request. After
|
|
|
|
authenticating the user, the realm then searches to find the user's entry in
|
|
|
|
Active Directory. Once the user has been found, the Active Directory realm then
|
|
|
|
retrieves the user's group memberships from the `tokenGroups` attribute on the
|
|
|
|
user's entry in Active Directory.
|
|
|
|
|
2017-04-06 21:29:29 -04:00
|
|
|
[[ad-load-balancing]]
|
2018-05-01 13:21:39 -04:00
|
|
|
==== Load Balancing and Failover
|
2017-04-06 21:29:29 -04:00
|
|
|
The `load_balance.type` setting can be used at the realm level to configure how
|
|
|
|
{security} should interact with multiple Active Directory servers. Two modes of
|
2018-04-30 11:52:21 -04:00
|
|
|
operation are supported: failover and load balancing.
|
2017-04-06 21:29:29 -04:00
|
|
|
|
2018-04-30 11:52:21 -04:00
|
|
|
See {ref}/security-settings.html#load-balancing[Load Balancing and Failover Settings].
|
2017-04-06 21:29:29 -04:00
|
|
|
|
|
|
|
[[ad-settings]]
|
2018-05-01 13:21:39 -04:00
|
|
|
==== Active Directory Realm Settings
|
2017-04-06 21:29:29 -04:00
|
|
|
|
2018-04-30 11:52:21 -04:00
|
|
|
See {ref}/security-settings.html#ref-ad-settings[Active Directory Realm Settings].
|
2017-04-06 21:29:29 -04:00
|
|
|
|
|
|
|
[[mapping-roles-ad]]
|
|
|
|
==== Mapping Active Directory Users and Groups to Roles
|
|
|
|
|
2018-05-01 12:15:13 -04:00
|
|
|
See {ref}/configuring-ad-realm.html[Configuring an Active Directory realm].
|
2017-04-06 21:29:29 -04:00
|
|
|
|
2017-05-12 02:51:47 -04:00
|
|
|
[[ad-user-metadata]]
|
|
|
|
==== User Metadata in Active Directory Realms
|
2018-05-01 12:15:13 -04:00
|
|
|
|
2017-05-12 02:51:47 -04:00
|
|
|
When a user is authenticated via an Active Directory realm, the following
|
2018-05-01 12:15:13 -04:00
|
|
|
properties are populated in the user's _metadata_:
|
2017-05-12 02:51:47 -04:00
|
|
|
|
|
|
|
|=======================
|
|
|
|
| Field | Description
|
|
|
|
| `ldap_dn` | The distinguished name of the user.
|
|
|
|
| `ldap_groups` | The distinguished name of each of the groups that were
|
|
|
|
resolved for the user (regardless of whether those
|
|
|
|
groups were mapped to a role).
|
|
|
|
|=======================
|
|
|
|
|
2018-05-01 12:15:13 -04:00
|
|
|
This metadata is returned in the
|
|
|
|
{ref}/security-api-authenticate.html[authenticate API] and can be used with
|
|
|
|
<<templating-role-query, templated queries>> in roles.
|
|
|
|
|
2017-06-06 00:12:31 -04:00
|
|
|
Additional metadata can be extracted from the Active Directory server by configuring
|
|
|
|
the `metadata` setting on the Active Directory realm.
|
2017-05-12 02:51:47 -04:00
|
|
|
|
2017-04-06 21:29:29 -04:00
|
|
|
[[active-directory-ssl]]
|
|
|
|
==== Setting up SSL Between Elasticsearch and Active Directory
|
|
|
|
|
2018-05-01 12:15:13 -04:00
|
|
|
See
|
|
|
|
{ref}/configuring-tls.html#tls-active-directory[Encrypting communications between {es} and Active Directory].
|