Skip to content

Commit 4bbf530

Browse files
Add documentation on Kerberos configuration (#7844) (#7864)
1 parent 16b3b1e commit 4bbf530

File tree

2 files changed

+64
-62
lines changed

2 files changed

+64
-62
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
layout: default
3+
title: Kerberos
4+
parent: Authentication backends
5+
nav_order: 75
6+
---
7+
8+
# Kerberos
9+
10+
Kerberos is a robust and secure method for user authentication that prevents passwords from being sent over the internet by issuing "tickets" for secure identity verification.
11+
12+
In order to use Kerberos authentication, you must set the following settings in `opensearch.yml` and `config.yml`.
13+
14+
## OpenSearch node configuration
15+
16+
In `opensearch.yml`, define the following settings:
17+
18+
```yml
19+
plugins.security.kerberos.krb5_filepath: '/etc/krb5.conf'
20+
plugins.security.kerberos.acceptor_keytab_filepath: 'opensearch_keytab.tab'
21+
plugins.security.kerberos.acceptor_principal: 'HTTP/localhost'
22+
```
23+
24+
Name | Description
25+
:--- | :---
26+
`krb5_filepath` | The path to your Kerberos configuration file. This file contains various settings regarding your Kerberos installation, for example, the `realm` names, `hostnames`, and ports of the Kerberos key distribution center (KDC).
27+
`acceptor_keytab_filepath` | The path to the `keytab` file, which contains the principal that the Security plugin uses to issue requests through Kerberos.
28+
`acceptor_principal` | The principal that the Security plugin uses to issue requests through Kerberos. This value must be present in the `keytab` file.
29+
30+
Due to security restrictions, the `keytab` file must be placed in `config` or a subdirectory, and the path in `opensearch.yml` must be relative, not absolute.
31+
{: .note }
32+
33+
## Cluster security configuration
34+
35+
The following example shows a typical Kerberos authentication domain in `config.yml`:
36+
37+
```yml
38+
kerberos_auth_domain:
39+
enabled: true
40+
order: 1
41+
http_authenticator:
42+
type: kerberos
43+
challenge: true
44+
config:
45+
krb_debug: false
46+
strip_realm_from_principal: true
47+
authentication_backend:
48+
type: noop
49+
```
50+
51+
Authentication through Kerberos when using a browser on an HTTP level is achieved using SPNEGO. Kerberos/SPNEGO implementations vary, depending on your browser and operating system. This is important when deciding if you need to set the `challenge` flag to `true` or `false`.
52+
53+
As with [HTTP Basic Authentication]({{site.url}}{{site.baseurl}}/security/authentication-backends/basic-authc/), this flag determines how the Security plugin should react when no `Authorization` header is found in the HTTP request or if this header does not equal `negotiate`.
54+
55+
If set to `true`, the Security plugin sends a response with status code 401 and a `WWW-Authenticate` header set to `negotiate`. This tells the client (browser) to resend the request with the `Authorization` header set. If set to `false`, the Security plugin cannot extract the credentials from the request, and authentication fails. Setting `challenge` to `false` thus makes sense only if the Kerberos credentials are sent in the initial request.
56+
57+
Name | Description
58+
:--- | :---
59+
`krb_debug` | As the name implies, setting it to `true` outputs Kerberos-specific debugging messages to `stdout`. Use this setting if you encounter problems with your Kerberos integration. Default is `false`.
60+
`strip_realm_from_principal` | When set it to `true`, the Security plugin strips the realm from the user name. Default: `true`.
61+
62+
Because Kerberos/SPNEGO authenticates users on an HTTP level, no additional `authentication_backend` is needed. Set this value to `noop`.

_security/configuration/configuration.md

+2-62
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ The `type` setting for `http_authenticator` accepts the following values. For mo
9797
| Value | Description |
9898
| :--- | :--- |
9999
| `basic` | HTTP basic authentication. For more information about using basic authentication, see the HTTP basic authentication documentation. |
100+
| `kerberos` | Kerberos authentication. See the Kerberos documentation for additional configuration information. |
100101
| `jwt` | JSON Web Token (JWT) authentication. See the JSON Web Token documentation for additional configuration information. |
101102
| `openid` | OpenID Connect authentication. See the OpenID Connect documentation for additional configuration information. |
102103
| `saml` | SAML authentication. See the SAML documentation for additional configuration information. |
@@ -162,65 +163,4 @@ To learn about configuring the authentication backends, see the [Authentication
162163
* [Active Directory and LDAP]({{site.url}}{{site.baseurl}}/security/authentication-backends/ldap/)
163164
* [Proxy-based authentication]({{site.url}}{{site.baseurl}}/security/authentication-backends/proxy/)
164165
* [Client certificate authentication]({{site.url}}{{site.baseurl}}/security/authentication-backends/client-auth/)
165-
166-
167-
<!--- Remvoving Kerberos documentation until issue #907 is resolved.
168-
### Kerberos
169-
170-
Kerberos authentication does not work with OpenSearch Dashboards. To track OpenSearch's progress in adding support for Kerberos in OpenSearch Dashboards, see [issue #907](https://github.com/opensearch-project/security-dashboards-plugin/issues/907) in the Dashboard's Security plugin repository.
171-
{: .warning }
172-
173-
Due to the nature of Kerberos, you must define some settings in `opensearch.yml` and some in `config.yml`.
174-
175-
In `opensearch.yml`, define the following:
176-
177-
```yml
178-
plugins.security.kerberos.krb5_filepath: '/etc/krb5.conf'
179-
plugins.security.kerberos.acceptor_keytab_filepath: 'eskeytab.tab'
180-
```
181-
182-
- `plugins.security.kerberos.krb5_filepath` defines the path to your Kerberos configuration file. This file contains various settings regarding your Kerberos installation, for example, the realm names, hostnames, and ports of the Kerberos key distribution center (KDC).
183-
184-
- `plugins.security.kerberos.acceptor_keytab_filepath` defines the path to the keytab file, which contains the principal that the Security plugin uses to issue requests against Kerberos.
185-
186-
- `plugins.security.kerberos.acceptor_principal: 'HTTP/localhost'` defines the principal that the Security plugin uses to issue requests against Kerberos. This value must be present in the keytab file.
187-
188-
Due to security restrictions, the keytab file must be placed in `config` or a subdirectory, and the path in `opensearch.yml` must be relative, not absolute.
189-
{: .note }
190-
191-
192-
#### Dynamic configuration
193-
194-
A typical Kerberos authentication domain in `config.yml` looks like this:
195-
196-
```yml
197-
authc:
198-
kerberos_auth_domain:
199-
enabled: true
200-
order: 1
201-
http_authenticator:
202-
type: kerberos
203-
challenge: true
204-
config:
205-
krb_debug: false
206-
strip_realm_from_principal: true
207-
authentication_backend:
208-
type: noop
209-
```
210-
211-
Authentication against Kerberos through a browser on an HTTP level is achieved using SPNEGO. Kerberos/SPNEGO implementations vary, depending on your browser and operating system. This is important when deciding if you need to set the `challenge` flag to `true` or `false`.
212-
213-
As with [HTTP Basic Authentication](#http-basic), this flag determines how the Security plugin should react when no `Authorization` header is found in the HTTP request or if this header does not equal `negotiate`.
214-
215-
If set to `true`, the Security plugin sends a response with status code 401 and a `WWW-Authenticate` header set to `negotiate`. This tells the client (browser) to resend the request with the `Authorization` header set. If set to `false`, the Security plugin cannot extract the credentials from the request, and authentication fails. Setting `challenge` to `false` thus makes sense only if the Kerberos credentials are sent in the initial request.
216-
217-
As the name implies, setting `krb_debug` to `true` will output Kerberos-specific debugging messages to `stdout`. Use this setting if you encounter problems with your Kerberos integration.
218-
219-
If you set `strip_realm_from_principal` to `true`, the Security plugin strips the realm from the user name.
220-
221-
222-
#### Authentication backend
223-
224-
Because Kerberos/SPNEGO authenticates users on an HTTP level, no additional `authentication_backend` is needed. Set this value to `noop`.
225-
--->
226-
166+
* [Kerberos authentication]({{site.url}}{{site.baseurl}}/security/authentication-backends/kerberos/)

0 commit comments

Comments
 (0)