SHINYPROXY_USERNAME in 'shiny' user


#1

Hi there.

I am just testing the “simple” authentication and I am trying to get the username to appear in the shiny app.

But what I’ve found is that I can find the SHINYPROXY_USERNAME env variable if I log in to the “root” user, but not from the “shiny” user.

How could I obtain access to this env variable? Or how could I modify it in order for ShinyProxy to send the variable to the “shiny” user?

Really thank you!


#2

Hi @DrumSergio,

Do you mean you’re opening a shell into a running shiny container?
Those processes will indeed be running as root, as that is the default user for running a docker image.
You can specify an image to run as a different user via the USER instruction in the dockerfile: https://docs.docker.com/engine/reference/builder/#user


#3

I’ve explained all related to this problem here:

Thank you!


#4

I’ve updated and written there (the link is on my previous post) a full example for you guys to try. It’s not working right now the env variable of SHINYPROXY_USERNAME. I appreciate your help a lot!


#5

This post was flagged by the community and is temporarily hidden.


#6

Thank you @dm3ll3n !

I finished all of it before getting to know your project. Thanks a lot for sharing it! For sure it was a lot of work to make it all that easy. I wish I had known your project before finishing.

Thank you!


#7

Don’t know if still useful, but I think your original problem is related to shiny-server’s behavior of removing environemnt variables - please see related answer: Reading SHINYPROXY_OIDC_ACCESS_TOKEN in app and links therein.


#8

I’m sure it is, since Shiny and RStudio server are meant to handle multiple users. @DrumSergio, I just published the project last night, so you didn’t miss out. In working through the solution, your question was pertinent to the problems I had, so thanks for getting the conversation started.