<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AWS on Nicola Suter</title><link>https://nicolasuter.ch/tags/aws/</link><description>Recent content in AWS on Nicola Suter</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Nicola Suter</copyright><lastBuildDate>Thu, 12 Nov 2026 12:00:19 +0100</lastBuildDate><atom:link href="https://nicolasuter.ch/tags/aws/rss.xml" rel="self" type="application/rss+xml"/><item><title>Federated subject recycling continued: AWS edition</title><link>https://nicolasuter.ch/til/aws-iam-subject-recycling/</link><pubDate>Thu, 12 Nov 2026 12:00:19 +0100</pubDate><guid>https://nicolasuter.ch/til/aws-iam-subject-recycling/</guid><description>&lt;p&gt;Federated credentials reduce the risks of token exposure and leaked secrets, but they can leave dangling trust relationships too. In my &lt;a href="https://nicolasuter.ch/til/entra-federated-credentials-subject-recycling/" &gt;previous post&lt;/a&gt;, I covered subject recycling in Microsoft Entra ID: how to find GitHub Actions and GitLab trusts that rely on mutable subjects and how to switch to immutable identifiers.&lt;/p&gt;&#10;&lt;p&gt;This time, I&amp;rsquo;m looking at AWS IAM role trust policies. The question is the same: does the trust rely on an immutable identifier or a name that could be recycled?&lt;/p&gt;&#10;&lt;p&gt;As a quick recap, here&amp;rsquo;s how mutable and immutable subjects differ:&lt;/p&gt;&#10;&lt;p&gt;GitLab example:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-diff" data-lang="diff"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gd"&gt;-&amp;#34;sub&amp;#34;: &amp;#34;project_path:nicolonsky/ITDR:ref_type:branch:ref:main&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gi"&gt;+&amp;#34;sub&amp;#34;: &amp;#34;project_id:715070358:ref_type:branch:ref:main&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;GitHub example:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-diff" data-lang="diff"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -&amp;#34;sub&amp;#34;: &amp;#34;repo:nicolonsky/ITDR:ref:refs/heads/main&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gi"&gt;+&amp;#34;sub&amp;#34;: &amp;#34;repo:nicolonsky@32899754/ITDR@715070358:ref:refs/heads/main&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&#10;&lt;h2 class="relative group"&gt;AWS IAM role trust policies&#10; &lt;div id="aws-iam-role-trust-policies" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#aws-iam-role-trust-policies" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;If you&amp;rsquo;re coming from the Microsoft world, it&amp;rsquo;s worth distinguishing three core AWS IAM concepts:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Permissions policy:&lt;/strong&gt; Defines which actions are allowed or denied on which resources. For example, &lt;code&gt;s3:ListBucket&lt;/code&gt; allows listing objects in a bucket. The permissions are comparable to those in an Azure RBAC role. &lt;cite&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; &lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Role trust policy:&lt;/strong&gt; Defines who can assume a role and under which conditions. In the Microsoft world, principals always refer to Entra ID objects, such as users, groups and service principals (instances of app registrations). AWS can delegate trust directly to an external identity provider without local objects. &lt;cite&gt;&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;IAM role:&lt;/strong&gt; Combines a trust policy with permissions policies. &lt;cite&gt;&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h3 class="relative group"&gt;Example configuration&#10; &lt;div id="example-configuration" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#example-configuration" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;Before using GitHub Actions or GitLab as a federated principal, add the IdP as an OIDC provider in IAM:&lt;/p&gt;</description></item></channel></rss>