Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to pass Login username details of shinyproxy to shiny app?

Can the login details be passed from shinyproxy to shiny app?
I want to write sql query to filter content and display the data that pertains to that user alone.

like image 906
Balajee Avatar asked Apr 03 '18 08:04

Balajee


People also ask

Is shiny server secure?

shinyapps.io is secure-by-design. Each Shiny application runs in its own protected environment and access is always SSL encrypted. Standard and Professional plans offer user authentication, preventing anonymous visitors from being able to access your applications.

Is Shiny proxy free?

ShinyProxy is one of the most popular options to host any type of containerized web application, including but not limited to Shiny apps. It provides authentication, authorization, application isolation, scalability, and a lot more with extensive documentation. ShinyProxy is free and open-source.

How does shiny proxy work?

ShinyProxy is a novel, open source platform to deploy Shiny apps for the enterprise or larger organizations. Secured Embedding of Shiny Apps Since version 2.0. 1 ShinyProxy provides a REST API to manage (launch, shut down) Shiny apps and consume the content programmatically inside broader web applications or portals.


1 Answers

This is perfectly possible. As the configuration page of the manual mentions, when a user is authenticated, the following environment variables will be available in any Shiny application launched by the user:

  • SHINYPROXY_USERNAME: the name of the user, as used when logging in
  • SHINYPROXY_USERGROUPS: the groups the authenticated user is a member of, as a comma-separated value

From within the Shiny app, you can then query this information using

userName <- Sys.getenv("SHINYPROXY_USERNAME")

and use that downstream in your SQL queries.

like image 114
Tobias Verbeke Avatar answered Nov 17 '22 08:11

Tobias Verbeke