RANGER-5529: RangerAuthorizer update to be REST friendly#890
Open
mneethiraj wants to merge 2 commits intoapache:masterfrom
Open
RANGER-5529: RangerAuthorizer update to be REST friendly#890mneethiraj wants to merge 2 commits intoapache:masterfrom
mneethiraj wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Ranger authz API to make getResourcePermissions() REST/HTTP-POST friendly by wrapping inputs into a single request object, and adjusts embedded implementation/tests accordingly.
Changes:
- Replace
getResourcePermissions(resource, context)withgetResourcePermissions(RangerResourcePermissionsRequest)in theRangerAuthorizerAPI. - Introduce
RangerResourcePermissionsRequestmodel for REST-friendly request payloads. - Update embedded authorizer/plugin and unit tests to use the new request wrapper; adjust
RangerAuthzPluginconstructor visibility.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| authz-embedded/src/test/java/org/apache/ranger/authz/embedded/TestEmbeddedAuthorizer.java | Updates test to call getResourcePermissions() with the new request wrapper. |
| authz-embedded/src/main/java/org/apache/ranger/authz/embedded/RangerEmbeddedAuthorizer.java | Implements the new getResourcePermissions(request) API and routes to the embedded plugin. |
| authz-embedded/src/main/java/org/apache/ranger/authz/embedded/RangerAuthzPlugin.java | Updates plugin-side resource-permissions method to accept the new request object; constructor visibility adjusted. |
| authz-api/src/test/java/org/apache/ranger/authz/DummyAuthorizer.java | Adapts test stub authorizer to the new method signature. |
| authz-api/src/main/java/org/apache/ranger/authz/model/RangerResourcePermissionsRequest.java | Adds new request model used by the REST-friendly API. |
| authz-api/src/main/java/org/apache/ranger/authz/api/RangerAuthorizer.java | Updates abstract API signature for resource-permissions retrieval. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
authz-embedded/src/main/java/org/apache/ranger/authz/embedded/RangerEmbeddedAuthorizer.java
Show resolved
Hide resolved
authz-embedded/src/main/java/org/apache/ranger/authz/embedded/RangerAuthzPlugin.java
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 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.
ramackri
approved these changes
Mar 26, 2026
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.
What changes were proposed in this pull request?
RangerAuthzPluginto package level, since this is not meant for use outside this packageThough this is a breaking change since the previous release (2.8.0, release earlier this month), updating to the new method signature is trivial (enough to avoid having to carry the previous API version in all releases going forward).
How was this patch tested?