-
Notifications
You must be signed in to change notification settings - Fork 1k
RANGER-5309: add authz-api module #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduces a new authorization API module (authz-api) for Apache Ranger that provides a simplified interface for applications to leverage Ranger policies for resource authorization.
- Adds core API interfaces and models for authorization requests and responses
- Implements resource template parsing utility for flexible resource identification
- Provides error handling framework with categorized error codes
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
pom.xml | Adds authz-api module to Maven build configuration |
authz-api/pom.xml | Defines module dependencies including Jackson annotations and SLF4J logging |
authz-api/src/main/java/org/apache/ranger/authz/api/* | Core API interfaces for authorization factory, authorizer, and exception handling |
authz-api/src/main/java/org/apache/ranger/authz/model/* | Data models for authorization requests, results, and user information |
authz-api/src/main/java/org/apache/ranger/authz/util/RangerResourceTemplate.java | Utility for parsing resource templates with placeholder substitution |
authz-api/src/test/java/org/apache/ranger/authz/util/TestRangerResourceTemplate.java | Unit tests for resource template parsing across different service types |
authz-api/README.txt | Documentation explaining API usage with examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
authz-api/src/main/java/org/apache/ranger/authz/util/RangerResourceTemplate.java
Outdated
Show resolved
Hide resolved
authz-api/src/main/java/org/apache/ranger/authz/api/RangerAuthzApiErrorCode.java
Outdated
Show resolved
Hide resolved
…ourceTemplate.java Co-authored-by: Copilot <[email protected]>
…zApiErrorCode.java Co-authored-by: Copilot <[email protected]>
What changes were proposed in this pull request?
Introduces authorization API for use by applications that wants to leverage Ranger policies to authorize access to their resources. The API will have at least 2 implementations: 1) embedded policy evaluation 2) remote policy evaluation in Ranger PDP server
How was this patch tested?
Added unit tests.