Skip to content

Instantly share code, notes, and snippets.

@mkrautz
Created July 14, 2016 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkrautz/d922a4b1d85aad344471b85634a611f7 to your computer and use it in GitHub Desktop.
Save mkrautz/d922a4b1d85aad344471b85634a611f7 to your computer and use it in GitHub Desktop.

Adding new permissions to Mumble

(Last-Updated: 2016-07-14 by mkrautz)

The problem with adding new permissions, is that older clients don't understand them.

This shouldn't be too much of a problem, because the permission system is an "administration-only" feature. That means we can a little less strict about backwards compatibility because the vast majority of users will still be able to use their older clients without problem.

However, in practice, there are some pitfalls. This document tries to address those.

Administration

By adding permissions and changing existing ones, we can't have older clients administer Murmur instances that use the newer permission system.

So we would have to lock out people from changing ACLs on those servers if they use an outdated client.

There are two cases to handle:

First, adding a new channel. This doesn't require a roundtrip to the server, until the add operation is submitted. We should reject them once the client tries to add it.

Second, changing an existing channel. This can be caught early, because the ACLEditor is shown when msgACL is received. Instead of showing the ACLEditor, Murmur should reject the client if it is not new enough to understand the server's ACLs.

General use

Mumble clients use a protobuf message, PermissionQuery, to query for permissions in order to improvde the user experience.

For example, if a PermissionQuery is returned that says a user doens't have permission to edit a channel, the Edit context menu action will be disabled (grayed out).

This is a problem if we change the permission system.

To fix this in a general way, I think we can simply change Murmur to discard received PermissionQuery messages from older clients. If we do that, older clients will show all context actions as being available -- but once they're used, they will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment