shinyproxy icon indicating copy to clipboard operation
shinyproxy copied to clipboard

SHINYPRIXY_USERNAME is not passed when using minimum-seats-available

Open faridovski opened this issue 10 months ago • 2 comments

In order to shorten the startup time of my shiny apps, I have activated minimum-seats-available. I realized that the allocated pod does not contain the ENV variable (SHINYPROXY_USERNAME). More details:

  • shinyproxy version 3.1.1
  • container backend: k8s cluster
  • Authentication: OpenId (keycloak)

faridovski avatar Feb 03 '25 07:02 faridovski

Following version 3.1.0, I had this same issue.

I figured out how to extract the USERID and the USERGROUP from this and other resources: https://support.openanalytics.eu/t/passing-username-and-groups-as-http-headers-in-3-1-0/2747/2

Today, I extract the USERID in our application with

shinyproxy_user_id <- session$request$HTTP_X_SP_USERID

Hope this helps

RespiceFinem avatar Feb 04 '25 09:02 RespiceFinem

It is indeed specific to the pre-initialized containers, as documented in https://www.shinyproxy.io/documentation/configuration/#container-pre-initialization-and-sharing (see "Before using this feature, make sure to understand the following...")

mnazarov avatar Feb 04 '25 10:02 mnazarov

Hi, I believe this question is answered. Therefore, I'm going to close the issue. Feel free to open a new issue if you still experience a problem.

LEDfan avatar Jul 14 '25 11:07 LEDfan