{"id":251830,"date":"2024-12-24T05:00:11","date_gmt":"2024-12-24T13:00:11","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=251830"},"modified":"2024-12-16T12:09:29","modified_gmt":"2024-12-16T20:09:29","slug":"connect-securely-to-your-azure-resources","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/connect-securely-to-your-azure-resources\/","title":{"rendered":"Connect securely to your Azure resources"},"content":{"rendered":"<p>Visual Studio 2022&#8217;s Connected Services features are being updated to help you start secure. In the past, for example with Azure Storage, we\u2019d inject the entire connection string into your configuration. With this update, we\u2019ve removed the secrets from the UX \u2013 and from what we save to configuration \u2013 altogether. This means your code has fewer secrets in it, so you won\u2019t push those into your source control repository inadvertently.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-251831\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/word-image-251830-1.png\" alt=\"Connecting to Azure storage old view\" width=\"804\" height=\"564\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/word-image-251830-1.png 804w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/word-image-251830-1-300x210.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/word-image-251830-1-768x539.png 768w\" sizes=\"(max-width: 804px) 100vw, 804px\" \/><\/p>\n<h1>Integrated authentication, by default<\/h1>\n<p>Prior to this update, Connected Services would inject secret-inclusive connection strings for resources like Azure Storage into your secrets. If you were using <em>secrets.json<\/em> for local storage, this would result in your secrets being stored in files on disk.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-251832\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screenshot-of-a-computer-program-description-au.png\" alt=\"screenshot of code with secret blurred out in it\" width=\"1564\" height=\"429\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screenshot-of-a-computer-program-description-au.png 1564w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screenshot-of-a-computer-program-description-au-300x82.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screenshot-of-a-computer-program-description-au-1024x281.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screenshot-of-a-computer-program-description-au-768x211.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screenshot-of-a-computer-program-description-au-1536x421.png 1536w\" sizes=\"(max-width: 1564px) 100vw, 1564px\" \/><\/p>\n<p>After this update, your <em>secrets.json<\/em> will contain no actual secrets, but rather the Azure Storage endpoints for your service instance. Using the latest Azure SDKs, your code connects to your Azure resources using your Visual Studio or Azure CLI login. Locally, your logged-in credential does the magic; in Azure, the app service&#8217;s managed identity takes over!<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-251833\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screen-shot-of-a-computer-description-automatic.png\" alt=\"screenshot of the same code after update with no secret in code\" width=\"1425\" height=\"264\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screen-shot-of-a-computer-description-automatic.png 1425w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screen-shot-of-a-computer-description-automatic-300x56.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screen-shot-of-a-computer-description-automatic-1024x190.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/12\/a-screen-shot-of-a-computer-description-automatic-768x142.png 768w\" sizes=\"(max-width: 1425px) 100vw, 1425px\" \/><\/p>\n<h1>Benefits with this update<\/h1>\n<p><strong>Enhanced security:<\/strong> Fewer secrets on disk means your development process is automatically more secure, since you mitigate the potential for these secrets to be inadvertently committed to source control.<\/p>\n<p><strong>Simplified development and deployment:<\/strong> Focus on what you do best &#8211; coding &#8211; while Connected Services handles the tedious parts, more securely than ever.<\/p>\n<p><strong>Automated configuration:<\/strong> During publishing, your app is seamlessly configured with the necessary identity and roles needed to access resources, making the process smoother than ever.<\/p>\n<h1>Thank You for Your Feedback<\/h1>\n<p>Your invaluable feedback drives our continuous improvement. We&#8217;re thrilled to bring you these enhancements and can&#8217;t wait to hear about your experiences with the new Connected Services feature. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2022&#8217;s Connected Services features are being updated to help you start secure. In the past, for example with Azure Storage, we\u2019d inject the entire connection string into your configuration. With this update, we\u2019ve removed the secrets from the UX \u2013 and from what we save to configuration \u2013 altogether. This means your code [&hellip;]<\/p>\n","protected":false},"author":2046,"featured_media":251833,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6903,6869,1412,155],"tags":[6589,380,6801],"class_list":["post-251830","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administration","category-reliability","category-development","category-visual-studio","tag-authentication","tag-azure-app-services","tag-azure-storage"],"acf":[],"blog_post_summary":"<p>Visual Studio 2022&#8217;s Connected Services features are being updated to help you start secure. In the past, for example with Azure Storage, we\u2019d inject the entire connection string into your configuration. With this update, we\u2019ve removed the secrets from the UX \u2013 and from what we save to configuration \u2013 altogether. This means your code [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/251830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/2046"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=251830"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/251830\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/251833"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=251830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=251830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=251830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}