<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Cloud Security Labs</title><link>https://amaima.me/posts/</link><description>Recent content in Posts on Cloud Security Labs</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Thu, 15 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://amaima.me/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Lab 3: Microsoft Entra Certificate Authentication with PowerShell and Microsoft Graph</title><link>https://amaima.me/posts/lab3_entra_certificate_authentication/</link><pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate><guid>https://amaima.me/posts/lab3_entra_certificate_authentication/</guid><description>&lt;h1 id="lab-3-microsoft-entra-certificate-authentication-with-powershell-and-microsoft-graph"&gt;Lab 3: Microsoft Entra Certificate Authentication with PowerShell and Microsoft Graph&lt;/h1&gt;
&lt;p&gt;In this lab I built a small PowerShell tool that logs in to Microsoft Entra ID as an &lt;strong&gt;application&lt;/strong&gt;, not as a person. The tool proves its identity with a &lt;strong&gt;certificate&lt;/strong&gt;, reads the users of my lab tenant through &lt;strong&gt;Microsoft Graph&lt;/strong&gt;, and saves them to a CSV file. After that I deleted the certificate from the app, checked that a new login was rejected, restored the certificate, and cleaned everything up.&lt;/p&gt;</description></item><item><title>Lab 2: Entra App Registration and Employee Portal</title><link>https://amaima.me/posts/lab-2---entra-app-registration-and-employee-portal/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://amaima.me/posts/lab-2---entra-app-registration-and-employee-portal/</guid><description>&lt;h1 id="lab-2-entra-app-registration-and-employee-portal-sable-entra-free-student-lab"&gt;Lab 2: Entra App Registration and Employee Portal (Sable Entra Free Student Lab)&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;[!abstract] Summary
&lt;strong&gt;Goal:&lt;/strong&gt; Build an employee portal on a Windows laptop (Node.js, localhost), connect it to an existing &lt;strong&gt;Microsoft Entra ID Free&lt;/strong&gt; tenant, sign in as an employee, and read the profile through &lt;strong&gt;Microsoft Graph&lt;/strong&gt;.
&lt;strong&gt;Time:&lt;/strong&gt; about 60 to 90 minutes for a first attempt. Finish the core lab before the optional access-control exercise.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="1-overview"&gt;1. Overview&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;The browser opens a local Node.js app (&lt;code&gt;http://localhost:3000&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The app redirects the browser to &lt;strong&gt;Microsoft Entra&lt;/strong&gt; to authenticate.&lt;/li&gt;
&lt;li&gt;After sign-in, Entra sends an &lt;strong&gt;authorization code&lt;/strong&gt; to the app&amp;rsquo;s registered redirect URI.&lt;/li&gt;
&lt;li&gt;The app exchanges the code for tokens and creates a &lt;strong&gt;session&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The app calls &lt;strong&gt;Microsoft Graph&lt;/strong&gt; to read the signed-in employee&amp;rsquo;s profile.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-mermaid" data-lang="mermaid"&gt;sequenceDiagram
participant B as Browser
participant A as Node.js app (localhost:3000)
participant E as Microsoft Entra
participant G as Microsoft Graph
B-&amp;gt;&amp;gt;A: Open site, click Sign in
A-&amp;gt;&amp;gt;B: Redirect to Entra
B-&amp;gt;&amp;gt;E: Employee authenticates
E-&amp;gt;&amp;gt;B: Redirect to /auth/redirect with authorization code
B-&amp;gt;&amp;gt;A: Deliver code
A-&amp;gt;&amp;gt;E: Exchange code (+ client secret) for tokens
E-&amp;gt;&amp;gt;A: ID token + access token
A-&amp;gt;&amp;gt;B: Create local session, greet employee
A-&amp;gt;&amp;gt;G: Call with access token (User.Read)
G-&amp;gt;&amp;gt;A: Employee profile
&lt;/code&gt;&lt;/pre&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Runs on your laptop&lt;/th&gt;
&lt;th&gt;Runs in Microsoft Entra&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Node.js app, session, &lt;code&gt;.env.dev&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Authentication, MFA, consent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terminal that keeps the server alive&lt;/td&gt;
&lt;td&gt;App registration, enterprise application (service principal)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser&lt;/td&gt;
&lt;td&gt;Token issuing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;[!note] Local only
Localhost means this computer. Nobody else can reach your copy by opening localhost on their PC.&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>Lab 1: Sync On-Premises AD to Entra ID</title><link>https://amaima.me/posts/lab-1---sync-on-premises-ad-to-entra-id/</link><pubDate>Sat, 03 Oct 2026 00:00:00 +0000</pubDate><guid>https://amaima.me/posts/lab-1---sync-on-premises-ad-to-entra-id/</guid><description>&lt;h1 id="lab-1-sync-on-premises-active-directory-to-microsoft-entra-id"&gt;Lab 1: Sync On-Premises Active Directory to Microsoft Entra ID&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;[!abstract] Summary
&lt;strong&gt;Goal:&lt;/strong&gt; Install &lt;strong&gt;Microsoft Entra Connect Sync&lt;/strong&gt; on a Windows Server VM and synchronize the users of the on-premises Active Directory forest (&lt;code&gt;aden.local&lt;/code&gt;) to a Microsoft Entra ID tenant.
&lt;strong&gt;Result:&lt;/strong&gt; On-premises users appear in Entra ID with &lt;strong&gt;On-premises sync enabled = Yes&lt;/strong&gt;, and password hash synchronization is enabled.
&lt;strong&gt;Scope:&lt;/strong&gt; This page covers the Entra Connect part (download, install, configure, verify). The Windows Server VM and the AD forest were built beforehand.&lt;/p&gt;
&lt;/blockquote&gt;</description></item></channel></rss>