<?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 on The Cloud Hub</title>
    <link>https://thecloudhub.com/tag/managed-identity/</link>
    <description>Recent content in managed-identity on The Cloud Hub</description>
    <generator>Hugo -- 0.118.2</generator>
    <language>en-au</language>
    <lastBuildDate>Wed, 29 Jan 2020 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://thecloudhub.com/tag/managed-identity/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Managed identities and Azure App Service staging slots</title>
      <link>https://thecloudhub.com/2020/01/29/managed-identities-and-azure-app-service-staging-slots/</link>
      <pubDate>Wed, 29 Jan 2020 00:00:00 +0000</pubDate>
      <guid>https://thecloudhub.com/2020/01/29/managed-identities-and-azure-app-service-staging-slots/</guid>
      <description>If you&amp;rsquo;re using an Azure App Service on a tier that offers staging slots (standard and above) then you might want to consider what happens when you swap a slot.
If you&amp;rsquo;ve configured a slot then you&amp;rsquo;ll want to swap deployments at a minimum between a production and pre-production environment. Microsoft cover in depth what happens when you commence a swap, but what they don&amp;rsquo;t cover is what happens to any managed identities that you have setup for the app service.</description>
      <content:encoded><![CDATA[<p>If you&rsquo;re using an Azure App Service on a tier that offers staging slots (standard and above) then you might want to consider what happens when you swap a slot.</p>
<p>If you&rsquo;ve configured a slot then you&rsquo;ll want to swap deployments at a minimum between a production and pre-production environment. Microsoft cover in depth <a href="https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#what-happens-during-a-swap">what happens when you commence a swap</a>, but what they don&rsquo;t cover is what happens to any <a href="https://thecloudhub.com/2019/03/whats-an-azure-service-principal-and-managed-identity/">managed identities</a> that you have setup for the app service.</p>
<p>In short, managed identities are tied to the slot in which you first create or assign them, and do <em>not</em> change when you initiate a swap between two or more slots.</p>
<p>You <a href="https://thecloudhub.com/2019/03/whats-an-azure-service-principal-and-managed-identity/">might recall</a> that for an App Service you can have both a system-assigned or a user-assigned identity. These are configured to allow your App Service to access other Azure resources, without the need for sharing secrets and passwords.</p>
<p>When swapping slots, both system and user-assigned identities remain tied to the slot. They don&rsquo;t swap - so if you need to change these, you&rsquo;ll need to intervene separately.</p>
<p>Once you&rsquo;ve generated or assigned an identity, don&rsquo;t forget to then add it to any Azure resources your app needs access to.</p>
<p>Also keep in mind the lifecycle of a managed identity. User assigned identities won&rsquo;t be removed whenever you delete a slot. On the other hand, system assigned identities will be deleted as soon as you delete a slot. Depending on your situation, you may prefer one of these approaches.</p>
]]></content:encoded>
    </item>
    <item>
      <title>What&#39;s an Azure Service Principal and Managed Identity?</title>
      <link>https://thecloudhub.com/2019/03/22/whats-an-azure-service-principal-and-managed-identity/</link>
      <pubDate>Fri, 22 Mar 2019 00:00:00 +0000</pubDate>
      <guid>https://thecloudhub.com/2019/03/22/whats-an-azure-service-principal-and-managed-identity/</guid>
      <description>In this post, we&amp;rsquo;ll take a brief look at the difference between an Azure service principal and a managed identity (formerly referred to as a Managed Service Identity or MSI).
Dive deeper into Azure AD service principals and managed identities in our new detailed ebook about Azure AD
What is a service principal or managed service identity? Lets get the basics out of the way first. In short, a service principal can be defined as:</description>
      <content:encoded><![CDATA[<p>In this post, we&rsquo;ll take a brief look at the difference between an Azure service principal and a managed identity (formerly referred to as a Managed Service Identity or MSI).</p>
<p><a href="https://thecloudhub.com/books/azure-ad-apps/">Dive deeper into Azure AD service principals and managed identities in our new detailed ebook about Azure AD</a></p>
<h2 id="what-is-a-service-principal-or-managed-service-identity">What is a service principal or managed service identity?</h2>
<p>Lets get the basics out of the way first. In short, a service principal can be defined as:</p>
<blockquote>
<p>An application whose tokens can be used to authenticate and grant access to specific Azure resources from a user-app, service or automation tool, when an organisation is using Azure Active Directory.</p>
</blockquote>
<p>In essence, service principals help us avoid having to create fake users in Active Directory in order to manage authentication when we need to access Azure resources.</p>
<p>Stepping back a bit, and its important to remember that service principals are defined on a per-tenant basis. This is different to the application in which principals are created - the application sits across every tenant.</p>
<p>Managed identities are often spoken about when talking about service principals, and that&rsquo;s because its now the preferred approach to managing identities for apps and automation access. In effect, a managed identity is a layer on top of a service principal, removing the need for you to manually create and manage service principals directly.</p>
<p>There are two types of managed identities:</p>
<ul>
<li>
<p>System-assigned: These identities are tied directly to a resource, and abide by that resources&rsquo; lifecycle. For instance, if that resource is deleted then the identity too will be removed</p>
</li>
<li>
<p>User-assigned: These identities are created independent of a resource, and as such can be used between different resources. Removing them is a manual process whenever you see fit</p>
</li>
</ul>
<p>One of the problems with managed identities is that for now only a <a href="https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/services-support-msi">limited subset of Azure services support using them</a> as an authentication mechanism. If the service you use doesn&rsquo;t support MI, then you&rsquo;ll need to either continue to manually create your service/security principals.</p>
<h2 id="so-whats-the-difference">So what&rsquo;s the difference?</h2>
<p>Put simply, the difference between a managed identity and a service principal is that a managed identity <em>manages</em> the creation and automatic renewal of a service principal on your behalf.</p>
<p><strong>Update 31/1/20:</strong> If you&rsquo;re using Azure Web Apps, check out our <a href="https://thecloudhub.com/2020/01/managed-identities-and-azure-app-service-staging-slots/">new post on using managed identities with deployment slots</a></p>
]]></content:encoded>
    </item>
  </channel>
</rss>
