<?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 Sameesh Bedi on Medium]]></title>
        <description><![CDATA[Stories by Sameesh Bedi on Medium]]></description>
        <link>https://medium.com/@sameeshbedi?source=rss-2377639a80be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wzKb6LBmLYoYeRtYy_3Sbw.jpeg</url>
            <title>Stories by Sameesh Bedi on Medium</title>
            <link>https://medium.com/@sameeshbedi?source=rss-2377639a80be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:19:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sameeshbedi/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[The Art of Less: A Strategic Approach to IAM Least Privilege]]></title>
            <link>https://medium.com/@sameeshbedi/the-art-of-less-iam-least-privilege-principles-in-the-cloud-22f5c76c1094?source=rss-2377639a80be------2</link>
            <guid isPermaLink="false">https://medium.com/p/22f5c76c1094</guid>
            <category><![CDATA[least-privilege-security]]></category>
            <category><![CDATA[cloud-auditing]]></category>
            <category><![CDATA[aws-iam-best-practices]]></category>
            <category><![CDATA[aws-iam]]></category>
            <category><![CDATA[aws-iam-security]]></category>
            <dc:creator><![CDATA[Sameesh Bedi]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 11:15:20 GMT</pubDate>
            <atom:updated>2026-03-16T22:30:29.441Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Beyond the documentation — Why identity security is more than just a policy — it’s a design philosophy.</em></p><p>📖 Reading time: 4 minutes</p><h3><strong>Introduction</strong></h3><p>Cloud security starts with Identity and Access Management (IAM). Think of IAM controls as the security guards of a building; their job is to prevent incidents before they happen. In cybersecurity, risk is the combination of probability and impact. Strong IAM controls significantly lower the probability of an incident. This is especially critical in the cloud, where technical risks are often only “one click” away. In this environment, <strong>preventative controls</strong> are always superior to detective or mitigating ones.</p><p>We all know the definition: <strong>Principle of Least Privilege (PoLP)</strong> means granting only the permissions required to perform a task. It sounds simple, but in a fast-paced environment of ad-hoc requirements and emergency changes, PoLP is usually the first thing to get tossed overboard.</p><p>Applying least privilege is more of an art than a science. While there is no “magic alert” for when a policy is slightly too broad, we can use specific design principles to keep our environment from derailing.</p><h3><strong>1. Principle 1: The “Trifecta” of Secure Cloud Access</strong></h3><p>To lay a foundation for least privilege, you must understand the interplay between three distinct layers of control. I call this the <strong>IAM Trifecta</strong>:</p><ul><li><strong>Service Control Policies (SCPs):</strong> Defines <strong>“What”</strong> can be accessed at the account level.</li><li><strong>Permission Boundaries:</strong> Defines <strong>“How much”</strong> a user or role can potentially have.</li><li><strong>Identity-Based Policies:</strong> Defines <strong>“Who”</strong> can access a specific resource.</li></ul><p>An effective least privilege posture is the intersection of these three. Before writing a single line of JSON, you must carefully determine the <em>What</em>, the <em>How Much</em>, and the <em>Who</em>. This combination creates a “fail-safe” zone where even if one layer is misconfigured, the others act as a safety net.</p><p><strong>Scenario: The Administrative Guardrail</strong></p><p>Imagine a Cloud Engineer needs to manage S3 buckets, but you must ensure they can never delete <strong>Audit Logs</strong> or grant themselves <strong>Full Administrator</strong> rights.</p><ol><li><strong>The SCP:</strong> A policy at the Organization level denies s3:DeleteBucket on any bucket named audit-logs-*. Even if the engineer has admin rights, the cloud provider blocks this action.</li><li><strong>The Permission Boundary:</strong> You attach a boundary to the engineer’s role that allows S3 and EC2 but <strong>excludes </strong>IAM. If the engineer tries to attach an AdministratorAccess policy to themselves, the boundary “clips” those permissions. They cannot escalate their own power.</li><li><strong>The Identity-Based Policy:</strong> You grant s3:PutObject and s3:ListBucket. This is their actual workspace.</li></ol><p><strong>The Result:</strong> The engineer has the tools to work, but the organization is protected from accidental data loss (via SCP) and privilege escalation (via Boundary).</p><h3><strong>2. Principle 2: Reducing the Attack Surface</strong></h3><p>Reducing the attack surface means defining the minimum footprint required to meet business goals. When we combine this with PoLP, the picture becomes clear.</p><p>In the cloud, identity is the new perimeter, but network context provides a vital second layer of defense. To be truly secure, you shouldn’t just rely on an IAM policy. To truly shrink the attack surface, you can ensure that <strong>only a specific IAM Role</strong>, originating from a <strong>specific VPC</strong>, can reach the bucket. This prevents “credential portability” — where a set of leaked keys are used from an unauthorized external location. You should implement a layered defense:</p><ol><li><strong>IAM Policy:</strong> Grant permissions to the user/role.</li><li><strong>VPC Endpoint Policy:</strong> Ensure the traffic stays within your private network.</li><li><strong>Bucket Policy:</strong> Restrict access specifically to that VPC Endpoint.</li></ol><p><strong>Example Bucket Policy Snippet:</strong></p><p>This policy denies access to everyone <em>except</em> when the requester is using a specific role AND coming through your private VPC endpoint.</p><pre>{<br>    &quot;Version&quot;: &quot;2025-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;RestrictToSpecificRoleAndVPCE&quot;,<br>            &quot;Effect&quot;: &quot;Deny&quot;,<br>            &quot;Principal&quot;: &quot;*&quot;,<br>            &quot;Action&quot;: &quot;s3:*&quot;,<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:s3:::my-sensitive-data&quot;,<br>                &quot;arn:aws:s3:::my-sensitive-data/*&quot;<br>            ],<br>            &quot;Condition&quot;: {<br>                &quot;ArnNotLike&quot;: {<br>                    &quot;aws:PrincipalArn&quot;: &quot;arn:aws:iam::123456789012:role/DataAnalystRole&quot;<br>                },<br>                &quot;StringNotEquals&quot;: {<br>                    &quot;aws:sourceVpce&quot;: &quot;vpce-12345678&quot;<br>                }<br>            }<br>        }<br>    ]<br>}</pre><p><strong>Pro-Tip:</strong> Take it a step further by using <strong>S3 Access Points</strong>. Instead of managing one massive, complex bucket policy, create unique access points for different departments or business units.</p><h3><strong>3. Principle 3: Moving Toward Ephemeral Access</strong></h3><p>A critical design choice is opting for <strong>temporary (ephemeral) access</strong> over permanent authorization whenever possible.</p><p>Resource-based policies (like bucket policies) often grant permanent authorization. In contrast, <strong>IAM Role sessions </strong>provide temporary permissions for a specific task. By utilizing session-based access for specific tasks, you ensure that even if a credential is compromised, the window of opportunity for an attacker is strictly limited.</p><p><strong>Scenario: Break-glass Access</strong></p><p>An engineer needs to fix a production database at 2:00 AM. Instead of giving their user account permanent DBAdminrights, they “assume” a specific IAM Role via your SSO provider with a <strong>Session Duration</strong> of 1 hour. Once the task is finished, the credentials expire automatically.</p><h3><strong>4. Principle 4: The Inversion Principle (NotAction &amp; Exact Matching)</strong></h3><p>How you define policies and leverage wildcards determines how well you stick to PoLP long-term. This principle relies on two logic techniques: <strong>NotAction</strong> and <strong>Exact Matching</strong>.</p><p><strong>The “NotAction” Strategy (The Safety Net)</strong></p><p>Instead of trying to list every “Allow” action (which is a moving target as AWS adds features), use a <strong>Deny</strong> with a <strong>NotAction</strong>. This effectively “whitelists” only the safe actions and blocks everything else — including future services you haven’t even thought of yet.</p><p><strong>Scenario: The Safe-List Auditor</strong></p><p>You want an auditing tool to be able to describe resources <strong>but never modify them.</strong></p><pre>{<br>    &quot;Version&quot;: &quot;2026-02-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Deny&quot;,<br>            &quot;Sid&quot;: &quot;ReadOnlyGuardrail&quot;,<br>            &quot;NotAction&quot;: [<br>                &quot;iam:Get*&quot;,<br>                &quot;iam:List*&quot;,<br>                &quot;s3:Get*&quot;,<br>                &quot;s3:List*&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        }<br>    ]<br>}</pre><p>This creates a “Read-Only Sandbox.” Anything that isn’t a Get or List is automatically blocked. If a cloud provider releases a new “Delete” API tomorrow, your policy already denies it by default.</p><p><strong>Exact vs. Partial Matching</strong></p><p>Many breaches occur because of “Wildcard Fatigue.” Using Resource: “*” or Action: “s3:Get*” can accidentally grant access to more than intended.</p><ul><li><strong>Avoid Partial Matching:</strong> Instead of arn:aws:s3:::production-data* (which might match production-data-backups), use the exact ARN.</li><li><strong>Enforce Strict Conditions:</strong> Use StringEquals instead of StringLike to ensure zero ambiguity.</li></ul><p><strong>Example: Strict Resource Matching</strong></p><pre>{<br>    &quot;Effect&quot;: &quot;Allow&quot;,<br>    &quot;Action&quot;: &quot;s3:GetObject&quot;,<br>    &quot;Resource&quot;: &quot;arn:aws:s3:::production-app-logs/app-v1/*&quot;,<br>    &quot;Condition&quot;: {<br>        &quot;StringEquals&quot;: {<br>            &quot;s3:ExistingObjectTag/Confidentiality&quot;: &quot;Internal&quot;<br>        }<br>    }<br>}</pre><p>The user can only see objects in one specific folder, and only if those objects are tagged exactly as “Internal.” This eliminates the risk of “access leakage” via naming overlaps.</p><h3><strong>Conclusion: Less is More</strong></h3><p>As tedious as these design decisions may seem, they allow you to stay the course inherently. In the world of IAM, <strong>less is definitely more.</strong> These are the strategies I use to keep cloud environments secure, but I’m curious — how are you handling “permission creep” in your organization? Let’s discuss in the comments!</p><p><em>The author is a cloud audit director with over a decade of experience in cloud security and risk governance in the financial services. Views expressed are personal.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22f5c76c1094" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>