Skip to content

Proving Write Permissions Remotely #55

Description

@mwfarb

Problem:
Currently, Application/Program clients and the web client itself, do not have a way to prove that any other user client has permissions to write to the scene. This ACL rule is stored in each client's JWT and in the server's user DB. Here are two uses cases:

  1. Python program ARB, running with User A's auth, wants to know if web-client User B in the scene can write to the scene so that it can enable ARB's control panel for User B.
  2. Web-client User A wants to know if User B has enough permission to be rendered invisible or hidden in the scene.

Issue:
We should not republish User B's JWT for ARB/User A, since allowing User B JWT to leave User B's client and control begins to degrade security.

Insight:
Let the remote User B use their JWT encoded ACL topic tree to prove their write permission by attempting to publish an message to the scene topic and allow User A to act if the message is allowed to be published at the broker level and picked up in User A's subscription.

Workflow Handshake Pseudo-code:
User A owns the Scene A. All messages are published and subscribed to the scene objects MQTT topic. User B client wants to be rendered hidden for User A, or User B wants to use ARB's control panel to edit the scene. Each application/client may set it's own string as Service X to avoid conflicts from multiple sources, perhaps using a random GUID.

  1. User A Client/Program receives subscribed message: User B camera has joined
  2. User A Client/Program publishes message: Send proof User B can publish to Scene A for Service X
  3. User B Client receives ^^ message, and publishes message: User B requests access to Service X
  4. If User A Client/Program does receive ^^ message, the broker JWT User B used to connect has allowed them to publish to the scene topic, and User A can enable the ARB panel for User B or render User B hidden.
  5. If User A Client/Program does not receive ^^ message, the broker JWT User B used to connect has not allowed them to publish to the scene topic, and no further action is allowed.

Implementation:

  • Modify ARENA-core to receive request message, and send ack message.
  • Add hidden user feature to ARENA-core.
  • Add examples to docs ARENA and ARENA-py.
  • Add a helper method(s)/callback(s) to ARENA-py.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions