ADH-6782: Add SPNEGO authentication for History Server & SQL Gateway REST APIs #15
Open
iamlapa wants to merge 9 commits into
Open
ADH-6782: Add SPNEGO authentication for History Server & SQL Gateway REST APIs #15iamlapa wants to merge 9 commits into
iamlapa wants to merge 9 commits into
Conversation
Add opt-in Kerberos/SPNEGO authentication for the History Server web UI and REST endpoints. When enabled, unauthenticated requests receive a Negotiate challenge and authenticated clients get a signed hadoop.auth cookie. This change adds History Server authentication configuration options, Netty authentication handling, Hadoop Auth-compatible token signing, MiniKDC integration coverage, and documentation/config examples. Authentication remains disabled by default.
Add opt-in Kerberos/SPNEGO authentication for SQL Gateway REST APIs. When enabled, unauthenticated requests receive a Negotiate challenge, valid SPNEGO clients receive a signed hadoop.auth cookie, and invalid tokens are rejected. This change adds SQL Gateway REST authentication options, startup configuration validation, a ServiceLoader Netty inbound handler, cookie signing/verification, Hadoop Auth dependencies, MiniKDC coverage, docs, and sample configuration. Default behavior remains unchanged with authentication.type=NONE.
Introduce a new API endpoint (`/auth/user`) to expose user authentication details in the History Server. This includes backend integration for user data retrieval, Angular frontend updates for UI visibility, and comprehensive tests to cover behavior in authenticated and unauthenticated scenarios.
tigrulya-exe
approved these changes
Jun 16, 2026
Add opt-in Kerberos/SPNEGO authentication for the JobManager Web UI and REST endpoint. The default mode remains NONE, while KERBEROS protects all WebMonitor paths including dashboard assets, job metadata, JAR upload/run, cancel, and rescale endpoints.
ADH-7564: Add SPNEGO authentication for JobManager Web UI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The default behavior remains unchanged: authentication type is
NONEunless explicitly enabled.Problem
History Server and SQL Gateway REST can be exposed on network interfaces without authentication.
This allows unauthenticated users to:
Changes
/v*/info.Authorization: Negotiate/WWW-Authenticate: Negotiateflow.hadoop.authcookies after successful SPNEGO negotiation.HTTP/_HOST@REALMprincipal replacement and wildcard*keytab principal loading./auth/userHistory Server endpoint and UI display of the authenticated user.New Settings
History Server
historyserver.web.authentication.typeAuthentication mode. Default:
NONE. Supported:NONE,KERBEROS.historyserver.web.authentication.kerberos.principalKerberos HTTP service principal for SPNEGO. Required for
KERBEROS. SupportsHTTP/_HOST@REALMand*.historyserver.web.authentication.kerberos.keytabKeytab path for the History Server SPNEGO principal. Required for
KERBEROS.historyserver.web.authentication.kerberos.name-rulesOptional Kerberos auth-to-local rules. Uses the default Hadoop rule when unset.
historyserver.web.authentication.token.validitySigned auth cookie validity. Default:
10 h.historyserver.web.authentication.cookie.pathCookie path for
hadoop.auth. Default:/.historyserver.web.authentication.signature.secretInline shared cookie-signing secret.
historyserver.web.authentication.signature.secret-fileFile containing shared cookie-signing secret.
SQL Gateway REST
sql-gateway.endpoint.rest.authentication.typeAuthentication mode. Default:
NONE. Supported:NONE,KERBEROS.sql-gateway.endpoint.rest.authentication.kerberos.principalKerberos HTTP service principal for SPNEGO. Required for
KERBEROS. SupportsHTTP/_HOST@REALMand*.sql-gateway.endpoint.rest.authentication.kerberos.keytabKeytab path for the SQL Gateway REST SPNEGO principal. Required for
KERBEROS.sql-gateway.endpoint.rest.authentication.kerberos.name-rulesKerberos auth-to-local rules. Default:
DEFAULT.sql-gateway.endpoint.rest.authentication.token.validitySigned auth cookie validity. Default:
10 h.sql-gateway.endpoint.rest.authentication.cookie.pathCookie path for
hadoop.auth. Default:/.sql-gateway.endpoint.rest.authentication.signature.secretInline shared cookie-signing secret.
sql-gateway.endpoint.rest.authentication.signature.secret-fileFile containing shared cookie-signing secret.