<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aymen Abdelwahed on Medium]]></title>
        <description><![CDATA[Stories by Aymen Abdelwahed on Medium]]></description>
        <link>https://medium.com/@aymen-abdelwahed?source=rss-e85d7754a986------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*z3iVPxm5zHKW_zgk0Rot-w.png</url>
            <title>Stories by Aymen Abdelwahed on Medium</title>
            <link>https://medium.com/@aymen-abdelwahed?source=rss-e85d7754a986------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 18:42:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aymen-abdelwahed/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Platform Engineering: Auditing Azure DevOps Pipelines — The Overview]]></title>
            <link>https://medium.com/uleap/platform-engineering-auditing-azure-devops-pipelines-the-overview-6e5bc1fac8c1?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e5bc1fac8c1</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[platform-engineer]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Sat, 22 Nov 2025 17:29:26 GMT</pubDate>
            <atom:updated>2025-11-22T17:32:33.833Z</atom:updated>
            <content:encoded><![CDATA[<h3>Platform Engineering: Auditing Azure DevOps Pipelines — The Overview</h3><blockquote>What if a single pipeline run could expose your whole team to compliance risk? Your engineers stride confidently through deployments, productivity humming — until a surprise audit reveals rogue marketplace tasks sneaked past the gates. Every DevOps leader dreads those moments.</blockquote><p>In the world of platform engineering, your primary mission is to build and maintain self-service products — tools, extensions, and automated workflows — that every DevOps team across your organization relies on.</p><p>This radically boosts productivity and standardizes best practices. But with great power comes great responsibility: How do you ensure that every team truly uses the authorized home-made products without slipping into non-compliant, unsupported tools?</p><blockquote>Here’s how auditing pipelines with Custom Logs becomes a cornerstone for platform engineering success!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7S-o7R1BLvRmaJCe.png" /></figure><h3>The Platform Engineering Challenge — Shadow Extensions Threaten Security</h3><p>Platform teams build trusted extensions to simplify and secure cloud resources’ creation, yet without enforcement, freedom turns into risk. Teams bypass standards, spawn shadow IT, and hide non-compliant tasks inside black-box pipelines.</p><p>The danger is subtle but real: unapproved extensions undermine governance and erode trust. You can’t secure what you can’t see. Mature platform organizations solve this with continuous visibility — real-time insight into every pipeline, every task, every run. That’s how self-service stays safe.</p><blockquote>To flip this script, you need real-time, actionable data!</blockquote><p>Our set of articles will cover several disntinct, yet connected topics as below: (Coming Very Soon)</p><h4><strong>Part 1:</strong> Platform Engineering: Auditing Azure DevOps Pipelines for Extension Compliance (Log Analytics)</h4><blockquote>Shape a Custom Table in an Azure Log Analytics, and implement prerequisites for Data Collection (using Data Collection Rules), all using Bicep Configuration Templates!</blockquote><h4><strong>Part 2</strong>: Platform Engineering: Auditing Azure DevOps Pipelines for Extension Compliance (Stream Data)</h4><blockquote>Collect &amp; forward data to the Data Collection Endpoint.</blockquote><h4><strong>Part 3</strong>: Platform Engineering: Auditing Azure DevOps Pipelines for Extension Compliance (Pipeline Decorator Extension)</h4><blockquote>Use the script and build an Azure DevOps Extension for Pipeline Decorator, injected automatically in every Pipeline execution. (Coming Soon…)</blockquote><h3>Wrapping Up</h3><p>Security in platform engineering is not just a post-development step — it’s automated, continuous, and clearly visualized within your Azure DevOps pipelines. Proactive integration of security means better visibility, real-time monitoring, and shared accountability for your deployments.</p><p>Explore the Part 1 and Part 2 of this series for practical steps to improve your pipeline audit and security posture. Share your feedback below and keep the discussion going.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e5bc1fac8c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/platform-engineering-auditing-azure-devops-pipelines-the-overview-6e5bc1fac8c1">Platform Engineering: Auditing Azure DevOps Pipelines — The Overview</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Azure App Roles: Why They Matter and How to Use Them!]]></title>
            <link>https://medium.com/uleap/demystifying-azure-app-roles-why-they-matter-and-how-to-use-them-478e5ff3a593?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/478e5ff3a593</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Fri, 26 Sep 2025 07:32:34 GMT</pubDate>
            <atom:updated>2025-09-28T11:30:10.522Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern applications often need more than just authentication — they need <strong>authorization</strong>. Once a user (or application) signs in, the system must verify &amp; decide on “<em>What are they allowed to do?”.</em></p><blockquote>That’s where <strong>Entra ID App Roles</strong> come in!</blockquote><h3>What Are App Roles?</h3><p><strong>App Roles</strong> are a feature of Entra ID App Registrations that help define Role-Based Access directly on the application’s identity configuration level. One should think of them as <strong>Application-specific Permissions</strong> that can be assigned to:</p><ul><li>Users</li><li>Groups</li><li>Other applications (Service Principals)</li></ul><p>When a user or app authenticates, Entra ID adds the assigned app roles to their security token (JWT). The Application can then check those roles to enforce authorization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*oABOB5pj3WHz4bjyLcf4JQ.png" /><figcaption>Illustration of AuthN/AuthZ — Image from Zero Trust Blog</figcaption></figure><h3>Why Use App Roles?</h3><p>For development teams and IT admins, app roles bring several advantages:</p><h4>🔑 1. Centralized Authorization</h4><p>Roles are defined in one place — the App Registration. This means less custom logic on the application side, thus a consistent security model.</p><h4>🔍 2. Token-Based Enforcement</h4><p>Roles are delivered in the roles claim of a JWT Access Token, making it straightforward for apps to read &amp; enforce them at runtime.</p><h4>👥 3. Assign Roles at Group Level</h4><p>No need to manage individual user assignments. App Role could be assigned to an Eid Group, so all of its members inherit it. This is a big win for large teams where people join/leave frequently.</p><h4>⚙️ 4. Works for Both Users and Services</h4><p>App Roles can be assigned not just to User Principals, but also to Service Principals (e.g., automated processes or other apps that need access).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*8yBP1RERtnMPacPRcr5lCQ.png" /></figure><h3>Example Scenario!</h3><p>Imagine an application that has two roles:</p><ul><li><strong>Admin</strong> → Allowing to manage users and settings.</li><li><strong>Reader</strong> → Restricted to only viewing reports.</li></ul><p>By defining these roles in the App Registration, teams avoid hardcoding permissions on the Application level. Instead, the app simply checks the access token claims:</p><pre>&quot;roles&quot;: [<br>  &quot;Admin&quot;<br>]</pre><p>If roles contains Admin, the user can access the management capabilities. Otherwise, they get read-only access, or get their access denied.</p><h3>How to Define App Roles?</h3><p>App roles are defined in the <strong>App Registration manifest</strong>. Here’s a snippet:</p><pre>...<br>&quot;ADApplicationName&quot;: &quot;sp-teamName-purpose&quot;,<br>&quot;appRoles&quot;: [<br>  {<br>    &quot;allowedMemberTypes&quot;: [&quot;User&quot;],<br>    &quot;description&quot;: &quot;Admins can manage all aspects of the app.&quot;,<br>    &quot;displayName&quot;: &quot;Admin&quot;,<br>    &quot;id&quot;: &quot;11111111-1111-1111-1111-111111111111&quot;,<br>    &quot;isEnabled&quot;: true,<br>    &quot;value&quot;: &quot;Admin&quot;<br>  },<br>  {<br>    &quot;allowedMemberTypes&quot;: [&quot;User&quot;, &quot;Application&quot;],<br>    &quot;description&quot;: &quot;Readers can view data but not modify it.&quot;,<br>    &quot;displayName&quot;: &quot;Reader&quot;,<br>    &quot;id&quot;: &quot;22222222-2222-2222-2222-222222222222&quot;,<br>    &quot;isEnabled&quot;: true,<br>    &quot;value&quot;: &quot;Reader&quot;<br>  }<br>]</pre><p>📌 Key points:</p><ul><li><strong>value</strong> → What appears in the JWT token (roles claim).</li><li><strong>allowedMemberTypes</strong> → Can be &quot;User&quot;, &quot;Application&quot;, or both.</li><li><strong>id</strong> → Must be a unique GUID per role.</li></ul><h3>Assigning App Roles to Groups</h3><p>To make management easier, teams could assign AppRoles to <strong>Entra ID groups</strong> instead of individuals (User or Service Principals). All of the group members automatically inherit the role/permissions.</p><p>📌 Basically, we need:</p><ul><li>PrincipalId: The ObjectId of the Security Group to whom you are assigning the App Role.</li><li>ResourceId: Object Id of the app’s Service Principal (not App Registration) that has defined the app role.</li><li>AppRoleId: The GUID of the app role defined in the manifest (defined on the resource service principal) to assign to the user.</li></ul><h4>🔨 Using PowerShell (Microsoft Graph)</h4><pre>Connect-MgGraph -Scopes &quot;AppRoleAssignment.ReadWrite.All&quot;</pre><pre>Import-Module Microsoft.Graph.Applications<br><br>New-MgGroupAppRoleAssignment -GroupId &quot;&lt;group-object-id&gt;&quot; -BodyParameter @{<br>    PrincipalId = &quot;&lt;group-object-id&gt;&quot;<br>    ResourceId  = &quot;&lt;service-principal-object-id&gt;&quot;<br>    AppRoleId   = &quot;&lt;app-role-id&gt;&quot;<br>}</pre><ul><li><a href="https://learn.microsoft.com/en-us/graph/api/group-post-approleassignments?view=graph-rest-1.0&amp;tabs=powershell#request">Grant an appRoleAssignment to a group - Microsoft Graph v1.0</a></li><li><a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.applications/new-mggroupapproleassignment?view=graph-powershell-1.0">New-MgGroupAppRoleAssignment (Microsoft.Graph.Applications)</a></li></ul><h4>🔨 Using Bicep</h4><pre>resource symbolicname &#39;Microsoft.Graph/appRoleAssignedTo@v1.0&#39; = {<br>  ...<br>}</pre><blockquote>For additional details refer to the Microsoft Learn docs below:</blockquote><p><a href="https://learn.microsoft.com/en-us/graph/templates/bicep/reference/approleassignedto?view=graph-bicep-1.0&amp;source=post_page-----478e5ff3a593---------------------------------------#resource-format">Microsoft.Graph/appRoleAssignedTo - Microsoft Graph Bicep v1.0 reference</a></p><h3>How to Get the Required IDs?</h3><ul><li><strong>App Role ID</strong> → From the app registration’s manifest (id property inside appRoles).</li><li><strong>Service Principal Object ID</strong> → az ad sp list --filter &quot;appId eq &#39;&lt;client-id&gt;&#39;&quot; --query &quot;[].id&quot; -o tsv</li><li><strong>Group Object ID</strong> → From the Entra ID group overview in the portal, or via az ad group show --group &quot;&lt;name&gt;&quot; --query id -o tsv.</li></ul><h3>Updating App Roles</h3><p>Need to add or modify a role? Simply update the app manifest via Graph API or Bicep, and the new AppRoles become available for assignment.</p><blockquote>For example, adding a new <strong>Editor</strong> role is just another entry in the appRoles array with its own GUID.</blockquote><h3>Final Thoughts</h3><p>App roles provide a <strong>clean, scalable, and secure</strong> way to manage access for applications and APIs:</p><ul><li>Centralized in Entra ID (no more scattered role tables in databases).</li><li>Assignable to Users, Groups, and Apps.</li><li>Delivered in tokens for efficient runtime checks.</li></ul><blockquote>For teams, this means <strong>less manual work</strong> and <strong>more reliable authorization</strong>. Instead of constantly updating user permissions, roles are defined once &amp; assigned to groups; Entra ID will handle the rest.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=478e5ff3a593" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/demystifying-azure-app-roles-why-they-matter-and-how-to-use-them-478e5ff3a593">Demystifying Azure App Roles: Why They Matter and How to Use Them!</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fetch scan results from CheckmarxOne! — REST APIs]]></title>
            <link>https://medium.com/uleap/fetch-scan-results-from-checkmarxone-rest-apis-14fd00425563?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/14fd00425563</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[checkmarxone]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[powershell]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Sun, 06 Jul 2025 14:45:41 GMT</pubDate>
            <atom:updated>2025-07-06T14:45:41.299Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fetch scan results from CheckmarxOne! — REST APIs 🚀</h3><p>Security is no longer a “<em>checklist</em>” item to be dealt with post-development; It is an integral component that should be automated and continuous!</p><p>Application Security Testing offers a proactive way to identify vulnerabilities in code before it reaches production. One of the ‘<em>leaders‘</em> in the security scanning space is Checkmarx, and in this straightforward blog post, we’ll explore how to trigger a scan recalculation on CxOne using API calls effortlessly.</p><blockquote>Here’s a step-by-step guide to trigger a scan recalculation on Checkmarx One, and fetch the scan results, empowering you to automate your security with precision and speed.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIU8LOqUHJDC6EYnUQpW_g.png" /></figure><h3>🔍 CheckmarxOne in a Nutshell</h3><p>Checkmarx One is a SaaS security platform designed for efficiency and accuracy in detecting known vulnerabilities.</p><p>CxOne combines <em>DAST</em>, <em>SAST</em>, <em>SCA</em>, IaC scans, and more, with various other security tools — allowing seamless integration into CI/CD pipelines and drastically enhancing the security posture from code commit to production.</p><h3>✅ Prerequisites</h3><p>Before we begin:</p><ul><li>Have a CheckmarxOne account (you can <a href="https://checkmarx.com/">sign up for a trial</a> if you don’t already have one).</li><li>Create a <strong>User Group</strong> (<em>Groups could be linked to an application or a microservice, so only a specific User Group could access their associated scans and security reports).</em>.</li><li>Refer to the <a href="https://checkmarx.stoplight.io/docs/checkmarx-one-api-reference-guide/3w7wczsazj6pg-introduction">CxOne API documentation</a></li><li>Identify the <strong>target SaaS endpoint</strong>.</li><li>Retrieve an <strong>AccessToken</strong>.</li><li>Trigger a <strong>CxOne scan</strong> (this automatically creates a Project).</li></ul><p>Let’s get to it!</p><h3>🔑 Step 1: Retrieve an Access Token</h3><p>Use the following PowerShell function to authenticate and obtain a JWT Access Token from CxOne:</p><blockquote>Please refer to the <a href="https://checkmarx.stoplight.io/docs/checkmarx-one-api-reference-guide/3w7wczsazj6pg-introduction">Authentication API of CheckmarxOne </a>for additional details:</blockquote><p><a href="https://checkmarx.stoplight.io/docs/checkmarx-one-api-reference-guide/3w7wczsazj6pg-introduction">Introduction | Checkmarx One API Reference Guide</a></p><pre>function Get-CxOneAccessToken {<br>    Param (<br>        [Parameter(Mandatory = $True)]<br>        [string]$ClientId,<br>        [Parameter(Mandatory = $True)]<br>        [string]$ClientSecret<br>    )<br> <br>    $body = @{<br>        grant_type    = &#39;client_credentials&#39;<br>        client_id     = $ClientId<br>        client_secret = $ClientSecret<br>    }<br> <br>    $cxOneBaseAuthUri = &quot;https://deu.iam.checkmarx.net&quot;<br>    $cxOneAuthUri = &quot;$cxOneBaseAuthUri/auth/realms/&lt;REPLACE_WITH_TENANT_NAME&gt;/protocol/openid-connect/token&quot;<br> <br>    try {<br>        $cxOneApiTokenResponse = Invoke-RestMethod -Method POST -Uri $cxOneAuthUri -body $body -ContentType &quot;application/x-www-form-urlencoded&quot;<br><br>        # Return Access Token<br>        return $cxOneApiTokenResponse.access_token<br>    }<br>    catch {<br>        throw &quot;Error occurred while trying to authenticate/retrieve access token from CxOne! $_&quot;<br>    }<br>}</pre><p>Call it like this:</p><pre>$accessToken = Get-CxOneAccessToken `<br>  -ClientId &lt;REPLACE_WITH_CLIENT_ID&gt; `<br>  -ClientSecret &lt;REPLACE_WITH_CLIENT_SECRET&gt;</pre><h3>🔁 Step 2: Trigger the Scan Recalculation</h3><p>Once you have the access token, you can trigger a scan recalculation. This is limited to SCA (Software Composition Analysis) scans:</p><pre>function Start-CxOneScanRecalculation {<br>    Param (<br>        [Parameter(Mandatory = $True)]<br>        [string]$AccessToken,<br>        [Parameter(Mandatory = $true)]<br>        [string]$ProjectId,<br>        [Parameter(Mandatory = $true)]<br>        [string]$BranchName<br>    )<br><br>    $headers = @{<br>        Authorization = &quot;Bearer $AccessToken&quot;<br>        Accept        = &quot;application/json; version=1.0&quot;<br>        ContentType   = &quot;application/json; version=1.0&quot;<br>    }<br><br>    $body = @{<br>        project_id = $ProjectId<br>        branch     = $BranchName<br>        engines    = @(&quot;sca&quot;)<br>    }<br><br>    $cxOneUri = &quot;https://deu.ast.checkmarx.net&quot;<br>    $cxOneApiUri = &quot;$cxOneUrl/api/scans/recalculate&quot;<br><br>    try {<br>        $cxOneResults = Invoke-RestMethod -Method POST -Uri $cxOneApiUri -Headers $headers -Body ($body | ConvertTo-Json -Depth 10)<br>    }<br>    catch {<br>        throw &quot;Failed to trigger a scan recalculation for the CxOne Project &#39;$ProjectId&#39;  branch &#39;$BranchName&#39;! $_&quot;        <br>    }<br><br>    return $cxOneResults<br>}</pre><h3>📥 Step 3: Fetch SCA Scan Results</h3><p>Once the scan is recalculated, use the Scan ID to fetch results and parse vulnerabilities:</p><pre>function Get-CxOneScaScanResults {<br>    Param (<br>        [Parameter(Mandatory = $True)]<br>        [string]$AccessToken,<br>        [Parameter(Mandatory = $True)]<br>        [string]$ScanId<br>    )<br> <br>    $headers = @{<br>        &quot;Authorization&quot; = &quot;Bearer $AccessToken&quot;<br>        &quot;Accept&quot;        = &quot;application/json&quot;<br>    }<br> <br>    $cxOneUril = &quot;https://deu.ast.checkmarx.net&quot;<br>    $cxOneApiUri = &quot;$cxOneAstBaseUri/api/results?scan-id=$ScanId&amp;limit=10000&amp;sort=-severity&quot;<br> <br>    try {<br>        $checkmarxOneResponse = Invoke-RestMethod -Method GET -Uri $cxOneAstUri -Headers $headers<br>        $cxOneScaScanResults = ($checkmarxOneResponse.results | Where-Object { $_.type -eq &#39;sca&#39; })<br>    }<br>    catch {<br>        throw &quot;Failed to retrieve scan results for Scan ID &#39;$ScanId&#39; from Checkmarx One. $_&quot;<br>    }<br> <br>    return $cxOneScaScanResults<br>}</pre><p>From the results, you can extract key data such as vulnerable package names, severity, CVE identifiers, and recommended remediation steps.</p><h3>📌 Step 4: Remediate and Rescan</h3><p>After reviewing and addressing vulnerabilities:</p><ul><li>Update the affected dependencies.</li><li>Commit and push the changes to the source repository.</li><li>Trigger another scan via the same API to validate the fixes.</li></ul><blockquote>This feedback loop ensures your codebase remains secure with every change.</blockquote><h3>💡 Tips for Effective Scanning with Checkmarx One</h3><ul><li><strong>Enable Notifications</strong>: Set up email or webhook alerts when new vulnerabilities are found or scans are completed.</li><li><strong>Automate Everything</strong>: Use Checkmarx API to programmatically trigger scans, fetch results, and integrate further into your CI/CD pipeline.</li><li><strong>Scan Smarter</strong>: Adjust scan frequency based on environment type (e.g., scan production branches more frequently, and less frequent scans for experimental branches).</li><li><strong>Use Tags and Metadata</strong>: Organize and filter scan results more effectively by tagging projects with meaningful labels.</li></ul><h3>🎯 Wrapping Up</h3><p>Setting up an SCA scan on Checkmarx One is simple, efficient, and powerful — ideal for teams committed to maintaining a secure software development process.</p><blockquote>So, what are your thoughts on this!!</blockquote><p>Integrating SCA scans with Checkmarx One into the <strong>DevSecOps lifecycle</strong> doesn’t just reduce risk — it empowers developers with instant, actionable insights for writing secure code from day one!</p><blockquote>Your turn!<br>Have you integrated security scans in your security pipeline yet? What tools or workflows have helped you automate vulnerability detection?</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14fd00425563" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/fetch-scan-results-from-checkmarxone-rest-apis-14fd00425563">Fetch scan results from CheckmarxOne! — REST APIs</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Event Grid — KeyVault events for NearlyExpiring objects!]]></title>
            <link>https://medium.com/uleap/event-grid-keyvault-events-for-nearlyexpiring-secrets-7c267de23e55?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c267de23e55</guid>
            <category><![CDATA[keyvault]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-functions]]></category>
            <category><![CDATA[eventgrid]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Thu, 06 Mar 2025 13:06:54 GMT</pubDate>
            <atom:updated>2025-03-14T10:21:43.572Z</atom:updated>
            <content:encoded><![CDATA[<h3>Event Grid — KeyVault events for NearlyExpiring objects!</h3><blockquote>Protecting Applications starts with secure secrets management — but how can we proactively monitor for potential issues before they cause harm?</blockquote><p>Managing secrets in Azure Key Vault is essential for safeguarding applications.</p><blockquote>However, what happens when secrets are about to expire?</blockquote><p>Overlooking the rotation of secrets can lead to outages and potential vulnerabilities, jeopardizing the whole company&#39;s security posture. The good news is that one can proactively tackle this challenge by integrating Azure Event Grid with Azure Key Vault and utilizing an Azure Function as an event handler. This setup allows for seamless, automatic responses to expiring secrets, helping you avoid unexpected disruptions.</p><p>In this blog post, we’ll walk you through the straightforward steps required to set up this powerful integration. Plus, we’ll provide PowerShell sample scripts to better grasp the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_Q2pBZ0BHZxFM-ylCeCdQ.jpeg" /><figcaption>Security Trio: Azure Key Vault, Azure Event Grid, Azure Functions</figcaption></figure><h3>🛠️ Architecture Overview</h3><ul><li><strong>Key Vault</strong>: Stores secrets, certificates, and keys and is our Event Source.</li><li><strong>Event Grid</strong>: Monitors Key Vault for events, like secret expiration.</li><li><strong>Azure Function</strong>: Handles the event and triggers secret processing (e.g., send an alert or start secret rotation).</li></ul><p>The flow looks like this:<br>🔑 <strong>Key Vault</strong> → 🔔 <strong>Event Grid</strong> → ⚡ <strong>Azure Function</strong> → 📩 <strong>Email/Log/Rotation Script</strong></p><h3>🔧 Step 1: Enable Event Grid</h3><p>First, make sure you enable the Event Grid resource provider in the Azure Subscription:</p><pre># Enable Event Grid Provider for your Azure Subscription<br>az feature register --name KeyVault --namespace Microsoft.EventGrid<br>az provider register --namespace Microsoft.EventGrid</pre><p>Then, create a System Topic for the target Key Vault to publish events:</p><pre>$resourceGroupName = &quot;rgpurposedevwe001&quot;<br>$eventGridSystemTopicName = &quot;egst-purpose-dev-we&quot;<br>$keyVaultName = &quot;kvpurposedevwe001&quot;<br>$keyVaultResourceId = &quot;/subscriptions/&lt;SUBSCRIPTION_ID&gt;/resourceGroups/$resourceGroup/providers/Microsoft.KeyVault/vaults/$keyVaultName&quot;<br><br>az eventgrid system-topic create --name $eventGridSystemTopicName `<br>  --resource-group $resourceGroupName --location &#39;northeurope&#39; `<br>  --source $keyVaultResourceid --topic-type &#39;Microsoft.KeyVault.vaults&#39;</pre><h3>🔔 Step 2: Create an Event Grid Subscription</h3><p>You need an Event Grid subscription to listen for Key Vault events. Specifically, we care about the Microsoft.KeyVault.SecretNearExpiry, andMicrosoft.KeyVault.CertificateNearExpiry event types.</p><pre>$eventGridSubscriptionName = &quot;evgs-purpose-dev-we&quot;<br>$azureFunctionName = &quot;func-purpose-dev-we&quot;<br>$functionName = &quot;secretprocessing&quot;<br>$functionEndpointId = &quot;/subscriptions/&lt;SUBSCRIPTION_ID&gt;/resourceGroups/$resourceGroup/providers/Microsoft.Web/sites/$azureFunctionName/functions/$functionName&quot;<br><br>az eventgrid system-topic event-subscription create `<br>    --name $eventGridSubscriptionName`<br>    --resource-group $resourceGroupName `<br>    --system-topic-name $eventGridSystemTopicName `<br>    --endpoint-type &#39;azurefunction&#39; `<br>    --endpoint $functionEndpointId `<br>    --included-event-types &#39;Microsoft.KeyVault.SecretNearExpiry, Microsoft.KeyVault.CertificateNearExpiry&#39;</pre><h3>⚡ Step 3: Create the Azure Function</h3><p>Let’s write a PowerShell-based Azure Function to handle secret near expiry events.</p><p>Here’s a simple function that logs the event and sends an email alert:</p><pre>using namespace System.Netparam($Request)<br><br>$body = $Request.Body | ConvertFrom-Json<br><br>foreach ($event in $body) {<br>    if ($event.eventType -eq &quot;Microsoft.KeyVault.SecretNearExpiry&quot;) {<br>        $secretName = $event.data.objectName<br>        $expiryDate = $event.data.expirationDateTime<br>        Write-Output &quot;Secret &#39;$secretName&#39; is nearing expiry on $expiryDate.&quot;<br>        # Example: Send an email via SendGrid or log the event<br>        Send-MailMessage -To &quot;admin@example.com&quot; `<br>                         -From &quot;alerts@example.com&quot; `<br>                         -Subject &quot;Key Vault Secret Expiry Alert&quot; `<br>                         -Body &quot;The secret &#39;$secretName&#39; is expiring on $expiryDate. Time to rotate it!&quot; `<br>                         -SmtpServer &quot;smtp.example.com&quot;<br>    }<br>}<br><br>Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{<br>    StatusCode = [HttpStatusCode]::OK<br>    Body = &quot;Secret expiry event processed.&quot;<br>})</pre><h3>🚀 Step 4: Test the Setup</h3><ul><li>Create a secret with a short expiry in Key Vault.</li><li>Watch the event get fired to Event Grid.</li><li>Your Azure Function logs the event and sends an alert!</li></ul><pre>$secretName = &quot;MyExpiringSecret&quot;<br>$secretValue = &quot;MySuperSecretValue&quot;<br><br>az keyvault secret set `<br>    --vault-name $keyVaultName `<br>    --name $secretName `<br>    --value $secretValue `<br>    --expires &quot;2025-03-10T00:00:00Z&quot;</pre><p>You should receive an alert before the secret expires! Expect a delay of 3 to 5 minutes before seeing events getting triggered.</p><h3>🎯 Wrapping Up</h3><p>With the dynamic trio of Key Vault, Event Grid, and Azure Functions, one can effortlessly automate secret management.</p><p>Imagine alerting your team in real time or triggering seamless secret rotations — keeping the systems secure while significantly minimizing downtime.</p><p>Want to take it further? You could enhance the function to automatically rotate secrets using Azure Automation, kick off a CI/CD pipeline, or create a Service Now incident! The possibilities are endless!🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c267de23e55" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/event-grid-keyvault-events-for-nearlyexpiring-secrets-7c267de23e55">Event Grid — KeyVault events for NearlyExpiring objects!</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IaC with Azure Deployment Stacks!]]></title>
            <link>https://medium.com/uleap/azure-deployment-stacks-8d17e16bb805?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d17e16bb805</guid>
            <category><![CDATA[powershell]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[infra-as-code]]></category>
            <category><![CDATA[bicep]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Tue, 12 Nov 2024 10:52:43 GMT</pubDate>
            <atom:updated>2024-11-19T05:47:15.982Z</atom:updated>
            <content:encoded><![CDATA[<p>Companies continuously solicit swifter ways to deploy, manage and scale cloud infrastructure. With Microsoft Azure leading the change in cloud innovation, the introduction of <strong>Azure Deployment Stacks</strong> delivers a rugged toolset for simplifying the deployment &amp; management of complex environments.</p><blockquote>This blog post delves into Azure Deployment Stacks, how they work, and how they can transform Azure cloud infrastructure management.</blockquote><h3>Azure Deployments Models</h3><p>We are used to `ARM templates`, `Bicep`, or `Powershell`/`Az-Cli` as deployment models for Azure resources’ provisioning based on Azure Resource Manager. These models enable sufficient flexibility in resource creation and removal. However, they lack some capabilities!</p><h4>Pain Points!</h4><p>Some of the known pain points and missing capabilities when managing Azure infrastructure are not limited to:</p><ul><li><strong>Lack of Resource Tracking!</strong></li></ul><p>In typical deployments in Azure, the deployment object is not that useful as it doesn’t help with resource tracking. Deleting the deployment object will do nothing; All the created resources will be left behind!</p><ul><li><strong>Challenges for Resources Lifecycle &amp; Cleanup!</strong></li></ul><p>In most cases, and for complex solutions, it gets harder to track and handle the lifecycle of a set of Azure Resources and or their cleanup!</p><blockquote>Manual removal of a complex solution could lead to orphaned resources, which could be costly!.</blockquote><blockquote>Removing a Resource Group is not an option for most teams; thus, a better way should exist to manage resources efficiently (Tagging/Metadata are valid, but things could get tricky).</blockquote><ul><li><strong>Lack of Resource protection!</strong></li></ul><p>Protecting resources from unwanted actions and preventing drift in configurations remains challenging.</p><blockquote>How do we limit what people can do, even to resource owners?</blockquote><ul><li><strong>Lack of a good practice to clean up resourc</strong>es!</li></ul><p>We tend to remove a whole Resource Group to clean up non-needed resources or use tags to select the right ones (It happens that resources are not adequately tagged!). This could be an option, but things get more complex quickly! <em>Is there any better way?</em></p><blockquote>As we expect from the blog post’s title, the solution is Azure Deployment Stacks…</blockquote><p>In a nutshell, Azure Deployment Stacks is a grouping capability that simplifies the lifecycle management of a set of resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QJh_QcP28ACMoeUy" /><figcaption>Illustration of Azure Deployment Stacks [Dall-E]</figcaption></figure><h3>Azure Deployment Stacks!</h3><p>Azure Deployment Stacks is a feature of <strong>Azure Resource Manager (ARM)</strong>.<strong> </strong>It aims to group linked resources into a single logical unit (<em>a cohesive unit</em>) for deployment, lifecycle, and dependencies management.</p><blockquote>The goal is to simplify complex deployments using repeatable, consistent, and reliable processes.</blockquote><p>This new capability is handy for managing complex environments with interdependent services, like multi-tier applications, data lakes, or networking setups; It doesn’t matter if such resources could be in a shared subscription and/or multiple Resource Groups.</p><p>Out of the Box, Deployment Stacks enables the following capabilities:</p><ul><li>We can <strong>manage resources as a group</strong>, making performing updates, rollbacks, and scaling operations easier. (Less operations to deploy/update/cleanup resources)</li><li>We can<strong> define the life-cycle operations</strong> on the stack that will be created!</li><li>Deleting the stacks<strong> leads to deleting all related resources</strong>, even if the deployment is spanned to multiple Resource Groups, which is excellent!</li><li>Guardrails to <strong>prevent</strong> resources managed by the stack from being removed or altered. (known as Deny Settings)</li></ul><blockquote>The key is that resources within a particular stack should share a <strong>common </strong>lifecycle!</blockquote><p>Microsoft Learn provides the opportunity to experience Deployment Stacks:</p><p><a href="https://learn.microsoft.com/en-us/training/modules/introduction-to-deployment-stacks/">Introduction to deployment stacks - Training</a></p><h3>Deployment Stacks Concepts</h3><p>Some concepts to share about deployments stacks, and which we should know about are:</p><ul><li><strong>Managed resources</strong>: When creating a deployment stack (e.g., via bicep), the stack manages the resources described in the config file. Those Resources are known as <em>managed resources</em>.</li><li><strong>Deny settings</strong>: Deny modes can be enforced over a collection of resources (stack) as an extra security layer to protect resources from unwanted change with either ‘<em>deny delete</em>’ or ‘<em>deny write and delete</em>’, which may sound similar to Azure locks. (Settings enforced supersedes any RBAC assignments or locks in place!)</li></ul><h3>Wrapping Up</h3><p>It is crucial to properly design the stack before deployment, as it could manage resources created under the same umbrella, meaning the same or child targets. The Deployment stack could span resources under multiple management groups, subscriptions, or resource groups.</p><blockquote>The deployment stack should only consist of resources with a certain commonality, and we want them to share a lifecycle. If not, they should be defined in separate stacks!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d17e16bb805" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/azure-deployment-stacks-8d17e16bb805">IaC with Azure Deployment Stacks!</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Security — Chaos Loves You — Litmus Chaos]]></title>
            <link>https://medium.com/uleap/kubernetes-security-chaos-loves-you-litmus-chaos-5df780e3890a?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/5df780e3890a</guid>
            <category><![CDATA[chaos-engineering]]></category>
            <category><![CDATA[sec]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[litmus]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 17:38:57 GMT</pubDate>
            <atom:updated>2024-09-30T17:38:57.555Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes Security — Chaos Loves You — Litmus Chaos</h3><blockquote><strong>[Litmus </strong>is a dye obtained from certain lichens that is red under acid conditions and blue under alkaline conditions.][<a href="https://languages.oup.com/google-dictionary-en/">Oxford Languages</a>]</blockquote><p>Chaos aims to tackle systemic uncertainty in distributed systems, giving organizations the peace of mind they deserve. Its principles provide confidence in existing systems and push towards innovations at massive scales.</p><p>Chaos Engineering has grown massively as a technology, and its community adoption has gone viral. But what is it about? Any added values behind a Chaos? …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJxTlkJwmkr9FhruuJbZ3Q.png" /><figcaption>Chaos Engineering imagined by ChatGPT</figcaption></figure><p>Our today’s agenda is:</p><pre># Summary<br>1. Chaos Engineering<br>    - Methodology<br>    - Framework<br>2. Litmus - Experimentation</pre><h3>Chaos Engineering</h3><h4><strong>Chaos Engineering — Methodology</strong></h4><p>Chaos Engineering is a <strong>methodology </strong>that aims to help developers get consistent service reliability by hardening against failures that might happen in critical environments. Basically, it is a <strong>technique </strong>that helps prevent any particular outages or major incidents from significantly impacting Production and thus building a higher platform resiliency.</p><blockquote>Chaos is not just randomly causing failure!</blockquote><blockquote>It is a Structured, Controlled Chaos!</blockquote><h4>Chaos Engineering — Framework</h4><p>A chaos engineering framework is a set of tools and practices designed to test systems&#39; resilience by intentionally introducing failures and observing how the system responds.</p><p>Popular chaos engineering frameworks available today include Chaos Monkey, developed by Netflix, Litmus Chaos, and many others.</p><p>These frameworks enable teams to proactively address potential issues, leading to more reliable and resilient systems.</p><h4>Litmus</h4><p>Litmus has been recognized as an incubating project in the Cloud Native Computing Foundation (CNCF) since 2020 and is backed by a large community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YTY2tR6Bfn3WipABHp1dkw.png" /><figcaption>Litmus — a CNCF Incubating Project</figcaption></figure><h3>Litmus — Experimentation</h3><p>Litmus is a Cloud-Native Engineering framework that defines a chaos plan/intent in a declarative reproducible way via Kubernetes Custom Resources. It is designed to help SREs identify weaknesses in their workloads through periodic executions of chaos experiments.</p><blockquote>Proactively Identifying/Fixing the weaknesses leads to increased system resiliency.</blockquote><p>Litmus is defined in several CRDs as described in the schema below and includes the following components:</p><ul><li><em>ChaosEngine</em>: A resource to link a Kubernetes application or Kubernetes node to a ChaosExperiment. ChaosEngine is watched by Litmus’ Chaos-Operator, which then invokes Chaos Experiments.</li><li><em>ChaosExperiment</em>: A resource to group the configuration parameters of a chaos experiment. ChaosExperiment CRs are created by the operator when ChaosEngine invokes Experiments.</li><li><em>ChaosResult</em>: A resource to hold the results of a chaos experiment. The Chaos-exporter reads the results and exports the metrics into a configured Prometheus server.</li></ul><h4>Litmus — Operator deployment</h4><p>Several methods of deploying Litmus exist. Today’s article will focus on a persistent deployment through Helm Package Manager.</p><p>We’ll rely on the latest version of <a href="https://artifacthub.io/packages/olm/community-operators/litmuschaos">Litmus Operator from Artifacthub.io</a>.</p><p><strong>a. Prerequisites</strong></p><p>The experiment requires a Persistent Volume of at least 20GB, defined as:</p><pre>kind: PersistentVolume<br>apiVersion: v1<br>metadata:<br>  name: pv0001<br>  labels:<br>    type: local<br>spec:<br>  capacity:<br>    storage: 20Gi<br>  accessModes:<br>    - ReadWriteOnce<br>  hostPath:<br>    path: &quot;/tmp/data01&quot;</pre><blockquote>Create a file called litmus-pv.yaml and paste the above content to it. Then, create the PV using the above definition :</blockquote><pre>kubectl create -f litmus-pv.yaml</pre><p><strong>b. Install/configure Litmus (Helm)</strong></p><p>First, ensure that the Helm package manager is well installed/configured.</p><pre>helm version</pre><p>Should you have basic deployment, the installation is then straightforward. We’ll stick to defaults for the sake of simplicity.</p><p>Let’s add the helm repo for Litmus:</p><pre># Add the litmus helm repository:<br>helm repo add limuschaos https://litmuschaos.github.io/litmus-helm<br># Check whether litmus repo is properly added:<br>helm repo list</pre><p>And then start the deployment:</p><pre>helm install chaos litmuschaos/litmus \<br>   --namespace litmus \<br>   --create-namespace \</pre><p>The operation could take a while to complete. We can move to the next steps if everything goes well.</p><h4>Litmus — Experimentation</h4><p>First, we should identify an application as a target. Let’s run a Pod with the SuperMario game and use it as a target.</p><pre>kubectl create deploy mario --image=pengbai/docker-supermario<br>kubectl get deploy,pods --show-labels<br># Verify the installation progress<br>watch -n1 kubectl get pods,svc -n litmus</pre><p>Litmus offers a basic dashboard that can be accessed using the default credentials (Username:admin / Password:litmus ).</p><p><strong>Identify the Litmus Dashboard exposed IP:</strong></p><p>Following these steps will allow you to get the exposed IP for the Litmus Dashboard and access it through your web browser.</p><p>Retrieve the Litmus service details to find the exposed IP and TCP Port with the following command:</p><pre>//Get the Service Details<br>kubectl get svc -n litmus</pre><p>If using NodePort, use the IP of any node in your cluster along with the specified node port.</p><pre>//Access the Litmus Dashboard<br>http://&lt;node-ip&gt;:30000</pre><blockquote>If using LoadBalancer, the external IP will be listed in the output of the above kubectl command.</blockquote><blockquote>You’re now ready to initiate and observe the experiments!</blockquote><h3><strong>Conclusion</strong></h3><p>It’s highly recommended to start using Chaos engineering on things where you have the highest maturity. Teams should already have great observability around to be sure that when causing a controlling disaster they can see that within the collected data and from there perform additional analysis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5df780e3890a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/kubernetes-security-chaos-loves-you-litmus-chaos-5df780e3890a">Kubernetes Security — Chaos Loves You — Litmus Chaos</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Data Lake Storage — ACLs for enhanced security]]></title>
            <link>https://medium.com/uleap/azure-data-lake-storage-acls-for-enhanced-security-1e8fdfca8209?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e8fdfca8209</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[acl]]></category>
            <category><![CDATA[data-lake]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Mon, 19 Aug 2024 10:12:46 GMT</pubDate>
            <atom:updated>2024-10-14T16:11:46.710Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure Data Lake Storage — ACLs for enhanced security</h3><blockquote>Access Control Lists (ACLs) in ADLS provide fine-grained, scalable security for managing data access, completing RBACs, and enhancing permissions controls at the directory and file level.</blockquote><p>Managing access to large datasets is a critical concern in today’s data-driven world. With data lakes becoming the backbone of many big data solutions, ensuring the right people have access is paramount. Azure Data Lake Storage (ADLS), a powerful data storage solution, enforces security with an additional mechanism through Access Control Lists (ACLs).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RMqRPdiI0bxuBdrW" /></figure><p>In this post, we’ll scour what ACLs are, the challenges they address, and how to effectively manage them in Azure Data Lake Storage using AzCLI.</p><h3>Data Lake Access Management — Challenges</h3><p>Data lakes, by design, are vast repositories stowing vast portions of structured and unstructured data at any scale. While their flexibility and scalability are practical, they also pose noteworthy challenges when it comes to access control:</p><ul><li><strong>Limits of Azure RBAC</strong>: It is not possible to use RBACs to allow/deny access to a specific file/directory in a Blob Container (<em>aka. File System in a Data Lake context</em>)</li><li><strong>Complex Permissions:</strong> Handling permissions across millions of files for many users can be overwhelming.</li><li><strong>Granular Access Requirements:</strong> Teams often require access to specific datasets rather than others. For instance, Team A might need to process customer data but should not see internal financial records. Without proper controls, sensitive data can be inadvertently exposed.</li><li><strong>Dynamic Environments:</strong> Data lakes are dynamic, with data being ingested, processed, and modified constantly. Preserving consistent access controls becomes increasingly demanding as new data is added and existing data is updated.</li></ul><h3>How ACLs Address These Challenges</h3><p>Access Control Lists (ACLs) in Azure Data Lake Storage offer solutions to the above-described challenges by providing fine-grained access control over files and directories.</p><blockquote>Unlike traditional role-based access control (RBAC), which operates at a higher level, ACLs allows to arrange permissions at the directory and file level, giving precise control over who can access specific data.</blockquote><p>Here’s how ACLs can help:</p><ul><li><strong>Fine-Grained Control:</strong> ACLs set specific permissions for users or groups at the file and directory level.</li><li><strong>Inheritance:</strong> Permissions set at the directory level can be inherited by all subdirectories and files, simplifying the management of access controls as the data structure grows.</li><li><strong>Scalability:</strong> ACLs are designed to handle large-scale environments. One can efficiently manage permissions for thousands of users and services across massive datasets, ensuring access controls’ security and scalability.</li></ul><blockquote><strong>Note: </strong>While ACLs provide granular controls over an ADLS, however, they can not be used at the container level; container-level access control is managed through RBACs and shared access signatures (SAS).</blockquote><h3>Creating and Managing ACLs in ADLS</h3><p>Creating and managing ACLs in ADLS is a straightforward process, but it’s essential to understand:</p><ul><li>An ACL is a set of ACEs (Access Control Entries).</li><li>Each ACE is an association of a Blob Item to an Identity.</li><li>There are differences between creating a new ACL and updating an existing one.</li><li>ACLs are set independently on every object (file/directory) inside the Data Lake, so each object has its own set of ACLs.</li></ul><p>The above two points could make the management of ACLs a little bit more challenging than expected!</p><h4>Creating a New ACL</h4><p>Setting up an ACL on a file or directory defines who has access and at what level.</p><p>Here’s a how to create a new ACL via Azure CLI:</p><p><strong>Set ACLs using the </strong><strong>az storage fs access command:</strong></p><pre>az storage fs access set --acl &quot;user::rwx,group::r-x,other::---,user:&lt;user-oid&gt;:rwx,group:&lt;group-oid&gt;:r-x&quot; --path &lt;path-to-directory-or-file&gt; --account-name &lt;storage-account-name&gt; --file-system &lt;file-system-name&gt;</pre><p>The above command sets Read, Write, and eXecute permissions for the Owner, Read and eXecute for the Group, and no permissions for Others. Additionally, it grants specific permissions to other users or groups.</p><blockquote><strong>Verify ACL settings:</strong> After setting the ACLs, one can verify them using the get command to ensure accuracy.</blockquote><blockquote>ACLs are limited to 32 for each entity (File/Directory) in Data Lake, and which should be considered during design.</blockquote><h4>Updating an Existing ACL</h4><p>Updating an existing ACL involves modifying the permissions for users or groups that already have access or adding/removing permissions for new users or groups. The process is similar to creating a new ACL but focuses on adjusting existing settings:</p><ol><li><strong>Retrieve existing ACLs:</strong> Before making changes, it’s crucial to understand the current state of ACLs. Use the az storage fs access show command to list current ACLs.</li><li><strong>Modify ACLs:</strong> It is about adding, updating, or removing specific permissions by adjusting the ACL string. For example, to grant additional write permissions to a user:</li></ol><pre>az storage fs access update --acl &quot;user:&lt;user-oid&gt;:rw-&quot; --path &lt;path-to-directory-or-file&gt; --account-name &lt;storage-account-name&gt; --file-system &lt;file-system-name&gt;</pre><blockquote><strong>Propagate changes if necessary </strong>when willing to apply the permissions on all subdirectories and files.</blockquote><h4>Powershell in a nutshell!</h4><p>It is a quite different approach with PowerShell; You need a few more commands to update an existing ACL association.</p><ol><li>Init Variables:</li></ol><pre>$subscriptionId = &quot;GUID of the AzSubscription&quot;<br>$dataLakeStoreName = &quot;stinferencedevsw1&quot;<br>$fileSystemName = &quot;inference&quot;<br>$aclLevel = &quot;file&quot;<br>$itemPath = &quot;maindir/subdir/pic.png&quot;<br>$entraIdGroupId = &quot;GUID of the Entra ID Group&quot;<br>$aclPermissions = &quot;rw-&quot;<br><br>Set-AzAccount -Subscription $subscriptionId</pre><p>2. The processing script looks like the below:</p><pre>Write-Host &quot;Retrieve Context for DataLake &#39;$dataLakeStoreName&#39;&quot;<br>$dlContext= New-AzStorageContext -StorageAccountName $dataLakeStoreName -UseConnectedAccount<br><br>Write-Host &quot;Retrieve origin ACL for $aclLevel &#39;$itemPath&#39;&quot;<br>$itemObject = Get-AzDataLakeGen2Item -FileSystem $fileSystemName -Path $itemPath -Context $dlContext<br>$originAcl = $itemObject.ACL<br><br>Write-Host &quot;Update ACL for $aclLevel &#39;$itemPath&#39; (Permissions: $aclPermissions)&quot;<br>$updatedAcl = Set-AzDataLakeGen2ItemAclObject -AccessControlType group -EntityId $entraIdGroupId -Permission $aclPermissions -InputObject $originAcl<br>Update-AzDataLakeGen2Item -FileSystem $fileSystemName -Path $itemPath -ACL $updatedAcl -Context $dlContext</pre><h3>Conclusion</h3><p>Azure Data Lake Storage, with its ACL functionality, offers robust, granular control over data access. By effectively managing ACLs, one can address the complex challenges of securing and organizing a data lake, ensuring the organization’s data remains protected and accessible to the right users.</p><p>Whether setting up ACLs for the first time or managing an existing environment, understanding how to create and update ACLs is key to maintaining a secure and efficient data lake. With these tools, one can confidently streamline access management and safeguard valuable data assets.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e8fdfca8209" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/azure-data-lake-storage-acls-for-enhanced-security-1e8fdfca8209">Azure Data Lake Storage — ACLs for enhanced security</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microsoft Fabric — A different Posture! — Part 1]]></title>
            <link>https://medium.com/uleap/part-1-microsoft-fabric-a-different-posture-b106305fff9a?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/b106305fff9a</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[fabric]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Mon, 29 Jul 2024 05:55:08 GMT</pubDate>
            <atom:updated>2024-07-29T06:05:32.789Z</atom:updated>
            <content:encoded><![CDATA[<h3>Microsoft Fabric — A different Posture! — Part 1</h3><blockquote>Azure’s data analytics approach is drifting from PaaS to SaaS: In a two-minute reading, what is this about? and what challenges does this offering resolve?</blockquote><p>Over the last decade, Microsoft has invested in several unique PaaS offerings for data analytics, but unfortunately, they have not shared the same experience. This led to integration challenges, huge cognitive loads for data teams, and high data governance and security costs. Thus, Microsoft’s idea of a simple solution — a SaaS offering that has it all — just like Microsoft 365 — is unexpected for data analytics, but it is true and stunning!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*QRnuzkBQjHfnJ10rqWU1TQ@2x.jpeg" /><figcaption>Microsoft Fabric in an image generated by Dall-E</figcaption></figure><p>Microsoft Fabric is the SaaS offering we are talking about today. It is the single pane of glass for a wide platform that focuses on only one experience, one storage, and one billing model for an end-to-end data analytics solution, yet with a diverse range of data services harnessing the power of organizations’ data.</p><blockquote>Do not confuse Microsoft Fabric (Data Analytics) with Azure Service Fabric (microservices — related)! A big thanks to Microsoft for such confusing naming!!</blockquote><h3>Known challenges</h3><p>Today’s Azure Data Analytics portfolio relies on several and a complete set of Azure PaaS services that each cover a piece of it. Still, having a working set is usually painful as it requires a massive effort to handle and manage all data warehouses and data lakes while enforcing the best security/compliance practices and integrations for every platform. And as you would imagine, that’s a huge problem!</p><blockquote>We usually end up with silos and unavoidable transformations of data!</blockquote><p>And this is where Microsoft Fabric comes into play!</p><h3>Microsoft Fabric – A new generation!</h3><p>Microsoft Fabric could be thought of as the 3rd generation of Microsoft Data Platforms where:</p><ul><li>The 1st generation contains but is not limited to, ‘HD Insights’ and ‘SQL Data Warehouse’, all relatively isolated technologies of traditional data products.</li><li>The 2nd gen was Synapse, which integrated Platforms at the UX level but still felt slightly disjointed at the data level.</li><li>And now we have the 3rd gen, Microsoft Fabric, which builds on the Synapse unification vision but concentrates primarily on enabling deep data-level interoperability.</li></ul><p>The noteworthy shift with Microsoft Fabric is <strong>SaaS </strong>rather than <strong>PaaS</strong>. This carries a more opinionated view on how modern data platforms should take shape and enables a further shift toward data democratization.</p><p>Microsoft Fabric, at a high level, is one SaaS per EntraID tenant, which entitles a single OneLake to manage the storage for all data and a single point to process, govern, and secure this data. Fabric also tries to reduce costly data copies, which usually and quickly leads to a drift in those data.</p><h3>Conclusion</h3><p>Microsoft drastically reduced its efforts to update/maintain the Azure Synapse analytics platform and encouraged its customers to move to Fabric, just as they did with Synapse! (What could be the next surprise?)</p><blockquote>Is this new SaaS offering the right approach to reduce the pain of PaaS integration efforts?</blockquote><blockquote>Please do not hesitate to share your valuable feedback and experience.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b106305fff9a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/part-1-microsoft-fabric-a-different-posture-b106305fff9a">Microsoft Fabric — A different Posture! — Part 1</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Application Security Groups — The Bicep!]]></title>
            <link>https://medium.com/uleap/azure-application-security-groups-the-bicep-66d118efd447?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/66d118efd447</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Wed, 17 Jul 2024 09:53:52 GMT</pubDate>
            <atom:updated>2024-07-17T12:01:20.375Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure Application Security Groups — The Bicep!</h3><p>As we steer through the design, implementation, and security hardening of an Azure network infrastructure, we often confront challenges due to the massive number of security control choices available for each of the Azure Services / Resources.</p><p>Our focus today is on network security and, more precisely, seeking to simplify it through application security groups (ASGs).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*P810pMhfZ0zDM8CMKSwCmA.png" /><figcaption>Azure Bicep — Application Security Groups [Image generated by Dall-E]</figcaption></figure><h3>What are ASGs?</h3><p>Understanding Application Security Groups is straightforward. They allow us to define network traffic for servers that fit specific resource types, simplifying network management.</p><p>Rather than segregating different servers into different subnets based on their type, we can put them in the same subnet and segregate them by their Application Security Group. Thus, it is easier to manage security policies collectively.</p><p>For additional details regarding ASG, please refer to an earlier post:</p><p><a href="https://medium.com/uleap/azure-application-security-groups-in-a-nutshell-df64ad4f28b9">Azure Application Security Groups – In a nutshell</a></p><h3>Unleashing the Power of ASGs with Bicep</h3><p>By harnessing the power of Infrastructure-as-Code, we can implement robust network security controls using Application Security Groups with Private Endpoints. This approach not only simplifies network security management but also enhances its effectiveness, giving you greater control and confidence in your network security controls.</p><h4>Recommendation — Naming Convention</h4><p>Before we delve deeper into ASGs with Bicep, we should consider sooner conforming to a standard for the naming convention, even for temporary resources, including proper tagging.</p><blockquote><em>Please refer to the </em><a href="https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations#networking"><em>Microsoft Azure naming conventions &amp; recommendations</em></a><em> to set proper naming for Azure resources:</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q5Lz_E83tG__2uTsbSe00A.png" /><figcaption>㊙ Microsoft Azure — Naming Convention</figcaption></figure><p>In this article, we are considering the following naming convention/standard:</p><pre># Naming Convention:<br>&lt;prefix:3&gt;-&lt;purpose:&gt;-&lt;environment:3&gt;-&lt;shortRegion:3&gt;-&lt;index:3&gt;<br># e.g. asg-backend-dev-we-001<br><br># Fields details:<br>- Prefix:3<br>  &gt; We better set the prefix to &#39;asg&#39;, based on Microsoft naming.<br>- Purpose:<br>  &gt; This is the purpose of the ASG.<br>- Environment:3<br>  &gt; DTAP Environment<br>- ShortRegion:3<br>  &gt; Target region for the ASG. (&#39;frc&#39; for France Central, &#39;we&#39; for West Europe, etc).<br>- ResourceIndex:3</pre><p>We will leverage Bicep as Infrastructure-as-Code to implement organizational network security controls using Application Security Groups with Private Endpoints.</p><h4>Infra As Code — Bicep Approach</h4><p>To be able to proceed and follow with the next steps, I recommend having the below prerequisites:</p><pre>- An active Azure Subscription<br>- Bicep binary (Local or via Azure CloudShell)<br>- Azure PowerShell or Azure CLI (Local or via Azure CloudShell)<br>- A Resource Group already provisioned.<br>- Least-privileges to deploy/destroy resources in a Resource Group.</pre><blockquote><em>Well settled!? Let’s do it!</em></blockquote><p>As briefly mentioned earlier, we are authoring a Bicep template that creates an ASG.</p><p><strong>FOUR easy</strong> steps to follow for a well-written Bicep code:</p><ul><li><strong>Step 1</strong>: Use bicep decorators for Parameters/Input validation and description, as shown below (Even for Outputs)</li></ul><pre>@description(&#39;Required. ASG Purpose. The length must not exceed 64 characters)<br>@maxLength(64)<br>param applicationSecurityGroupPurpose<br><br>@description(&#39;Optiona. Location for resources.&#39;)<br>param location = resourceGroup().location</pre><ul><li><strong>Step 2: </strong>When required, use a variable. The below example is used mainly for formatting purposes (conditions could be applied on variables, too)</li></ul><pre>// Format the ASG Name (Max length is 15 characters)<br>var applicationSecurityGroupName = ‘asg-${applicationSecurityGroupPurpose}’<br>..</pre><ul><li><strong>Step 3:</strong> Implement resource definition for ASG deployment:</li></ul><pre>resource applicationSecurityGroup &#39;Microsoft.Network/applicationSecurityGroups@2023-11-01&#39; = {<br>  name: applicationSecurityGroupName<br>  location: location<br>  tags: tags<br>}</pre><ul><li><strong>Step 4: </strong>Provide sufficient output for further usage (Modules).</li></ul><pre>@description(&#39;The resource ID of the application security group.&#39;)<br>output applicationSecurityGroupId string = applicationSecurityGroup.id<br><br>@description(&#39;The name of the application security group.&#39;)<br>output applicationSecurityGroupName string = applicationSecurityGroup.name</pre><p>The final Bicep Configuration file should be like this:</p><pre>@description(‘Required. ASG Purpose. The length must not exceed 64 characters)<br>@maxLength(64)<br>param applicationSecurityGroupPurpose<br><br>@description(&#39;Optiona. Location for resources.&#39;)<br>param location = resourceGroup().location<br><br>resource applicationSecurityGroup &#39;Microsoft.Network/applicationSecurityGroups@2023-11-01&#39; = {<br>  name: applicationSecurityGroupName<br>  location: location<br>  tags: tags<br>}<br><br>@description(&#39;The resource ID of the application security group.&#39;)<br>output applicationSecurityGroupId string = applicationSecurityGroup.id<br><br>@description(&#39;The name of the application security group.&#39;)<br>output applicationSecurityGroupName string = applicationSecurityGroup.name</pre><h4>Infra As Code — Deploy ASG with Bicep</h4><p>The last step is <strong>to </strong>trigger the deployment of the ASG using Bicep:</p><pre>$deploymentGenName = &quot;ASAAppSecGroupDeployment-((Get-Date).ToUniversalTime()).ToString(&#39;MMdd-HHmmssffff&#39;)&quot;<br><br># From an Azure DevOps pipeline use:<br># $deploymentGenName = &quot;ASAAppSecGroupDeployment-$(Build.BuildID)&quot;<br><br>New-AzResourceGroupDeployment -Name $deploymentGenName -c `<br>  -ResourceGroupName rg-xyz `<br>  -TemplateFile ./main.bicep `<br>  -TemplateParameterFile ./default.parameters.json</pre><h4>Bicep/Azure Verified Modules</h4><blockquote>The Azure community created an <strong>initiative</strong> trying to consolidate and set standards for what a good Infra-as-Code module should look like, the so-called ‘<a href="https://azure.github.io/Azure-Verified-Modules/">Azure Verified Modules</a>’, which I recommend checking further.</blockquote><p><a href="https://azure.github.io/Azure-Verified-Modules/">Azure Verified Modules | AVM</a></p><h4>Associate ASG with Private Endpoint</h4><p>To associate an Application Security Group with a Private Endpoint, we simply run the Set-AzPrivateEndpoint PowerShell command:</p><pre><br>$resourceGroupName = &#39;rg-backend-dev-we-001&#39;<br>$privateEndpointName = &#39;pep-backend-dev-we-001&#39;<br>$applicationSecurityGroupName = &#39;asg-backend-dev-we-001&#39;<br><br>Write-Host &quot;##[command]Retrieving ASG &#39;$applicationSecurityGroupName&#39;&quot;<br>$privateEndpointObject = Get-AzPrivateEndpoint -ResourceGroupName $resourceGroupName-Name $privateEndpointName<br><br>Write-Host &quot;##[command]Associating the asg &#39;$applicationSecurityGroup&#39; with private endpoint &#39;$($privateEndpointObject.Name)&#39;&quot;<br>$privateEndpointObject.ApplicationSecurityGroups = $applicationSecurityGroupObject<br>$privateEndpointObject | Set-AzPrivateEndpoint</pre><h3>To Conlude!</h3><p>As described above, Azure Application Security Groups (ASG) offer several benefits. However, they also introduce considerable drawbacks. One is that ASGs can be assigned to network resources of a single Virtual Network and can not be used across different regions. Furthermore, ASGs do not provide granular control over outbound traffic from Azure Resources.</p><blockquote>These limitations should be considered when designing a network security strategy in Azure or implementing IaC.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66d118efd447" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/azure-application-security-groups-the-bicep-66d118efd447">Azure Application Security Groups — The Bicep!</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Application Security Groups — In a nutshell]]></title>
            <link>https://medium.com/uleap/azure-application-security-groups-in-a-nutshell-df64ad4f28b9?source=rss-e85d7754a986------2</link>
            <guid isPermaLink="false">https://medium.com/p/df64ad4f28b9</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Aymen Abdelwahed]]></dc:creator>
            <pubDate>Wed, 17 Jul 2024 09:40:11 GMT</pubDate>
            <atom:updated>2024-08-07T13:40:11.524Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure Application Security Groups — In a nutshell</h3><p>You are probably familiar with network security groups (aka. NSGs), but you also realize their limitations and challenges in managing several. Application security groups (ASGs) could be the right answer for your network security management issues. But, …</p><blockquote>What are they? and how to create one.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*MLZuOl_KNegkoAf6aIStBw@2x.jpeg" /><figcaption>Imagined and generated by Dall-E</figcaption></figure><blockquote>To understand the key concepts of Application Security Groups, we better start with a quick recap of what the NSGs are and their limitations.</blockquote><h3>Network Security Groups (NSG)</h3><p>NSG is a basic virtual firewall that offers network security controls over Azure Resources (e.g. Virtual Machines, Subnets). One of the features of NSGs is that you can assign them at the Subnet or Network Interface level of an Azure Resource. The same NSG can be assigned to multiple resources (usually resources offering the same Service, e.g., Web Servers).</p><h4>NSGs Limitations</h4><p>It could become challenging to provide/maintain fine-grained controls on the traffic hitting one or a specific set of Azure resources. The common solutions we tend to use are, and are not limited to, the following:</p><ul><li>Assign multiple NSGs to the same NIC &gt; Unfortunately, this makes it harder to troubleshoot traffic when a problem occurs.</li><li>Assigning NSGs on the subnet level while assuming all resources on that subnet offer the same service and require the same level of security controls. Still, this is not really the perfect solution.</li></ul><blockquote>How do we overcome such limitations?</blockquote><h3>Application Security Groups</h3><p>To tackle such limitations, Microsoft has created the concept of Application Security Groups (ASG).</p><p>Early in 2018, Microsoft launched the public preview for Application Security Groups, short for ASG, in all Azure Regions. (<a href="https://azure.microsoft.com/en-us/updates/public-preview-for-asg/">Public preview: Application security groups in all regions | Azure updates | Microsoft Azure</a>).</p><p>ASGs are best thought of as labels or groupings where we can combine resources based on the service or application that runs on top of them.</p><blockquote>Easy to use and handy as they offer more flexibility in defining our networks.</blockquote><p>In other words, they enable a seamless grouping of Azure resources (VMs, PEs, NICs, etc) and simplify the implementation of network security policies by allowing the definition of fine-grained network security controls without the need to worry about IP addresses.</p><blockquote>We can create a single Network Security Group for a specific Subnet, which can be used as a single pane of glass to view all the policies we’ve applied and thus better control all accesses using several Application Security Groups. We can allow traffic sources and destinations using ASGs within that single NSG.</blockquote><h3>To Conclude!</h3><p>ASGs streamline the process of securing complex applications and make it easier to maintain and update security rules as application landscapes evolve.</p><p>In our next blog post, we will explore deploying ASGs using Bicep and offer a better way to manage infrastructure as code. Stay tuned!</p><p><a href="https://medium.com/uleap/azure-application-security-groups-the-bicep-66d118efd447">Azure Application Security Groups — The Bicep!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df64ad4f28b9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uleap/azure-application-security-groups-in-a-nutshell-df64ad4f28b9">Azure Application Security Groups — In a nutshell</a> was originally published in <a href="https://medium.com/uleap">ULEAP B.V.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>