You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "michaeljmarshall (via GitHub)" <gi...@apache.org> on 2023/02/09 01:26:48 UTC

[GitHub] [pulsar] michaeljmarshall commented on a diff in pull request #19467: [improve][txn] Allow superusers to abort transactions

michaeljmarshall commented on code in PR #19467:
URL: https://github.com/apache/pulsar/pull/19467#discussion_r1100868791


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -2496,6 +2525,34 @@ protected void handleEndTxn(CommandEndTxn command) {
                 });
     }
 
+    private CompletableFuture<Boolean> verifyTxnOwnershipForTCToBrokerCommands() {
+        if (service.isAuthenticationEnabled() && service.isAuthorizationEnabled()) {
+            return getBrokerService()
+                    .getAuthorizationService()
+                    .isSuperUser(getPrincipal(), getAuthenticationData());

Review Comment:
   Does this work correctly for with proxy and original auth data? I will try to review more closely tomorrow.



-- 
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: commits-unsubscribe@pulsar.apache.org

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