-
Notifications
You must be signed in to change notification settings - Fork 1k
RANGER-5393: updated RangerOzoneAuthorizer to support AssumeRole #766
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
This PR updates RangerOzoneAuthorizer to support Ozone's AssumeRole functionality by implementing the new IAccessAuthorizer.generateAssumeRoleSessionPolicy() method introduced in Ozone 2.1.0 (HDDS-13848). The implementation enables role-based access control with session policies that can be used to grant temporary permissions.
Key Changes:
- Added support for the
assume_roleaccess type and role resource in the Ozone service definition - Implemented session policy generation that validates assume role permissions and creates inline policies with optional grants
- Upgraded Ozone dependency from 1.4.0 to 2.1.0 to support the new AssumeRole API
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| ranger-ozone-plugin-shim/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java | Added shim method to delegate generateAssumeRoleSessionPolicy calls to the plugin implementation |
| plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java | Core implementation of session policy generation with role authorization validation and grant conversion |
| agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json | Added role resource definition and assume_role access type with appropriate restrictions |
| plugin-ozone/src/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java | Comprehensive tests validating role assumption authorization and session policy enforcement |
| plugin-ozone/src/test/resources/om_dev_ozone.json | Test policy configuration with assume_role permissions and role-based grants |
| plugin-ozone/src/test/resources/ranger-ozone-security.xml | Test configuration for embedded policy source |
| plugin-ozone/pom.xml | Added test dependencies for JUnit Jupiter and Mockito |
| pom.xml | Upgraded Ozone version and added staging repository for RC |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...rc/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java
Outdated
Show resolved
Hide resolved
...ne/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Show resolved
Hide resolved
...ne/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Show resolved
Hide resolved
...ne/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java
Outdated
Show resolved
Hide resolved
...ne/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Show resolved
Hide resolved
...rc/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java
Show resolved
Hide resolved
|
thanks for the updates @mneethiraj - LGTM |
agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json
Show resolved
Hide resolved
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
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ne/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Outdated
Show resolved
Hide resolved
...ne/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Outdated
Show resolved
Hide resolved
...ne/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Outdated
Show resolved
Hide resolved
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
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What changes were proposed in this pull request?
RangerOzoneAuthorizer updated to implemement new method,
IAccessAuthorizer.generateAssumeRoleSessionPolicy(), introduced in Ozone with HDDS-13848.How was this patch tested?
Unit tests added to validate: