Topic Grant-Permission Operation caused MQTT Clients Disconnected
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
Reproduce with Pulsar 2.10.1 and MOP 2.10.1.7 using the standalone.conf MQTT settings and the documented pulsar-admin topics grant-permission command. Compare clients connected through the MQTT proxy in the same namespace with clients connected directly to the broker; done means repeating a grant does not disconnect either client.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
topic grant-permission operation caused all devices subcribed topics in the same namespace lost connection.
for example:
test-user-a is connected and subscribes persistent://test-tenant/ns/test-topic-a
test-user-b is connected and subscribes persistent://test-tenant/ns/test-topic-b
if i execute topic grant-permmision to any role with any topic in the same namespace, all mqtt clients will be disconnected instantly.
- it shows the same result no matter i execute by pulsar-cli, pulsar-restful-api or pulsar-java-api
- if topic grant-permission operation executes in another namespace, clients will not be disconnected.
- if clients connect to pulsar broker directly without mop, clients will not be disconnected.
To Reproduce
Steps to reproduce the behavior:
- prepare and start a Pulsar Server with mop plugin in standalone or single cluster mode. (following steps are in standalone mode) (Pulsar version 2.10.1, MOP version 2.10.1.7)
- config standalone.conf (see next part)
- create a tenant called "test-tenant"
- create a namespace called "test-tenant/ns"
- create 2 topics, called "persistent://test-tenant/ns/test-topic-a" and "persistent://test-tenant/ns/test-topic-b"
- create 2 subjects called "test-user-a" and "test-user-b"
- grant consume permissions for subjects:
bin/pulsar-admin --auth-plugin xxx --auth-params token:xxx --admin-url xxx topics grant-permission persistent://test-tenant/ns/test-topic-a --role test-user-a --actions consume,bin/pulsar-admin --auth-plugin xxx --auth-params token:xxx --admin-url xxx topics grant-permission persistent://test-tenant/ns/test-topic-b --role test-user-b --actions consume - Start a Mqtt client like mqtt-spy on my desktop
- login "test-user-a" and let it subscribe topic "persistent://test-tenant/ns/test-topic-a"
- login "test-user-b" and let it subscribe topic "persistent://test-tenant/ns/test-topic-b"
- let's execute this command again
bin/pulsar-admin --auth-plugin xxx --auth-params token:xxx --admin-url xxx topics grant-permission persistent://test-tenant/ns/test-topic-a --role test-user-a --actions consume - see mqtt-spy, the 2 client are disconnected.
standalone.conf modified params
clusterName=standalone
proxyRoles=proxy
authenticateOriginalAuthData=false
authenticationEnabled=true
authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderToken
authorizationEnabled=true
authorizationProvider=org.apache.pulsar.broker.authorization.PulsarAuthorizationProvider
superUserRoles=admin,proxy
brokerClientAuthenticationPlugin=org.apache.pulsar.client.impl.auth.AuthenticationToken
brokerClientAuthenticationParameters=token:xxxx
messagingProtocols=mqtt
protocolHandlerDirectory=./protocols
mqttListeners=mqtt://xxxx:1883
advertisedAddress=xxxx
mqttProxyEnabled=true
mqttProxyPort=5682
mqttAuthenticationEnabled=true
mqttAuthenticationMethods=token
mqttAuthorizationEnabled=true
Expected behavior
When i grant-permission for topic to a role, connections user the same namespace will not be disconnected.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- Server OS: CentOS 7.9.2009
- MQTT Client OS: Windows 10
Additional context
Add any other context about the problem here.
- Ngôn ngữ chính
- Java
- Star
- 190
- Fork
- 56
- Merge trung bình
- 27 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của streamnative/mop
-
Is MOP still being developed Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
streamnative/mop#1868 · 5 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
streamnative/mop#1818 · 1 bình luận ·
-
Can not build mop Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
streamnative/mop#1765 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
streamnative/mop#1758 · 1 bình luận ·
-
Configuration for IoT devices Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
streamnative/mop#1665 ·
Tất cả issue của streamnative/mop
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
infinispan/infinispan#18150 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
opensearch-project/k-NN#3597 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100