visit2rahul opened a new pull request, #4420: URL: https://github.com/apache/polaris/pull/4420
Description:
Closes #4026
## Summary
Extracts the duplicated `PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_STATE`
pre-condition check from `PolarisAuthorizerImpl` and `RangerPolarisAuthorizer`
into a shared `AuthorizationPreConditions` utility class.
Both authorizer implementations had identical logic to block
non-`ROTATE_CREDENTIALS` operations when a principal is flagged for mandatory
credential rotation. This duplication was flagged during the [PR #3928
review](https://github.com/apache/polaris/pull/3928#discussion_r2921581602).
### Changes
- New `AuthorizationPreConditions.checkCredentialRotationRequired()`
utility method in `polaris-core`
- `PolarisAuthorizerImpl` and `RangerPolarisAuthorizer` now delegate to
the shared method
- Removed unused `PolarisEntityConstants` import from
`RangerPolarisAuthorizer`
## Test Plan
- [x] `polaris-core:test` — auth tests pass
- [x] `polaris-extensions-auth-ranger-tests:test` — Ranger tests pass
- [x] Spotless and checkstyle pass
--
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]
