You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "ayushtkn (via GitHub)" <gi...@apache.org> on 2026/09/29 02:16:24 UTC

[PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

ayushtkn opened a new pull request, #5639:
URL: https://github.com/apache/polaris/pull/5639

   `PolarisAuthorizerImpl` and `RangerPolarisAuthorizer` both apply the shared `AuthorizationPreConditions.checkCredentialRotationRequired` check, but `OpaPolarisAuthorizer` never called it, so with `ENFORCE_PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_CHECKING` enabled a principal whose credentials were reset is refused by the other two authorizers and keeps working under `OPA` โ€” the setting silently does nothing for those deployments. 
   
   A Rego policy cannot make up for it, since the rotation marker lives in the principal entity's internal properties and is not part of the `OPA` input document. The factory already receives the `RealmConfig` the check needs and was dropping it; it is now passed to the authorizer, which applies the pre-condition per operation before querying OPA and converts the failure to `AuthorizationDecision.deny(...)`, as the other two do.
   
   
   ## Checklist
   - [ ] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact security@apache.org)
   - [ ] ๐Ÿ”— Clearly explained why the changes are needed, or linked related issues: Fixes #
   - [ ] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and explained how)
   - [ ] ๐Ÿ’ก Added comments for complex logic
   - [ ] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [ ] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #5639:
URL: https://github.com/apache/polaris/pull/5639#issuecomment-5893678458

   FYI: @gracechen09 


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b merged PR #5639:
URL: https://github.com/apache/polaris/pull/5639


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on PR #5639:
URL: https://github.com/apache/polaris/pull/5639#issuecomment-5883656376

   @ayushtkn do you mind to resolve conflict on `CHANGELOG.md`?


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5639:
URL: https://github.com/apache/polaris/pull/5639#discussion_r4135524686


##########
extensions/auth/opa/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java:
##########
@@ -136,6 +144,12 @@ public AuthorizationDecision authorize(
       @NonNull AuthorizationState authzState, @NonNull AuthorizationRequest request) {
     for (AuthorizationIntent intent : request.intents()) {
       PolarisAuthorizableOperation operation = intent.operation();
+      try {
+        AuthorizationPreConditions.checkCredentialRotationRequired(

Review Comment:
   This change aligns the three OSS authorizers, so it's good to merge ๐Ÿ‘ 
   
   However, conceptually, `checkCredentialRotationRequired` is relevant only to internal principals and it is not really about authorizing "operations", it is about denying access based on old credentials.
   
   I think this check is best performed at the layer where we deal with authenticating internal principals (not in authorizers).
   
   There will be a problem for permitting the `rotate` requests based on old credentials, but perhaps we can find a way to resolve that. WDYT? @adutra ?



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #5639:
URL: https://github.com/apache/polaris/pull/5639#discussion_r4186853046


##########
extensions/auth/opa/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java:
##########
@@ -136,6 +144,12 @@ public AuthorizationDecision authorize(
       @NonNull AuthorizationState authzState, @NonNull AuthorizationRequest request) {
     for (AuthorizationIntent intent : request.intents()) {
       PolarisAuthorizableOperation operation = intent.operation();
+      try {
+        AuthorizationPreConditions.checkCredentialRotationRequired(

Review Comment:
   FYI: https://github.com/apache/polaris/pull/5706



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn commented on PR #5639:
URL: https://github.com/apache/polaris/pull/5639#issuecomment-5952485025

   Had to rebase to resolve conflict in CHANGELOG, rest stays as is


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #5639:
URL: https://github.com/apache/polaris/pull/5639#discussion_r4166304687


##########
extensions/auth/opa/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java:
##########
@@ -136,6 +144,12 @@ public AuthorizationDecision authorize(
       @NonNull AuthorizationState authzState, @NonNull AuthorizationRequest request) {
     for (AuthorizationIntent intent : request.intents()) {
       PolarisAuthorizableOperation operation = intent.operation();
+      try {
+        AuthorizationPreConditions.checkCredentialRotationRequired(

Review Comment:
   +1 @dimas-b this check does not belong in authorizers, conceptually. 
   
   It should ideally live in the authentication layer instead, but, as you mentioned, that layer does not have the ability to distinguish the endpoint being called.
   
   Instead, I would see a JAX-RS filter doing this check. WDYT?
   
   That said, I think we can merge this PR and then look for alternatives.



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix required credential rotation not being enforced under the OPA authorizer [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5639:
URL: https://github.com/apache/polaris/pull/5639#discussion_r4169002628


##########
extensions/auth/opa/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java:
##########
@@ -136,6 +144,12 @@ public AuthorizationDecision authorize(
       @NonNull AuthorizationState authzState, @NonNull AuthorizationRequest request) {
     for (AuthorizationIntent intent : request.intents()) {
       PolarisAuthorizableOperation operation = intent.operation();
+      try {
+        AuthorizationPreConditions.checkCredentialRotationRequired(

Review Comment:
   JAX-RS filter sounds good :+1: 



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org