I have a docker container running RStudio in Azure. I need to access a SQL Server, and do not want to put my passwords in the code, so am utilizing AzureKeyVaults.
When I run it on my local instance with:
library(AzureKeyVault) vault <- key_vault("https://vaultName.vault.azure.net/") server = toString(vault$secrets$get("server")$value) pw = toString(vault$secrets$get("password")$value) db = toString(vault$secrets$get("database")$value) con <- dbConnect(odbc(), Driver = "ODBC Driver 17 for SQL Server", Server = server, Database = db, UID = "userID", PWD = pw, Port = 1433) q = "select * from schema.table_name"
it works without an issue
Yet, when I run
vault <- key_vault("https://fvappsql.vault.azure.net/") in the container, I get redirected to a new website
and it holds on this
before it times out and closes.
does anyone have any experience with this? Any suggestions how to access azure key vaults and secrets while running docker