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
Improve channel password handling #3929
Improve channel password handling #3929
Conversation
I implemented #3856 and this is how it looks now: Note that there are 2 different symbols: A closed (red) lock and an opened (green) lock. The former is shown, if the channel EDIT: After the refactor, the locks indicate indeed whether you can or cannot enter a channel. What do you think about this feature? |
Btw.: This is how it looks for the classic theme. I used the icons suggest in #3872 (comment) for it. |
7743a1c
to
befd16c
Compare
I guess this PR is pretty much done for now. Once #3927 gets merged, I could add a popup asking for a password once the permission denied message (most likely associated with invalid password / access token) is received and then try again with that password set... |
I strongly disagree with sending password hashes to all clients as that'll allow any client to crack them by offline brute force. Less relevant given the above is already a deal breaker but still worth mentioning:
Instead I'd suggest adding two bool flags (e.g. "has_lock", "is_locked") to the ChannelState message and comparing tokens on the server-side. And make sure there's no way to update them without a rate limit (probably best to just add a rate limit to the Authenticate message). |
Thanks for your input. First of all, let me state that I don't see channel passwords to be such a valuable target that someone might actually go through and bruteforce them (and discussions like #3926 suggest to me that they aren't considered that valuable to others) That being said though, I agree that if we manage to get the features with a safer approach, that's definitely better.
As the client needs to be able to also compute the hash, I don't see a good way of making a variable salt (unless maybe randomly generated and transmitted to the client on connect. Though that of course kinda breaks the purpose of a salt, I guess). I added the salt simply to prevent someone not affiliated with Mumble's code base from using rainbow tables to crack the hash. I'm far from being an expert on these things though, so feel free to correct me in that (and anything that follows).
What would you suggest instead?
Does the current state if this PR fall under this?
So every time ACL change, the server shall update all clients with new, personalized channel info? I guess that could work as well. Dunno if this could lead to too much overhead on the server-side, though I can't really imagine this getting a problem. |
If possible please keep PRs as distinctive and simple as possible. This now seems to tackle multiple things in multiple commits and without an explanation in the PR description making it harder to review and get into/understand. It also makes it impossible to land partials/selected parts. |
Yes it does 2 things. But the second one is simply changing the error message if ENTER privliges were denied in certain cases and this change is only possible because of the changes im the first one. The very short "description" I provided was originally intended to be expanded, but I forgot. Sorry for that (I'll do that right now). |
Oh and the dependency to #3933 is gone in the latest refactoring. Hopefully I'll find the time to squash the commits in this PR tomorrow to clean up the current mess xD @Johni0702 I implemented your proposal and removed the password-hashing :) |
94d1c13
to
bb50aa6
Compare
@Kissaki I restructured my commits and from the commit messages alongside what else is written in this PR, I hope it will be relatively easy to follow the changes along. Note also that the build fails, because mumble-voip/mumble-theme#21 is not merged yet. once that is merged, the code in this PR should build just fine (as shown by the CI of the second last commit. |
2f299fb
to
2385c34
Compare
Is backwards compatibility maintained? |
I don't see how it would break it. The whole thing is implemented by extending the protocol by two fields. A server that doesn't know it, won't populate the fields in the first place and a client that doesn't know them won't read them. Each of these cases will result in the icons not being shown, but as far as I can tell, there shouldn't be a problem other than that. I haven't actually tested the above though. Might be worth a try. However it might take a bit until I'll be able to do so, as my beloved Linux notebook is in repair and I just don't want to fiddle around with setting up a build environment on Windows xD |
So I did test connecting to a normal server and there was no problem doing that. And I just can't imagine that there is a problem for a client connecting to a Server running with this patch as it simply won't process the extra information the Server now provides :) |
6d0b1f1
to
c885ab3
Compare
…hannelState message in order for the protocol to be able to tell clients about which channels they will be able to enter
… grant enter rights to the channel, in the permission denied message, if the denied permission is ENTER and the channel has (to the client's knowledge) enter restrictions
…d or an unlocked one, depending on whether the user can enter the channel or not)
c885ab3
to
81c0e93
Compare
Sry but as I already said in mumble-voip/mumble-theme#17 (comment) I think this implementation is too confusing. I think about two solutions:
To seperate these two scenarios better from each other, you might apply a different ACL-system.
Maybe technology-wise my concept is already (partly) implemented, but the UI should also represent this. |
Where did you get that from? |
I disagree 100%. If I don't even see the channel, I would never think about setting my access tokens. This would confuse the hell out of our users
The password is in fact also only an ACL |
Very confusing. I don't have the time to dig into that. If you think that everyone can understand that, then let it be.
What should that mean?
I know that.
this is about meta-functionality, if you can follow me. |
I see, I missunderstood this whole thing then. Nonetheless you should streamline this concept of access-tokens, passwords and acls, it's very confusing as it is now. |
green & unlocked == you can enter what is confusing about this? |
As I said I missunderstood the functionality, still this is not perfect.
Thats for example a potencial point of confusion.
Well this specific lock symbol concept is not perfect, but somewhat ok. Anyway I also don't fully understand the whole functionality, so as of now I am no help in "redesigning" it. |
One could argue that the user could ask himself the same question here. Additionally that user might be wondering if he can join the channel right now. Besides: Whether you can't join due to not knowing the password or due to groups doesn't actually matter. The effect is the same. And once somebody gives you the password, you add it to your access tokens and then you'll see what channels it will grant access to. |
Oh and just to avoid misunderstandings: This PR of mine didn't introduce channel passwords or the way restricted channels are handled. I merely added an indication of it to the UI |
This implementation that turns tokens into "passwords", if they have a specific set of permissions, is confusing. Channels can have more than one token (for different sets of permissions), tokens might even deny permissions. There might be Enter restrictions that are completely irrelevant for the user. E.g. the ACL group very_annoying_users that only denies 3 users out of 200 the permission to enter a channel. I don't believe this PR really improves "password" handling, because user don't use passwords for channel access, only tokens. "Passwords" are nothing more than some cruel UX horror in Channel Edit window. The lock icon also does not reliably indicate that a room is locked or unlocked by a token. It's nearly impossible for an average user to form a stable mental model about this lock icon (without knowing how ACLs work in detail). Improving the token system for the user is a lot more complicated than that. |
I know. But its better to have a function for that than simply implicitly knowing that if a group is formed in a certain way, we'll treat it as a password (which was the case before this PR)
So? The title of this PR is not reflected in the code, so what exactly is your point here?
I never claimed I fixed all problems.
Green = locked, but can enter |
With the introduction of mumble-voip#3929 a channel's description would not be accessible by clicking on the comment icon next to the channel's name but rather by clicking to the lock icon to its right (if there was one). This was due to some implicit assumptions about the comment icon's position in the code that is responsible for showing the description. Thus the fix was simply to let that part of the code account for the possible new icon as well. Fixes mumble-voip#4685 Co-Authored-By: Davide Beatrici <git@davidebeatrici.dev>
The following icons were added (with a description) to Qt's "What's this?" help system: - padlocks (mumble-voip#3929) - talking state for locally muted users (mumble-voip#4322) - listener symbol (mumble-voip#4011) Fixes mumble-voip#4686
…k icon With the introduction of #3929 a channel's description would not be accessible by clicking on the comment icon next to the channel's name but rather by clicking to the lock icon to its right (if there was one). This was due to some implicit assumptions about the comment icon's position in the code that is responsible for showing the description. Thus the fix was simply to let that part of the code account for the possible new icon as well. Fixes #4685
This is aimed to fix #3857 and to fix #3856
Changes of this PR:
MumbleProto::channelState
msg indicating whether a channel is protected by ACLs denying ENTER privilege and whether the user the message is being sent to has the permissions to enter the channel