-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][broker] Fix auth test cases. #20151
base: master
Are you sure you want to change the base?
Conversation
@dragonls Please add the following content to your PR description and select a checkbox:
|
Hi, @michaeljmarshall |
Are the modified tests failing in master? |
Yes. Because this part of codes is wrong in master:
|
That behavior only affects the WebSocket Proxy when subscription auth mode by prefix is in use. The test was added a while ago #899. I think we should migrate away from using those methods and then we can deprecate them. I don't see a need to change the behavior. Here is a PR to remove some of the final usages of the |
Yes, the test was added long time ago. But it's still inconsistent with our conventional understanding, which means the behavior is different between WebSocket Proxy and others. I once think about changing the code in But I am not sure whether this is the right way. My main purpose is to hope that all code logic meets expectations, including WebSocket Proxy as well as |
The pr had no activity for 30 days, mark with Stale label. |
Master Issue: #20068
Motivation
Fix auth test cases. The tenant admin should have all permissions of the topics.
In current master branch,
role1
is the tenant admin inorg.apache.pulsar.broker.auth.AuthorizationTest#simple
, and should have all permissions of the topics.pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationTest.java
Lines 220 to 223 in 575cf23
auth.canConsume(TopicName.get("persistent://p1/c1/ns1/ds1"), "role1", null, "sub1")
should betrue
.Modifications
Add and fix the test in
org.apache.pulsar.broker.auth.AuthorizationTest#simple
.Add and fix the test in
org.apache.pulsar.websocket.proxy.ProxyAuthorizationTest
.Verifying this change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: dragonls#8