vacp2p / research

Thinking in code
MIT License
62 stars 4 forks source link

Access control management #79

Open staheri14 opened 3 years ago

staheri14 commented 3 years ago

Problem

In the existing state of Waku2, there is no in-band access control management. Access control is enforced through data encryption i.e., messages are encrypted and only users with the decryption keys can get access to the data. The key establishment and exchange are also done out-of-band.

Without access control, store nodes will store all the messages published on a pubsub topic/content topic without knowing whether the message owner is unauthorized to publish a message to that topic. The lack of access control can be exploited to spam the history of a group chat.

Solution ideas

This issue can be tackled in various ways:

Potential issues

Enabling access control requires some trust assumptions about the store nodes for example store nodes can be already part of the group chat so by default have access to the list of authorized users. Therefore, they can decrypt the message, extract the signature and discard or persist the message accordingly.

If store nodes are not trusted, they wont have the decryption power, which means they won't be able to see the auhtor's signature. To deal with this, we may need to attach the plain signature to the waku message to enable store nodes to read it and grant access accordingly. However, revealing the author's signature is against anonymity.