nickjer / singularity-rstudio

RStudio Server in a Singularity container
https://singularity-hub.org/collections/463
MIT License
54 stars 41 forks source link

multiuser environment #10

Open sghignone opened 3 years ago

sghignone commented 3 years ago

HI Jeremy, given a multiuser environment on a machine running singularity, I would like to give the possibility to each user to manage their own RStudio . is this possible? i cannot figure out the port settings: each use will use a different one? or is a matter of credential/authentication? Thanks for any hint.. Cheers S.-

nickjer commented 3 years ago

Since this is run in Singularity it will run as a single user. So anyone who successfully authenticates against this running server will have access to all the files under this user.

One solution would be to start an RStudio Server instance for each user, have them listen on Unix domain sockets with proper user permissions (this gets around the port issue), then stand up a reverse proxy in front with a proper authentication mechanism that proxies the logged in user to the correct Unix domain socket.

This can be fairly complicated to set up and the Unix domain sockets are optional as you can just assign a different port to each user's server.