Skip to content

Commit

Permalink
[feat][broker] Implement allowBrokerOperationAsync in PulsarAuthoriza…
Browse files Browse the repository at this point in the history
…tionProvider to avoid exception thrown (apache#23663)
  • Loading branch information
mattisonchao authored Nov 29, 2024
1 parent 7fc88d6 commit 4603722
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.pulsar.common.naming.TopicName;
import org.apache.pulsar.common.policies.data.AuthAction;
import org.apache.pulsar.common.policies.data.AuthPolicies;
import org.apache.pulsar.common.policies.data.BrokerOperation;
import org.apache.pulsar.common.policies.data.NamespaceOperation;
import org.apache.pulsar.common.policies.data.PolicyName;
import org.apache.pulsar.common.policies.data.PolicyOperation;
Expand Down Expand Up @@ -690,6 +691,13 @@ public CompletableFuture<Boolean> allowTopicOperationAsync(TopicName topicName,
});
}

@Override
public CompletableFuture<Boolean> allowBrokerOperationAsync(String clusterName, String brokerId,
BrokerOperation brokerOperation, String role,
AuthenticationDataSource authData) {
return isSuperUser(role, authData, conf);
}

@Override
public CompletableFuture<Boolean> allowTopicPolicyOperationAsync(TopicName topicName, String role,
PolicyName policyName,
Expand Down

0 comments on commit 4603722

Please sign in to comment.