<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Managed-Identity | The .NET Blog</title><link>https://thedotnetblog.com/tags/managed-identity/</link><description>Articles, tutorials and insights from the .NET community.</description><generator>Hugo</generator><language>en</language><managingEditor>@thedotnetblog (The .NET Blog)</managingEditor><webMaster>@thedotnetblog</webMaster><lastBuildDate>Thu, 16 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://thedotnetblog.com/tags/managed-identity/index.xml" rel="self" type="application/rss+xml"/><item><title>Cosmos DB Access Without Secrets Is the New Baseline</title><link>https://thedotnetblog.com/news/emiliano-montesdeoca/cosmosdb-role-assignment-without-secrets/</link><pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate><author>Emiliano Montesdeoca</author><guid>https://thedotnetblog.com/news/emiliano-montesdeoca/cosmosdb-role-assignment-without-secrets/</guid><description>If your Cosmos DB app still depends on keys, you are already behind on operational security.</description><content:encoded>&lt;p&gt;Original source: &lt;a href="https://devblogs.microsoft.com/cosmosdb/which-azure-cosmos-db-role-does-my-app-need/"&gt;Which Azure Cosmos DB Role Does My App Need?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The most important idea in this Cosmos DB guidance is not a command, a role ID, or a CLI trick. It is architectural: &lt;strong&gt;stop treating credentials as app configuration&lt;/strong&gt; and start treating identity as runtime state.&lt;/p&gt;
&lt;p&gt;Too many teams still ship with connection strings because it feels fast. It is not fast. It is deferred risk. Every key in a config file becomes an incident waiting for a rushed commit, a copied pipeline variable, or a leaked log. Managed identity plus data-plane RBAC removes that class of failure almost completely.&lt;/p&gt;
&lt;p&gt;The practical challenge is confusion between &lt;strong&gt;control-plane&lt;/strong&gt; and &lt;strong&gt;data-plane&lt;/strong&gt; authorization. This is where many otherwise strong teams lose days. Azure RBAC roles on resources do not automatically grant document access, and Cosmos data-plane roles do not grant account administration. If your team does not explicitly document that separation in your runbooks, you will keep getting brittle deployments and hard-to-debug 403s.&lt;/p&gt;
&lt;h3 id="my-opinionated-recommendation-for-production-teams"&gt;My opinionated recommendation for production teams&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Start with Data Reader&lt;/strong&gt; for read paths and Data Contributor only where writes are truly required.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scope broadly only when&lt;/strong&gt; you have a single application boundary per account.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;If you share an account across services&lt;/strong&gt;, narrow scope early to database or container boundaries instead of waiting for audit pressure.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is one of those decisions that &lt;strong&gt;compounds&lt;/strong&gt;. When you wire your .NET app with &lt;code&gt;DefaultAzureCredential&lt;/code&gt; and endpoint-only configuration, every environment gets cleaner: local, CI, staging, and prod. You also make incident response faster because you can reason about permissions through role assignments instead of hunting down mystery keys.&lt;/p&gt;
&lt;p&gt;The article also hints at something mature teams should embrace: &lt;strong&gt;permissions as iterative design&lt;/strong&gt;, not one-time setup. You can start broad enough to deliver, then ratchet down with telemetry and access reviews. Least privilege is not a philosophical endpoint; it is a delivery habit.&lt;/p&gt;
&lt;p&gt;If you only adopt one thing from this post, make it this: &lt;strong&gt;remove secrets first, optimize roles second&lt;/strong&gt;. Teams that reverse that order usually stall in meetings. Teams that remove secrets first usually ship, then harden.&lt;/p&gt;
&lt;p&gt;In 2026, &lt;strong&gt;secretless data access is not an advanced pattern&lt;/strong&gt;. It is the minimum responsible standard for serious .NET systems on Azure.&lt;/p&gt;</content:encoded></item></channel></rss>