-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
ACL Ambigious #167
Comments
|
- Attenmpt to fix VolantMQ#167 partially.
Hi @troian I tried to fix it here #169. Let me know your opinion. Lines 38 to 40 in 99c21c3
Simple auth is always allowing by default. I think we'll have to do something if we want to block a user from pub/sub to any topic. Also this caught my attention - volantmq/connection/connection.go Lines 925 to 930 in f15e5d9
This explains why my message passed through even if i set default of simpleAuth to StatusDeny. The message I was publishing was with QOS0 |
Yes, that's why it called simpleAuth. It is intended to do user/password authentication not pub/sub. So there is nothing to do with it. pub/sub filtering is up to more complex auth backends Issue you mention is fixed in pr #168 |
Please fill out the sections below to help us address your issue.
Version of VolantMQ (or SHA)
99c21c3
Version of Go (
go version
)?go version go1.14.1 linux/amd64
What issue did you see?
Please forgive me if I am wrong. I found working of ACL is little ambiguous.
First, In multiple Auth plugin environment, For checking the permission of subscribing to a topic, VolantMQ iterate through all plugins one by one and not the plugin which was used for authentication of that client. I think it would make more sense to use the same plugin for acl which authenticated user. And it'll be little bit more efficient also.
For example - If we have two two auth plugins, simpleAuth and mongo auth. Simple auth is used for authentication of certain users, while mongo is used for rest. But simpleAuth allows subscription to any topic. While mongo plugin wants to restrict a particular user to only certain topics. VolantMQ will go through all plugins sequentially and if simpleAuth is in a prior order, since simpleAuth allows alll topics, It'll allow any client subscribing to any topic.
Second, I noticed this thing for checking permission for publish i found this was called
volantmq/connection/connection.go
Line 864 in 99c21c3
Third We are sending username as a blank string in ACL method in the above-mentioned line. (Why that ?). Is it right to check ACL just using client id ? because for authentication we are using username, and a client can claim any clientId while connecting to the broker. I was thinking that we should send the username also here.
P.S - I am very new to this, But i want to contribute. I'll be happy to do PRs. Please Let me know if i am thinking in the right direction?
The text was updated successfully, but these errors were encountered: