RANGER-5710: Default access audit store to Solr - #1115
Merged
Conversation
ramackri
requested review from
kumaab,
mneethiraj,
pradeepagrawal8184 and
rameeshm
July 28, 2026 17:54
rameeshm
approved these changes
Jul 28, 2026
Contributor
|
@ramackri - Ranger doesn't support RDBMS as access audit log store since 2.2.0 release (see RANGER-3184), so this code path is a surprise! This code path was taken due to couple of things:
Couple of fixes to address this issue:
|
RDBMS access audit has been unsupported since RANGER-3184 (2.2.0). The RC1 Access Audit UI ClassCastException occurred because ranger.audit.source.type fell back to DB when unset (RangerBizUtil default) and docker Postgres install defaulted to OpenSearch. - Default auditDBType in RangerBizUtil: SOLR instead of RDBMS - conf.dist ranger-admin-site.xml: solr instead of db - Docker Postgres install.properties: audit_store=solr (OpenSearch commented)
Contributor
Author
|
Thanks @mneethiraj — agreed. RDBMS access audit has been deprecated since RANGER-3184; fixing the STR_LIST cast on Updated this PR to your suggested fixes:
Removed the |
mneethiraj
approved these changes
Jul 29, 2026
ramackri
pushed a commit
that referenced
this pull request
Jul 29, 2026
Backport from master (#1115). RDBMS access audit is unsupported since RANGER-3184 (2.2.0); default auditDBType to SOLR and ranger.audit.source.type to solr in conf.dist. Docker Postgres install.properties already uses Solr from f7e4809 (RANGER-5687).
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
ClassCastExceptionon multi-valuerequestUseroccurred because installs fell through to the deprecated DB audit path whenranger.audit.source.typewas unset or misconfigured:RangerBizUtildefaulted toAUDIT_STORE_RDBMSwhen the property was missinginstall.propertieshadaudit_store=opensearchactive while Solr URLs were commented outThis PR fixes configuration defaults so fresh installs and docker stacks use Solr (or explicitly configured OpenSearch), not the legacy DB path.
Changes
RangerBizUtil: defaultauditDBType→AUDIT_STORE_SOLR(wasAUDIT_STORE_RDBMS)conf.dist/ranger-admin-site.xml: defaultranger.audit.source.type→solr(wasdb)install.properties: enableaudit_store=solrwith FQDN Solr URLs; comment out OpenSearch blockTest plan
ranger.audit.source.type=solrinranger-admin-site.xmlafter setupGET /service/assets/accessAudit?requestUser=admin&requestUser=hive→ HTTP 200 via Solr pathranger.audit.source.typeunchangedhttps://issues.apache.org/jira/browse/RANGER-5710