Hello,
I'm writing an open source, secure social media system that includes a mobile app and federated servers. As with many federated systems, the servers may be untrusted. One of the requirements is to hide not just personal info and content from the servers, but to hide metadata (e.g. friend lists and message recipients) from servers too. This ends up implying that each device must be able to receive and relay messages while the app is running in the background.
Can push notifications be used from untrusted servers? I've read that the "firebase-admin" package is intended for use only with trusted servers, while the "firebase" package may be used with untrusted servers. However, the docs for the latter focus on web apps only. How can I do this? Obviously I can't distribute any secrets with the server software.
The alternative is for the app to keep a socket open to one's home server while running in the background, but that seems frowned upon by Google-- it requires a partial wake lock to exist for a long time, which could prompt the OS to close the app, plus learn to close the app in the future.
I see the problem with allowing any server to send a PN to any user, but I believe that is solvable by requiring opt-in permission from a user for a particular server (their home server) to send PNs.
Am I missing something? I hope there's a solution here. Otherwise, it seems like Google is disallowing secure systems that use federated servers; the federated approach is getting more popular with the decentralized software movement.
Thanks for any help, or links to relevant docs.
Cheers,
James
[Sent from my phone.]