hide mysql username and password

146 views
Skip to first unread message

hjal...@gmail.com

unread,
Sep 23, 2014, 10:00:10 AM9/23/14
to shiny-...@googlegroups.com
I am using RMySQL in a shiny app to access a remote MySQL instance.  All is well when working locally as I just assign the user name and password in code.  However, when moving to an outward facing server, I would like to hide the user name and password, ie. take it out of the code.  Perhaps this is not the most appropriate venue but can anyone suggest a strategy for accomplishing this?
Thanks
Al

Joe Cheng

unread,
Sep 24, 2014, 4:56:41 AM9/24/14
to hjal...@gmail.com, shiny-...@googlegroups.com
The application code for a Shiny app shouldn't be visible to users of your app. Are you worried about admins on the outward facing server getting at those credentials?

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/43b14d3a-f6ff-4378-aff7-f84e8f67f828%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mrb...@mac.com

unread,
Sep 29, 2014, 10:43:46 PM9/29/14
to shiny-...@googlegroups.com, hjal...@gmail.com


On Wednesday, September 24, 2014 3:56:41 AM UTC-5, Joe Cheng [RStudio] wrote:
The application code for a Shiny app shouldn't be visible to users of your app. Are you worried about admins on the outward facing server getting at those credentials?

Response and related question:  When we store source code for instance in public repos at GitHub we don't want credentials in the source files.  Sometimes for a solution we use Sys.getenv() to fetch credentials from the system environment.  How can we do something like this with the shinyapps package?  One idea might be to employ the package's setProperty() method on deployed apps, presuming we can set arbitrary properties this way.  Another might be to configure an environment file that doesn't get committed to the repo but does get deployed with the app, then read credentials from that file -- but still undesirable for file control.  Is there a preferred approach from shinyapps?  
Reply all
Reply to author
Forward
Message has been deleted
0 new messages