Skip to content

RANGER-5505: update RangerEmbeddedAuthorizer to support caller provided audit handler#864

Open
mneethiraj wants to merge 2 commits intoapache:masterfrom
mneethiraj:RANGER-5505
Open

RANGER-5505: update RangerEmbeddedAuthorizer to support caller provided audit handler#864
mneethiraj wants to merge 2 commits intoapache:masterfrom
mneethiraj:RANGER-5505

Conversation

@mneethiraj
Copy link
Contributor

What changes were proposed in this pull request?

  • added RangerEmbeddedAuthorizer.authorize() methods that take caller provided RangerAuthzAuditHandler instances to handle generated audit logs

How was this patch tested?

  • verified that all unit tests pass successfully

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support in the embedded authorizer for caller-provided audit handlers so callers can control how audit events are handled/logged, and introduces a configurable appType used during audit initialization/agent identification.

Changes:

  • Added authorize() overloads on RangerEmbeddedAuthorizer that accept a caller-provided RangerAuthzAuditHandler.
  • Introduced ranger.authz.app.type configuration and used it to initialize the audit provider / set audit agentId.
  • Refactored multi-authorize logic into a private helper method shared by both entry points.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
authz-embedded/src/main/java/org/apache/ranger/authz/embedded/RangerEmbeddedAuthorizer.java Adds caller-provided audit handler overloads; changes audit initialization to use configured appType; refactors multi-authorize auditing path.
authz-embedded/src/main/java/org/apache/ranger/authz/embedded/RangerAuthzConfig.java Adds ranger.authz.app.type property + accessor; renames init-services constant.
authz-embedded/src/main/java/org/apache/ranger/authz/embedded/RangerAuthzAuditHandler.java Changes audit handler to accept an appType string and use it as the audit event agentId.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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