Stop Putting Your Asp.Net Core Secrets at Risk - Use Azure Key Vault!

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 75

  • @warrenhales
    @warrenhales Месяц назад

    Awesome video. I was bouncing from one documentation article to another just looking for a clear, clean explanation. This video is exactly what I was looking for. Thank you!

  • @abuuthmaan
    @abuuthmaan 6 месяцев назад +3

    You're the man, Dan! This is the best tutorial on the topic I've found.

  • @PatGarvey
    @PatGarvey Год назад +2

    Three hours to find this videos. !5 minutes to get things to work. Excellent!

    • @Codewrinkles
      @Codewrinkles  Год назад

      In the end, I'd say it's a success! I'm glad it was helpful. Make sure to subscribe, so that you don't spend other 3 hours searching for stuff you might find here :)

    • @343GuiItySpark
      @343GuiItySpark Год назад

      exactly. As a fresher, helped a lot. now manager won't shout at me 😉

  • @goranmaric6806
    @goranmaric6806 Год назад +2

    Excellent video, indeed. Thanks!
    I would like to suggest that it could be beneficial to mention the order in which the secrets are added to the configuration object. Based on my experience using this configuration, it appears that secrets are loaded from KeyVault at the end. Therefore, if there is a configuration key with the same name as a secret in KeyVault within the Azure App Service, the value from KeyVault will be present in the configuration object at the end.

    • @Codewrinkles
      @Codewrinkles  Год назад +2

      Thank you for watching. I have talked in dept about the order of configuration keys and how this might brake our apps in the video about configurations that I also mentioned in this one: ruclips.net/video/5TxnLU-SXVg/видео.html
      Also with practical demos to show how things happen.

  • @ahmed3od2011
    @ahmed3od2011 5 дней назад

    Thank you very much, this is a great straight forward video. But I have one more question, can I store a serialized Json object inside an Azure key valut?, in your example you saved a string (connection string) so I might assume there would be not problem when saving a serialzed string inside :D !

  • @androidsavior
    @androidsavior 8 месяцев назад

    So if i sign out of Azure from the web on my pc, the key-vault will stop working in the C# code ?
    What if i host my application on-premise ? should i signin to azure form the server to get it authenticate the key-vault in my C# code ?

  • @androidsavior
    @androidsavior 8 месяцев назад

    the developer will be able to debug the code and inspect the connection string and the secrets after they are returned from azure ? So we're just hiding the secretes from viruses and cyber attacks ?

  • @hackneythugg
    @hackneythugg Год назад

    Sure, here's the edited version of the RUclips comment:
    Great video! I have a question: When you create an enabled identity on the web app and then create the access policy so that the application can access it, do you need to make any code changes? From what I saw in the video, it didn't seem like you had to change any code. So, does the Azure Default Identity work when the application is running in Azure? So no code changes are required?

    • @Codewrinkles
      @Codewrinkles  Год назад

      If you use the system assigned managed identity, then no change should be required in the code. If you use a user assigned managed identity, then you need to provide the Object identifier for that identity either in code or as an environment variable.

  • @kojoagyemang4169
    @kojoagyemang4169 Год назад +1

    Really useful and simple. Can't like it enough

  • @ravindranaths513
    @ravindranaths513 2 месяца назад

    In Azure, how can we link one service-bus topic to another topic?

  • @HungTran-jx2xc
    @HungTran-jx2xc Год назад +1

    how is the cost would increase since we retrieve the connection string directly from Azure Key Vault ?

    • @Codewrinkles
      @Codewrinkles  Год назад

      What cost exactly? Bot the Azure webapp and the KeyVault reside inside Azure, in the same region. So, I wouldn't be too worried about that in terms of network latency.

  • @bouthaynahamdi707
    @bouthaynahamdi707 6 месяцев назад

    very helpful. does it work if the app service is container base?

  • @isrukhasan8504
    @isrukhasan8504 Год назад

    This is one of the best. Clear and precise. Good job ! Love from Bangladesh

    • @Codewrinkles
      @Codewrinkles  Год назад

      Thanks for watching. Love back from Romania!

  • @Thecodemagic
    @Thecodemagic 3 месяца назад

    Thanks @Codewrinkles. The way you explained is fire. 🔥..you eared a new subscriber.

  • @343GuiItySpark
    @343GuiItySpark Год назад

    you just got a new subscriber.
    And I dont usually subscribe to anyone to keep my yt feed cleaner.
    Many thanks .

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      Thanks for the sub! I really appreciate it. Hope to not disappoint in the future :)

  • @Erny-w6s
    @Erny-w6s 26 дней назад

    I can never thank you enough!. Thank you so much for this.

  • @19balazs86
    @19balazs86 Год назад +2

    This video could be on the Microsoft Learn page by default. Easier and better to understand the KeyVault, than other learning materials.

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      Thank you for the kind words. Feel then free to share it wherever you can. That would probably help a lot of people.

    • @nove1398
      @nove1398 Год назад +1

      I feel the same here

    • @Codewrinkles
      @Codewrinkles  Год назад

      @@nove1398 Same goes for you. Feel free to share it wherever you think there are people that would find in useful: at work, friends, social media, forums. That would be highly appreciated.

  • @ahmedmagdy356
    @ahmedmagdy356 14 дней назад

    Excellent video. Thanks 🎉

  • @jadhavvishal89
    @jadhavvishal89 Год назад

    Always waiting for your new videos, it's really help me and encourage me to learn and use concept with new way. Thank you very much.

    • @Codewrinkles
      @Codewrinkles  Год назад

      Happy to hear that! Thank you for watching.

  • @dailylearning1706
    @dailylearning1706 Год назад

    Excellent job, thank you. But can you make a video like this with Terraform? I mean, by using Terraform to create the key vault, the secret inside the key vault and then access the secret from the secret vault with Terraform and Azurerm provider. Thank you in advance.

    • @Codewrinkles
      @Codewrinkles  Год назад

      Thanks for the idea! I guess infrastructure as code topics is something that I'll cover sooner rather than later.

  • @zaharivaklinov
    @zaharivaklinov Год назад

    Short, clear and concise. If only this had been uploaded back in December. Nevertheless, I will be using it from now on (:

  • @alboshajdari6871
    @alboshajdari6871 Год назад

    AddAzureKeyVault is now updated and now requiring different arguments:
    (string vault, string clientId, string clientSecret)
    But why do I need to manually give clientId and clientSecret when I already have valid credentials through DefaultAzureCredential(); ?

    • @Codewrinkles
      @Codewrinkles  Год назад

      TBH, I'm not sure about this change. This video is not that old. I will investigate. But it seems very odd to me.

    • @alboshajdari6871
      @alboshajdari6871 Год назад

      @@Codewrinkles I found a solution, I was able to do it with this code here:
      string keyVaultUrl = builder.Configuration.GetSection("KeyVaultUrl").Value!;
      var azureServiceTokenProvider = new AzureServiceTokenProvider();
      var keyVaultClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
      builder.Configuration.AddAzureKeyVault(keyVaultUrl, keyVaultClient, new DefaultKeyVaultSecretManager());

    • @pylvr8021
      @pylvr8021 Год назад

      any updates on this, could you tell from what packages its comes from, i did not find it anywhere
      @@Codewrinkles

  • @viktorasmickunas2527
    @viktorasmickunas2527 Год назад

    A very useful and much needed video. Thank you.

  • @PhantasyAI0
    @PhantasyAI0 10 месяцев назад

    what about Cache the secrets? the way you did it now you'd have to pay for every read operation on a secret. You need to Cache the secrets and reuse from memory whenever possible right?

    • @Codewrinkles
      @Codewrinkles  10 месяцев назад

      That sounds like a valid point and idea.

  • @mustafaaltnok3250
    @mustafaaltnok3250 Год назад

    Thanks for the video, What about azure keyvault- azure kubernetes integration?

  • @androidsavior
    @androidsavior 8 месяцев назад

    Thank you very much, it will try it soon

  • @PROFDAILY
    @PROFDAILY Год назад

    Great Work, what happens if you deploy to different environments(dev, QA and Prod), your vault will have different secrets, how do you then update you Program.cs to read different secret based on the environment?

    • @Codewrinkles
      @Codewrinkles  Год назад +2

      First of, you just create the needed secrets for each environment. In your app you than use the secrets based on the environment you are currently in.
      You'll have to create 3 managed identities for each of the web apps and assign permissions. An alternative here would be to create one user assigned managed identity and use it for all the environments. This would actually be a scenario where a user assigned managed identity would make sense.

    • @flo187de
      @flo187de Год назад +1

      @@Codewrinkles I've used a separate keyvault for each environment. that way I only have to change they keyvault url in appsettings. any downsides to that?

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      I wouldn't say it's a problem or downside, but companies tend to usually have more consolidated key vaults, as they would contain keys, secrets and certificates used throughout all the Azure resources.

    • @PROFDAILY
      @PROFDAILY Год назад

      @@Codewrinkles that makes sense

  • @AhmedMohammed23
    @AhmedMohammed23 Год назад

    my man where were you hiding
    great content overall thanks

  • @SinanNAR
    @SinanNAR Год назад

    What is the difference between system generated and user generated managed identity? Also could you please cover app configuration with keyvault together for next topic?

    • @Codewrinkles
      @Codewrinkles  Год назад

      I explained the difference in the video. Maybe you have skipped that part :)

  • @brianalessi2673
    @brianalessi2673 Год назад

    Create video, this was very informative! We just implanted this with success, but we also noticed that it takes about 12 seconds to retrieve just one secret. Has anyone noticed this or discovered workaround(s)?

    • @Codewrinkles
      @Codewrinkles  Год назад

      I assume there's a networking problem somewhere. Retrieving secrets is and should be very fast.

  • @jadhavvishal89
    @jadhavvishal89 Год назад

    Awesome video @codewrincles, you explain how to use key vault concept very simple way. I gone through lots of documents, but your 16 min video help me to clear my most of the doubts. Thanks.
    Could you please cover azure function with real time scenario. Like input and output bindings.

    • @Codewrinkles
      @Codewrinkles  Год назад

      I'm glad the video was useful to you. I will for sure cover also Azure Functions, probably in a lot of videos. I'm just getting the Azure series started. That's the 4th video only :)

  • @xelaksal6690
    @xelaksal6690 Год назад

    Thanks for very clear explanation!

  • @mahdiali4299
    @mahdiali4299 21 день назад

    Really clean code thanks a lot

  • @Harshvardhan2
    @Harshvardhan2 2 месяца назад

    Simple and Perfect

  • @sauravbhatta5303
    @sauravbhatta5303 Год назад

    Good content.
    You should also start producing content for Azure service fabric, function and service bus
    Have u also looked into Azure app configuration?

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      I have just started the Azure videos on this channel. I'll get probably in most of the topicsyou mentioned. Thank you for watching and commenting!

  • @Liboterac
    @Liboterac Год назад

    Bro u are fking awesome! Thank you for this. Clear, on spot, nice examples....

    • @Codewrinkles
      @Codewrinkles  Год назад

      Glad you found it useful. Thanks for watching!

  • @loadiam
    @loadiam Год назад

    Simple and helpful!

  • @NazarYuras
    @NazarYuras Год назад

    Thank you very much!

    • @Codewrinkles
      @Codewrinkles  Год назад

      Glad you enjoyed it. Thanks for watching.

  • @Harshvardhan2
    @Harshvardhan2 2 месяца назад

    Thanks

  • @codeme8016
    @codeme8016 7 месяцев назад

    Wonderful

  • @RoyZASTEROiD
    @RoyZASTEROiD Год назад

    thanks

  • @AnsisPlepis
    @AnsisPlepis Год назад +1

    14:20 Theres nothing wrong with your face :)

  • @Harshvardhan2
    @Harshvardhan2 2 месяца назад

    Thanks