chungen0126 opened a new pull request, #1395:
URL: https://github.com/apache/ranger/pull/1395

   ## What changes were proposed in this pull request?
   
   Registers the seven S3 Object Lock actions that Ozone is adding 
(HDDS-15945), so that they can be selected in the `Action` (`action-matches`) 
condition of an Ozone policy item.
   
   | S3 action | Resource | Access type |
   |:--|:--|:--|
   | `GetBucketObjectLockConfiguration` | bucket | `read` |
   | `PutBucketObjectLockConfiguration` | bucket | `write` |
   | `GetObjectRetention` | key | `read` |
   | `PutObjectRetention` | key | `write` |
   | `GetObjectLegalHold` | key | `read` |
   | `PutObjectLegalHold` | key | `write` |
   | `BypassGovernanceRetention` | key | `write` and `delete` |
   
   Changes:
   
   - `ranger-servicedef-ozone.json`: adds the seven actions to the `options` of 
the `action-matches` policy condition. The Admin UI builds the `Action` 
dropdown from this list.
   - `actionRequirements/ozone.json`: adds the access types each action needs, 
as in the table. The Admin UI offers an action only when the policy item grants 
them.
   
   Notes:
   
   - For a bucket-level policy item, `Put*` and `*` are now offered only when 
`write` is also selected, because they now cover 
`PutBucketObjectLockConfiguration`.
   - This PR does not add an upgrade patch. Ranger Admin reads the service 
definition stored in its database, so a deployment that already has the 
`action-matches` condition keeps its current list of options after an upgrade.
   
   ## How was this patch tested?
   
   - `mvn -pl agents-common,security-admin,plugin-ozone -am clean verify` on 
JDK 17, on top of current `master`: the build succeeds, with 1293 tests in 
`agents-common`, 32 in `plugin-ozone` and 4113 in `security-admin` (12 skipped) 
and no failures. No tests were added.
   - Ran the Admin UI filtering code (`policyConditionUtils.js`) against the 
changed files with a one-off script: each of the seven actions is offered at 
the resource and with the access types in the table, is not offered when one of 
those access types is missing, and is not offered at the other resource levels.
   - Not tested in a browser against a running Ranger Admin, so there is no 
screenshot.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to