Skip to content

Commit 37f65b0

Browse files
add documentation for MS Graph plugin (#130703)
1 parent 50c3cd4 commit 37f65b0

11 files changed

+199
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/plugins/current/authentication.html
4+
applies_to:
5+
stack: ga 9.1
6+
---
7+
8+
# Authentication plugins [authentication]
9+
10+
Authentication plugins extend the functionality provided by the built-in [authentication realms](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/authentication-realms.md).
11+
12+
## Core authentication plugins
13+
14+
[Microsoft Graph Authz](/reference/elasticsearch-plugins/ms-graph-authz.md)
15+
: The Microsoft Graph Authz plugin uses [Microsoft Graph](https://learn.microsoft.com/en-us/graph/api/user-list-memberof) to look up group membership information from Microsoft Entra ID
178 KB
Loading
107 KB
Loading
148 KB
Loading
130 KB
Loading
136 KB
Loading
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/plugins/current/ms-graph-authz-configure-azure.html
4+
applies_to:
5+
stack: ga 9.1
6+
---
7+
8+
# Configure Azure [configure-azure]
9+
10+
To make API calls to Microsoft Graph, Elasticsearch requires Azure credentials
11+
with the correct permissions.
12+
13+
## Create a custom Azure application
14+
15+
1) Log in to the [Azure portal](https://portal.azure.com) and go to Microsoft
16+
Entra ID.
17+
2) To register a new application, click **Enterprise applications** > **New
18+
application**.
19+
3) Click **Create your own application**, provide a name, and select the
20+
**Integrate any other application you don’t find in the gallery** option.
21+
22+
:::{image} ./images/ms-graph-authz/01-create-enterprise-application.png
23+
:alt: "create your own application" page
24+
:::
25+
26+
## Configure the custom application
27+
28+
1) In the [Azure portal](https://portal.azure.com), go to Microsoft Entra ID.
29+
2) Under **App registrations**, select the **All applications** tab, and then
30+
find the application created in the previous section.
31+
32+
:::{image} ./images/ms-graph-authz/02-find-app-registration.png
33+
:alt: find your app registration
34+
:::
35+
3) Take note of the **Application (client) ID** and **Tenant ID** shown here.
36+
These will be needed to configure Elasticsearch later.
37+
38+
:::{image} ./images/ms-graph-authz/03-get-application-id.png
39+
:alt: get your application ID
40+
:::
41+
4) Under **Manage** > **Certificates & secrets**, do the following:
42+
- Create a new client secret.
43+
- Take note of your new client secret's **Value**. This is needed later, and
44+
is only displayed once.
45+
:::{image} ./images/ms-graph-authz/04-create-client-secret.png
46+
:alt: get your client secret
47+
:::
48+
5) Under **Manage** > **API permissions**, do the following:
49+
1. Go to **Add a permission**.
50+
2. Choose **Microsoft Graph**.
51+
3. Choose **Application permissions**.
52+
4. Select `Directory.ReadWrite.All`, `Group.ReadWrite.All`, `User.Read.All`.
53+
54+
:::{note}
55+
An Azure Admin must approve these permissions before the credentials can be used.
56+
:::
57+
58+
:::{image} ./images/ms-graph-authz/05-configure-api-permissions.png
59+
:alt: configure api permissions
60+
:::
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/plugins/current/ms-graph-authz-configure-elastic.html
4+
applies_to:
5+
stack: ga 9.1
6+
---
7+
8+
# Configuration properties [configuration-properties]
9+
10+
After the plugin is installed, the following configuration settings are
11+
available:
12+
13+
`xpack.security.authc.realms.microsoft_graph.*.order`
14+
: The priority of the realm within the realm chain. Realms with a lower order
15+
are consulted first. The value must be unique for each realm. This setting is
16+
required.
17+
18+
`xpack.security.authc.realms.microsoft_graph.*.tenant_id`
19+
: Your Microsoft Entra
20+
ID [Tenant ID](https://learn.microsoft.com/en-us/entra/fundamentals/how-to-find-tenant).
21+
This setting is required.
22+
23+
`xpack.security.authc.realms.microsoft_graph.*.client_id`
24+
: The Application ID of the Enterprise Application you registered in the
25+
previous section. This setting is required.
26+
27+
`xpack.security.authc.realms.microsoft_graph.*.client_secret`
28+
: The client secret value for the Application you registered in the previous
29+
section. This is a sensitive setting, and must be configured in the
30+
Elasticsearch keystore. This setting is required.
31+
32+
`xpack.security.authc.realms.microsoft_graph.*.access_token_host`
33+
: A Microsoft login URL. Defaults to `https://login.microsoftonline.com`.
34+
35+
`xpack.security.authc.realms.microsoft_graph.*.graph_host`
36+
: The Microsoft Graph base address. Defaults to
37+
`https://graph.microsoft.com/v1.0`.
38+
39+
`xpack.security.authc.realms.microsoft_graph.*.http_request_timeout`
40+
: The timeout for individual Graph HTTP requests. Defaults to `10s`.
41+
42+
`xpack.security.authc.realms.microsoft_graph.*.execution_timeout`
43+
: The overall timeout for authorization requests to this plugin. Defaults to
44+
`30s`.
45+
46+
Create a Microsoft Graph realm, following the above settings, then configure an
47+
existing realm to delegate to it using `authorization_realms`.
48+
49+
For example, the following configuration authenticates via Microsoft Entra with
50+
SAML, and uses the Microsoft Graph plugin to look up group membership:
51+
52+
```yaml
53+
xpack.security.authc.realms.saml.kibana-realm:
54+
order: 2
55+
attributes.principal: nameid
56+
attributes.groups: "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups"
57+
idp.metadata.path: "https://login.microsoftonline.com/<Tenant_ID>/federationmetadata/2007-06/federationmetadata.xml?appid=<Application_ID>"
58+
idp.entity_id: "https://sts.windows.net/<Tenant_ID>/"
59+
sp.entity_id: "<Kibana_Endpoint_URL>"
60+
sp.acs: "<Kibana_Endpoint_URL>/api/security/saml/callback"
61+
sp.logout: "<Kibana_Endpoint_URL>/logout"
62+
authorization_realms: microsoft_graph1
63+
64+
xpack.security.authc.realms.microsoft_graph.microsoft_graph1:
65+
order: 3
66+
tenant_id: "<Tenant_ID>"
67+
client_id: "<Graph_Application_ID>"
68+
```
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/plugins/current/ms-graph-authz.html
4+
applies_to:
5+
stack: ga 9.1
6+
---
7+
8+
# Microsoft Graph Authz [ms-graph-authz]
9+
10+
The Microsoft Graph Authz plugin uses [Microsoft Graph](https://learn.microsoft.com/en-us/graph/api/user-list-memberof)
11+
to look up group membership information from Microsoft Entra ID.
12+
13+
This is primarily intended to work around the Microsoft Entra ID maximum group
14+
size limit (see [Group overages](https://learn.microsoft.com/en-us/security/zero-trust/develop/configure-tokens-group-claims-app-roles#group-overages)).
15+
16+
## Installation [ms-graph-authz-install]
17+
18+
If you're using a [self-managed Elasticsearch cluster](docs-content:///deploy-manage/deploy/self-managed.md), then this plugin can be installed using the plugin manager:
19+
20+
```sh
21+
sudo bin/elasticsearch-plugin install microsoft-graph-authz
22+
```
23+
24+
The plugin must be installed on every node in the cluster, and each node must be
25+
restarted after installation.
26+
27+
You can download this plugin
28+
for [offline install](/reference/elasticsearch-plugins/plugin-management-custom-url.md)
29+
from [https://artifacts.elastic.co/downloads/elasticsearch-plugins/microsoft-graph-authz/microsoft-graph-authz-{{version.stack}}.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/microsoft-graph-authz/microsoft-graph-authz-{{version.stack}}.zip).
30+
To verify the `.zip` file, use
31+
the [SHA hash](https://artifacts.elastic.co/downloads/elasticsearch-plugins/microsoft-graph-authz/microsoft-graph-authz-{{version.stack}}.zip.sha512)
32+
or [ASC key](https://artifacts.elastic.co/downloads/elasticsearch-plugins/microsoft-graph-authz/microsoft-graph-authz-{{version.stack}}.zip.asc).
33+
34+
For all other deployment types, refer to [plugin management](/reference/elasticsearch-plugins/plugin-management.md).
35+
36+
## Removal [ms-graph-authz-remove]
37+
38+
The plugin can be removed with the following command:
39+
40+
```sh
41+
sudo bin/elasticsearch-plugin remove microsoft-graph-authz
42+
```
43+
44+
The node must be stopped before removing the plugin.
45+
46+
## Configuration
47+
48+
To learn how to configure the Microsoft Graph Authz plugin, refer to [configuration properties](/reference/elasticsearch-plugins/ms-graph-authz-configure-elasticsearch.md).

docs/reference/elasticsearch-plugins/plugin-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Use the `elasticsearch-plugin` command line tool to install, list, and remove pl
106106

107107
Run the following command to get usage instructions:
108108

109-
```
109+
```
110110
sudo bin/elasticsearch-plugin -h
111111
```
112112

0 commit comments

Comments
 (0)