Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • tgtrajeev 4 posts 24 karma points
    Jun 24, 2021 @ 16:49
    tgtrajeev
    0

    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

  • Mobin 9 posts 109 karma points
    Apr 11, 2022 @ 09:18
    Mobin
    0

    I am also looking for the same. Did you find any solution for this? Any help is highly appreciated.

  • Ambert van Unen 175 posts 817 karma points c-trib
    Apr 11, 2022 @ 15:29
    Ambert van Unen
    0

    If you are using V9, then yes, it is possible:

    https://our.umbraco.com/Documentation/Extending/Key-Vault/

  • Colin Webber 3 posts 73 karma points
    May 03, 2022 @ 18:38
    Colin Webber
    0

    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

  • Dennis 75 posts 397 karma points MVP
    May 04, 2022 @ 04:48
    Dennis
    0

    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

  • Paul Wright (suedeapple) 277 posts 704 karma points
    May 03, 2022 @ 23:27
    Paul Wright (suedeapple)
    0

    You could just have the connection string in an Environment Variable, local to your own computer.

Please Sign in or register to post replies

Write your reply to:

Draft