jupyterhub / jupyter-rsession-proxy

Jupyter extensions for running an RStudio rsession proxy
BSD 3-Clause "New" or "Revised" License
118 stars 87 forks source link

Use random temporary file name for rserver secure cookie key #94

Closed julozi closed 2 years ago

julozi commented 3 years ago

When using the batchspawner, we can have several rserver session started on the same cluster node. However, rserver is by default using the same path /tmp/rstudio-server/secure-cookie-key to store secure cookie key. As a result the cookie key file is locked and owned by the first user starting a RStudio session on a given node. To avoid this, we need to define a distinct temporary file for rserver secure cookie key for each rserver instance.

welcome[bot] commented 3 years ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

ryanlovett commented 3 years ago

This is great, thanks very much! One request: could you please omit prefix='/tmp/' ? That way we could let tempfile determine the directory. Or is /tmp a hard requirement for rstudio?

relevant #64

danielfrg commented 3 years ago

I can confirm that this totally works on master and you don't need the prefix='/tmp'.

@julozi would you be able to update this branch to master? If not I can do it.

ryanlovett commented 2 years ago

Fixed by #98.