Can we use Database connection string form Azure Vault? We don't want to use store Db details into web.config
We are trying to implement DB connection string from Azure Vault instead of Web.Config, We are unable to implement it. Can you please advise if this is possible to implement into Umbraco. We don't to keep the Database credentials into the web.config.
I am looking for a little more guidance on getting this configured properly. Running a project using .NET 5 and Umbraco 9.4.3 and already have Key Vault configured and accessible in the project. What I really need to understand is how do we override the default behavior of Umbraco checking for the umbracoDbDSN connection string in appSettings? Is there something we can utilize within the Startup.cs in the services.AddUmbraco() configuration setup? The documentation provided is simply for adding KeyVault to a project, and gives us nothing on how to actually utilize it when configuring Umbraco.
Though I haven't done this before, to use keyvault for your connection string, I believe you have to register keyvault as a configuration provider. You won't be able to change umbraco's behaviour of checking app settings, but you can influence the IConfiguration object.
You see, the IConfiguration object uses a collection of providers that provide key/value pairs. There's one for your appsettings.json, there's another for appsettings.[your environment].json. To use keyvault, you need a provider for keyvault in here and to umbraco it'll look as if the values are simply read from the configuration.
Can we use Database connection string form Azure Vault? We don't want to use store Db details into web.config
We are trying to implement DB connection string from Azure Vault instead of Web.Config, We are unable to implement it. Can you please advise if this is possible to implement into Umbraco. We don't to keep the Database credentials into the web.config.
Appreciate your help.
Regards: Rajeev
I am also looking for the same. Did you find any solution for this? Any help is highly appreciated.
If you are using V9, then yes, it is possible:
https://our.umbraco.com/Documentation/Extending/Key-Vault/
I am looking for a little more guidance on getting this configured properly. Running a project using .NET 5 and Umbraco 9.4.3 and already have Key Vault configured and accessible in the project. What I really need to understand is how do we override the default behavior of Umbraco checking for the umbracoDbDSN connection string in appSettings? Is there something we can utilize within the Startup.cs in the services.AddUmbraco() configuration setup? The documentation provided is simply for adding KeyVault to a project, and gives us nothing on how to actually utilize it when configuring Umbraco.
Thank You, CW
Hi Colin,
Though I haven't done this before, to use keyvault for your connection string, I believe you have to register keyvault as a configuration provider. You won't be able to change umbraco's behaviour of checking app settings, but you can influence the IConfiguration object.
You see, the IConfiguration object uses a collection of providers that provide key/value pairs. There's one for your appsettings.json, there's another for appsettings.[your environment].json. To use keyvault, you need a provider for keyvault in here and to umbraco it'll look as if the values are simply read from the configuration.
That's exactly what is described in the link provided above. In this chapter in particular: https://our.umbraco.com/Documentation/Extending/Key-Vault/#configuration
You could just have the connection string in an Environment Variable, local to your own computer.
is working on a reply...