Okta Access Gateway Kerberos Application Fails With a 401 - Unauthorised and Server Not Found In Kerberos Database Errors
Last Updated:
Overview
Okta Access Gateway (OAG) generates a 401 error when a user attempts to access an Internet Information Services (IIS) application because the authentication header name is incorrect. Administrators must change the header attribute name to iwa_username in the OAG application settings to resolve the issue. This issue assumes the Kerberos realm is valid and the Kerberos simulator is successful.
Okta displays the following error when a user attempts to access the application:
401 - Unauthorized: Access is denied due to invalid credentials.
Okta generates the following log entries when this error occurs:
Server not found in Kerberos database.
information, client: 10.43.85.11, server: gw-iis.nbcorp.us, request: "GET / HTTP/2.0", host: "gw-iis.nbcorp.us", referrer: "https://okta-nbcorp.pixtulate.com/ "
2023-06-16T12:55:56.000-04:00 oag-admin.nbcorp.us oag-admin.nbcorp.us LWxmOLdK4: 2023/06/16 12:55:56 [error] 4056#0: *637 [lua] authSession.lua:1444: Minor ERR:Server not found in Kerberos database, client: 10.43.8
5.11, server: gw-iis.nbcorp.us, request: "GET / HTTP/2.0", host: "gw-iis.nbcorp.us", referrer: "https://okta-nbcorp.pixtulate.com/ "
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Access Gateway (OAG)
- Kerberos
- Internet Information Services (IIS) Application
Cause
Okta Access Gateway requires the authentication header name to be exactly iwa_username.
The following image displays the correct header configuration.
If an administrator configures a different header name, Okta cannot request the Kerberos ticket from the Key Distribution Center (KDC). The KDC rejects the Kerberos ticket request and generates a KDC_ERR_C_PRINCIPAL_UNKNOWN error.
The following packet capture image displays the KDC rejection error.
Solution
How is the Okta Access Gateway Kerberos application 401 error resolved?
Resolve the 401 error by configuring the header attribute name to iwa_username in the Okta Access Gateway application settings by following these steps.
- Navigate to the Okta Access Gateway application settings.
- Locate the header attribute used for authentication.
- Change the name of the header attribute to
iwa_username. - Save the configuration.
