Skip to content

Commit 38886e8

Browse files
authored
[DOCS] Add Kerberos troubleshooting documentation (#32803)
This commit adds troubleshooting section for Kerberos. Most of the times the problems seen are caused due to invalid configurations like keytab missing principals or credentials not up to date. Time synchronization is an important part for Kerberos infrastructure and the time skew can cause problems. To debug further documentation explains how to enable JAAS Kerberos login module debugging and Kerberos/SPNEGO debugging by setting JVM system properties.
1 parent 8fc213f commit 38886e8

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

x-pack/docs/en/security/troubleshooting.asciidoc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ answers for frequently asked questions.
1515
* <<trb-security-maccurl>>
1616
* <<trb-security-sslhandshake>>
1717
* <<trb-security-ssl>>
18+
* <<trb-security-kerberos>>
1819
* <<trb-security-internalserver>>
1920
* <<trb-security-setup>>
2021

@@ -319,6 +320,77 @@ In this case, you must install the
319320
<<ciphers, JCE Unlimited Strength Jurisdiction Policy Files>>.
320321
--
321322

323+
[[trb-security-kerberos]]
324+
=== Common Kerberos exceptions
325+
326+
*Symptoms:*
327+
328+
* User authentication fails due to either GSS negotiation failure
329+
or a service login failure (either on the server or in the {es} http client).
330+
Some of the common exceptions are listed below with some tips to help resolve
331+
them.
332+
333+
*Resolution:*
334+
335+
`Failure unspecified at GSS-API level (Mechanism level: Checksum failed)`::
336+
+
337+
--
338+
339+
When you see this error message on the HTTP client side, then it may be
340+
related to an incorrect password.
341+
342+
When you see this error message in the {es} server logs, then it may be
343+
related to the {es} service keytab. The keytab file is present but it failed
344+
to log in as the user. Please check the keytab expiry. Also check whether the
345+
keytab contain up-to-date credentials; if not, replace them.
346+
347+
You can use tools like `klist` or `ktab` to list principals inside
348+
the keytab and validate them. You can use `kinit` to see if you can acquire
349+
initial tickets using the keytab. Please check the tools and their documentation
350+
in your Kerberos environment.
351+
352+
Kerberos depends on proper hostname resolution, so please check your DNS infrastructure.
353+
Incorrect DNS setup, DNS SRV records or configuration for KDC servers in `krb5.conf`
354+
can cause problems with hostname resolution.
355+
356+
--
357+
358+
`Failure unspecified at GSS-API level (Mechanism level: Request is a replay (34))`::
359+
360+
`Failure unspecified at GSS-API level (Mechanism level: Clock skew too great (37))`::
361+
+
362+
--
363+
364+
To prevent replay attacks, Kerberos V5 sets a maximum tolerance for computer
365+
clock synchronization and it is typically 5 minutes. Please check whether
366+
the time on the machines within the domain is in sync.
367+
368+
--
369+
370+
As Kerberos logs are often cryptic in nature and many things can go wrong
371+
as it depends on external services like DNS and NTP. You might
372+
have to enable additional debug logs to determine the root cause of the issue.
373+
374+
{es} uses a JAAS (Java Authentication and Authorization Service) Kerberos login
375+
module to provide Kerberos support. To enable debug logs on {es} for the login
376+
module use following Kerberos realm setting:
377+
[source,yaml]
378+
----------------
379+
xpack.security.authc.realms.<realm-name>.krb.debug: true
380+
----------------
381+
382+
For detailed information, see {ref}/security-settings.html#ref-kerberos-settings[Kerberos realm settings].
383+
384+
Sometimes you may need to go deeper to understand the problem during SPNEGO
385+
GSS context negotiation or look at the Kerberos message exchange. To enable
386+
Kerberos/SPNEGO debug logging on JVM, add following JVM system properties:
387+
388+
`-Dsun.security.krb5.debug=true`
389+
390+
`-Dsun.security.spnego.debug=true`
391+
392+
For more information about JVM system properties, see {ref}/jvm-options.html[configuring JVM options].
393+
322394
[[trb-security-internalserver]]
323395
=== Internal Server Error in Kibana
324396

0 commit comments

Comments
 (0)