ssbc / patchbay

An alternative Secure Scuttlebutt client interface that is fully compatible with Patchwork
http://www.scuttlebutt.nz
386 stars 78 forks source link

run patchbay on a headless server #329

Closed khimaros closed 4 years ago

khimaros commented 5 years ago

I have a server which I use to run my sbot server. I'd love to host patchwork as a web service so that I could browse from my laptop/phone.

Is such a thing already possible?

cryptix commented 5 years ago

no I think it’s to entangled into electron right now.

If you really want a web frontend today you could try patchfoo and put it behind basic auth but I think you need to install ssb-npm or git-ssb first.

mixmix commented 5 years ago

It could be possible to do this. It is quite entangled with eletron but not inseperable. The main question / challenge is "how would you authenticate yourself" from the server?

christianbundy commented 5 years ago

@mixmix

One way to do it would be to copy the way I did authentication in ssb-compose. When the server starts it generates a random token and it only responds to requests like:

https://localhost/?token=<token>

Each time the server starts it generates a new token so that there aren't any long-term secrets exposed in your browser history, and ideally the browser could cache the secret in localStorage or something (although you'd probably want to serve on <random>.localhost or something so other localhost apps can't steal your keys). Lots of interesting ideas in this space, I'm super interested in building a localhost launcher.

stale[bot] commented 5 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

khimaros commented 5 years ago

For my personal use case, it would be sitting behind a reverse proxy which handles authentication/authorization.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?