Skip to content

ADH-8311: Fix Kerberized Solr audit writes on Java 25#52

Merged
iamlapa merged 2 commits into
develop/2.2.0/2.6.0.4from
bugfix/ADH-8311
May 21, 2026
Merged

ADH-8311: Fix Kerberized Solr audit writes on Java 25#52
iamlapa merged 2 commits into
develop/2.2.0/2.6.0.4from
bugfix/ADH-8311

Conversation

@iamlapa

@iamlapa iamlapa commented May 21, 2026

Copy link
Copy Markdown

Fix Kerberized Solr audit writes when Ranger runs with newer Java/Hadoop runtimes.

With Java 25 and Hadoop 3.4.3, SubjectUtil.doAs() uses the newer Subject.callAs() path. The authenticated Subject is scoped to the current execution context and is not reliably available in SolrJ worker threads created by CloudSolrClient parallel updates.

This caused Ranger audit writes to fail against Kerberized Solr with 401 Unauthorized / No valid credentials provided, even though the keytab login itself succeeded.

Changes

  • Disable SolrJ parallel update execution for CloudSolrClient in SolrAuditDestination.
  • Apply the same behavior to DbToSolrMigrationUtil for audit migration writes to SolrCloud.

Why

Ranger wraps solrClient.add(...) in a Kerberos action, but SolrJ parallel updates can move the actual HTTP/SPNEGO update request to an internal executor thread. On modern Java/Hadoop, that thread does not inherit the Subject from the caller context.

Using withParallelUpdates(false) keeps the Solr update request inside the active Kerberos action context.

@iamlapa iamlapa merged commit 80a7976 into develop/2.2.0/2.6.0.4 May 21, 2026
1 of 2 checks passed
@iamlapa iamlapa deleted the bugfix/ADH-8311 branch May 21, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants