Azure PAM: How To Manage Access With Azure Bastion And Azure PIM  
Tags: cloud, kubernetes, azure, devops
Published: 2023-06-07 10:01:15

<!-- wp:paragraph -->
<p>Privileged access management (PAM) is an identity security system that assists organizations in protecting themselves against cyber risks by monitoring, detecting, and preventing unwanted privileged access to important resources.&nbsp;Every cloud provider offers solutions for this, and Azure is no exception. But how do you make Azure PAM work for a cloud application?</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"anchor":"h-what-is-azure-privileged-access-management-pam-all-about"} -->
<h2 class="wp-block-heading" id="h-what-is-azure-privileged-access-management-pam-all-about">What is Azure privileged access management (PAM) all about?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Privileged access = access with increased administrative permissions. For example, using the SSH or RDP protocol to virtual machines running an application is considered “privileged,” especially if you get root or “administrator” access.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Another area of privileged access centers around the creation, deletion, and updating of cloud resources in Azure. These types of actions require elevated permissions for Azure users specifically.</p>
<!-- /wp:paragraph -->

<!-- wp:quote {"className":"is-style-plain"} -->
<blockquote class="wp-block-quote is-style-plain"><!-- wp:paragraph -->
<p>Azure provides diverse tooling to identify an acceptable level of security controls consistent with the current and future Identity and Access Management policies of your company.</p>
<!-- /wp:paragraph --></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>In what follows, I focus on two specific Azure privileged access management solutions: Bastions and PIM.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"anchor":"h-azure-bastion-for-host-access"} -->
<h2 class="wp-block-heading" id="h-azure-bastion-for-host-access">Azure Bastion for host access</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Azure Bastion PaaS service comes in handy for configuring Azure VM host access, which is key in building Azure PAM. It allows you to connect to a VM using a browser and the Azure portal. You can also connect using the native SSH or RDP client already installed on a local computer. VMs don’t require public IPs, special agents aren’t required either.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The following diagram depicts the network topology required for Bastion access:</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":19669,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cast.ai/wp-content/uploads/2023/05/image-1.png" alt="Azure PAM" class="wp-image-19669"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Source: <a href="https://learn.microsoft.com/en-us/azure/bastion/bastion-overview">Azure</a></p>
<!-- /wp:paragraph -->

<!-- wp:quote {"className":"is-style-plain"} -->
<blockquote class="wp-block-quote is-style-plain"><!-- wp:paragraph -->
<p>Since VMs aren’t accessible over the internet, they’re not susceptible to port scanning and potential zero-day attacks against internet-exposed ports and protocols.&nbsp;</p>
<!-- /wp:paragraph --></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>Azure Bastion is a hardened “jump box,” and Microsoft is responsible for patching, zero-day vulnerabilities, and network attacks.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"anchor":"h-types-of-azure-bastion"} -->
<h3 class="wp-block-heading" id="h-types-of-azure-bastion">Types of Azure Bastion</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Azure Bastion comes in two flavors: Basic and Standard (SKUs). The differences between these offerings are as follows:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4,"anchor":"h-session-management"} -->
<h4 class="wp-block-heading" id="h-session-management">Session Management</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Azure Bastion can monitor distant sessions and perform swift management actions. Session monitoring allows you to see which users are connected to which virtual machines. It displays the IP address from which the user connected, how long they were connected, and when they connected.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The session management experience lets you select an ongoing session and force-disconnect or delete a session to disconnect the user from the ongoing session.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4,"anchor":"h-pricing"} -->
<h4 class="wp-block-heading" id="h-pricing">Pricing</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>How much does Azure Bastion cost? Here’s a pricing breakdown:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Azure Bastion Basic – $0.19 per hour, $138.70 per Month,</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Azure Bastion Standard – $0.29 per hour, $211.70 per Month,</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Additional Standard Instance – $0.14 per hour, $102.20 per Month.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Note that you only need one bastion service for all peered VNets. Previously, Bastion required an instance per VNet, making the service cost prohibitive for all VNets.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4,"anchor":"h-opening-management-ports-just-in-time"} -->
<h4 class="wp-block-heading" id="h-opening-management-ports-just-in-time">Opening management ports – just in time</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Adjacent to privileged access, you can reduce the administrative attack surface by enabling VM management port access in real time, through an access request workflow.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Azure Defender for Cloud provides this capability through the “secure management port” control feature.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can time-bind access to management ports and revoke it after a specified TTL. Furthermore, you can enforce a policy that only Azure Bastion hosts have access to management ports (as specified by security groups).</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"anchor":"h-azure-active-directory-and-privileged-identity-management-pim"} -->
<h2 class="wp-block-heading" id="h-azure-active-directory-and-privileged-identity-management-pim">Azure Active Directory and Privileged Identity Management (PIM)</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Privileged Identity Management (PIM) is a service in Azure Active Directory (Azure AD) that allows you to manage, control, and monitor access to critical organizational resources. This includes Azure AD, Azure, and other Microsoft Online Services like Microsoft 365.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>PIM can help you achieve the following policy-driven objectives:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Allow only-when-needed privileged access to Azure AD and Azure resources.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Use start and end dates to assign time-bound access to resources.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>To activate privileged positions, you must first obtain authorization.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>To activate any position, require multi-factor authentication.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>To understand why people activate, utilize reasoning.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Receive alerts when privileged roles are activated.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Conduct access audits to ensure that users still require roles.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Save audit history for internal or external auditing purposes.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Prevents the last active Global Administrator and Privileged Role Administrator role assignments from being removed.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>PIM helps teams reach the goal of removing all console access from administrative users in their landing zone. They can then activate specific roles and permissions through the PIM-provided approval workflow. Access will be time bound and auditable.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"anchor":"h-pricing-and-licensing-requirements-for-pim"} -->
<h3 class="wp-block-heading" id="h-pricing-and-licensing-requirements-for-pim">Pricing and licensing requirements for PIM</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Azure PIM comes at an additional cost. Using this feature requires Azure Active Directory Premium P2 licenses. P2 costs $9 per user per month – as compared with P1 which costs $6 per user per month. Note that you only need to license Azure users in this context.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"anchor":"h-azure-devops-and-pim"} -->
<h3 class="wp-block-heading" id="h-azure-devops-and-pim">Azure DevOps and PIM</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Azure DevOps has been integrated with PIM since 2019. Azure AD has an Azure DevOps administrator role that you can use in conjunction with PIM to elevate permissions.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Azure DevOps is a separate product, so there is a small caveat that users must log off and log back in to activate elevated privileges. At least one user has shared their experience with AD Groups and PIM, this seems to work well.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"anchor":"h-there-s-more-to-discover-about-azure-pam"} -->
<h2 class="wp-block-heading" id="h-there-s-more-to-discover-about-azure-pam">There’s more to discover about Azure PAM&nbsp;</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In this article, I just scratched the surface of all the available Azure services for building privileged access management capabilities into a cloud application running in Azure. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>If you’re looking for more Azure security insights, check out <a href="https://cast.ai/blog/identity-access-management-cloud-migration/">this article on identity access management (IAM)</a> and a more <a href="https://cast.ai/blog/6-key-elements-for-a-secure-cloud-migration/">high-level overview of security for cloud migration and beyond</a>.</strong></p>
<!-- /wp:paragraph -->