datastorm-open / shinymanager

Simple and secure authentification mechanism for single shiny applications.
https://datastorm-open.github.io/shinymanager/
386 stars 79 forks source link

Use shinymanager with SQL database server instead of SQLite database file #79

Closed skad00sh closed 10 months ago

skad00sh commented 3 years ago

I started using shinymanager a few months ago. I mostly used to publish the apps on Shinyapps.io. Since SQLite database is a file and located directly where R scripts are located. Hence I had no issues while connecting to the database.

Now, I have switched to Azure and using docker images. Now, I want to use SQL server to store all credentials, logs, etc. I tried to edit the shinymanager functions but I am not able to use my SQL server.

Can we have a functionality where I will pass the only connection to the database as a parameter and shinymanager will do the everything what it was doing with SQLite (but now with my SQL server).

rtrad89 commented 3 years ago

Not sure about Azure but in my case I am using DBI package to query a data table with users data in adherence to what shinymanager expects of columns. I use PostgreSQL but the concept is generalisable I reckon.

skad00sh commented 3 years ago

Even I did the same. But some logics were difficult to implement. I derived my own logic based on existing shinymanager logic. So in my opinion it is doable but will require extensive documentation and fixed clouds. It may not be now but could be possible in near future. fingers-crossed

FreyGeospatial commented 2 years ago

I second this. Having functionality to use shinymanager with an already existing, non-file database would be a great asset.

ZekeMarshall commented 2 years ago

I also second this request. I have a dockerized R Shiny app deployed with Azure and have currently mounted the shinymanager SQLite database to the app from an Azure storage account. This method only allows you to read the SQLite database, to edit the credentials in admin mode I update the database outside of the hosted app, then sync the updated database to Azure storage. Being able to have read & write from the hosted app itself through an SQL server such as Azure SQL would be extremely helpful! Thanks for your work on shinymanager!

bthieurmel commented 10 months ago

180

Available on 1.0.500