Skip to content

Conversation

@mneethiraj
Copy link
Contributor

What changes were proposed in this pull request?

Update Ranger policy engine to support RangerInlinePolicy, which can be used to authorize access to resources based on ACLs managed by services, in addition to Ranger policies.

How was this patch tested?

Added unit tests.

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

This PR introduces support for RangerInlinePolicy to enable service-managed ACLs alongside Ranger policies. The implementation adds a new policy evaluation mechanism that allows services to authorize access based on ACLs they manage directly, with configurable modes for combining Ranger and inline policy decisions.

Key changes:

  • Added RangerInlinePolicy model with support for grants, resources, and permissions
  • Implemented RangerInlinePolicyEvaluator to evaluate inline policies during access requests
  • Extended the policy engine to support inline policy evaluation with three modes: INLINE, RANGER_AND_INLINE, and RANGER_OR_INLINE

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
authz-api/src/main/java/org/apache/ranger/authz/util/RangerResourceNameParser.java Made resource separator character configurable to support flexible resource naming
agents-common/src/main/java/org/apache/ranger/plugin/model/RangerInlinePolicy.java New model class defining inline policy structure with grants, modes, and permissions
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerInlinePolicyEvaluator.java New evaluator implementing inline policy authorization logic
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java Integrated inline policy evaluation into the main policy engine flow
agents-common/src/main/java/org/apache/ranger/plugin/model/RangerServiceDef.java Added configuration option for customizable resource separator character
agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefHelper.java Extended to support resource parsing and RRN template generation with configurable separator
agents-common/src/test/resources/policyevaluator/test_inline_policies_ozone.json Test data covering various inline policy scenarios for Ozone service
distro/src/main/assembly/*.xml Added ranger-authz-api dependency to all distribution assemblies

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

@mneethiraj mneethiraj requested a review from Copilot November 22, 2025 01:42
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 40 out of 40 changed files in this pull request and generated no new 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.

1 participant