<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Notes on security and infrastructure on Intekhab Rizvi</title><link>https://intekhabrizvi.com/posts/</link><description>Recent content in Notes on security and infrastructure on Intekhab Rizvi</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 10 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://intekhabrizvi.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Vault dynamic secrets: stop sharing database passwords</title><link>https://intekhabrizvi.com/posts/vault-dynamic-secrets/</link><pubDate>Tue, 10 Nov 2026 00:00:00 +0000</pubDate><guid>https://intekhabrizvi.com/posts/vault-dynamic-secrets/</guid><description>&lt;p&gt;A database password that lives in a config file, a CI variable and three laptops is no longer a secret. It is shared state. Vault's database secrets engine removes the sharing: every client asks for credentials when it needs them, and Vault creates a short-lived user just for that request.&lt;/p&gt;&#10;&lt;h2 id="how-dynamic-secrets-work"&gt;How dynamic secrets work&lt;/h2&gt;&#10;&lt;p&gt;Vault holds one privileged connection to the database. When an application asks for credentials, Vault connects, runs a creation statement that you defined, and returns a username and password with a lease attached. When the lease expires, Vault drops the user. Nobody has to remember to rotate anything.&lt;/p&gt;</description></item><item><title>Terraform state is a secret</title><link>https://intekhabrizvi.com/posts/terraform-state-is-a-secret/</link><pubDate>Thu, 22 Oct 2026 00:00:00 +0000</pubDate><guid>https://intekhabrizvi.com/posts/terraform-state-is-a-secret/</guid><description>&lt;p&gt;Terraform state stores the attributes of every resource it manages, in plain text. A generated database password, a private key from &lt;code&gt;tls_private_key&lt;/code&gt;, an access key: if a provider returns it, the state file contains it. Marking a variable &lt;code&gt;sensitive&lt;/code&gt; hides it from CLI output. It does not remove it from state.&lt;/p&gt;&#10;&lt;h2 id="treat-the-backend-like-a-vault"&gt;Treat the backend like a vault&lt;/h2&gt;&#10;&lt;p&gt;Use a remote backend with encryption and locking, turn on versioning so you can recover from a bad write, and give read access to as few identities as possible. Never commit state to a repository. A minimal S3 backend looks like this:&lt;/p&gt;</description></item><item><title>Least privilege on AWS, one denied request at a time</title><link>https://intekhabrizvi.com/posts/aws-least-privilege-iam/</link><pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate><guid>https://intekhabrizvi.com/posts/aws-least-privilege-iam/</guid><description>&lt;p&gt;Nobody writes a least-privilege policy on the first attempt. The approach that works is to start slightly too broad, watch what the role actually does, and then cut the policy down to that.&lt;/p&gt;&#10;&lt;h2 id="start-from-what-is-actually-used"&gt;Start from what is actually used&lt;/h2&gt;&#10;&lt;p&gt;IAM Access Analyzer can generate a policy from the CloudTrail activity of a role, and the IAM console shows when each service was last accessed. Both turn &amp;quot;what might this need?&amp;quot; into &amp;quot;what did it do over the last 30 or 90 days?&amp;quot;, which is a far easier question to answer.&lt;/p&gt;</description></item></channel></rss>