Your laptop doesn't need an AWS key
A leaked key, a no-static-keys rule, and the gap it left on developer laptops. How our laptops got the same short-lived, keyless AWS access that IRSA gives a pod, using Entra.
A long-lived AWS access key is the one secret that behaves perfectly right up until the day it ruins your week. It sits in a dotfile, a CI variable, a screenshot in a bug report, a quick Slack message to a teammate who was stuck, and it just keeps working. It does not expire. It does not care where it is. If you have ever grepped your own shell history and found an AKIA... staring back at you, you know the feeling.
The day one of ours turned up somewhere it had no business being, the argument was over. We wrote a short rule: no static AWS access keys, anywhere, in the org.
The easy ninety percent
For most of our footprint that rule was painless, because AWS already hands you better options and we were mostly using them.
- EC2 instances assume an IAM role. The metadata service gives the workload short-lived credentials that rotate on their own. No key on disk.
- Pods in our clusters use IRSA, IAM Roles for Service Accounts. Same deal: the pod proves who it is and gets temporary credentials. No key in the container.
In both cases the workload holds an identity, not a secret, and AWS swaps that identity for credentials that expire in hours. Nothing is holding a key, so there is nothing to leak. Easy.
The hard ten percent
Then there are developer laptops, and this is where it got annoying.
Developers need real AWS access to do real work: read a bucket, tail a log group, run a Terraform plan against a live account. The obvious way to give them that is the exact thing that just bit us, which is to cut everyone a key, let them paste it into ~/.aws/credentials, and hope.
And a laptop is the worst possible home for a long-lived key. It travels. It gets stolen. It backs its dotfiles up to a repo that goes public eighteen months later. Everything that makes a laptop useful, that it is personal and portable and always with you, makes it the last place on earth you want a secret that never expires.
So I had a rule I believed in and no clean way to honor it for the people who needed access the most. For a while I was just stuck.
Pulling IRSA apart
The way out started with a question I had somehow never stopped to answer: how does a pod actually avoid holding a key? Not the diagram. The mechanism. So I went and took IRSA apart to see.
Here is what is really going on. When a pod starts, the cluster projects a token into it, a short-lived signed JWT that says, in effect, “the holder of this is service account X in cluster Y.” It is signed by the cluster’s OIDC provider, which is just an OIDC issuer with a public key AWS can fetch. When the SDK in the pod needs credentials, it does not read a key. It calls one STS API, AssumeRoleWithWebIdentity, and hands over that token. AWS checks three things: the signature came from a provider it trusts, the token’s audience and subject match what the role allows, and the role permits the assume. All three good, and STS returns temporary credentials that expire in an hour.
The thing worth sitting with is what the pod never had. No key, ever. It had an identity, a trusted issuer willing to vouch for it, and it traded that for credentials that die on their own.
The part that clicked
And that is when it clicked, and I think I said it out loud at my desk: a laptop can do this too.
Think about what is actually special about the pod here. Nothing, except that something trustworthy vouches for it. That is the entire trick. And a developer’s laptop has something trustworthy vouching for it every single morning, before anyone has read an email. We are a Microsoft 365 shop, so every engineer signs in to Microsoft Entra, with MFA, just to start their day. Entra is an OIDC issuer. It can sign a token that says “this really is this developer, and they really did just prove it, with a second factor.”
So: let the laptop do what the pod does. Sign in to Entra, get the signed token, hand it to AssumeRoleWithWebIdentity, get back the same short-lived credentials a pod gets. The laptop runs IRSA. Entra plays the part the cluster’s OIDC provider plays for a pod. No key, because there is nowhere to put one.
That is tessera.
Building it
The idea is simple. The real work is a few unglamorous pieces, and all the danger lives in exactly one of them.
First you teach AWS to trust Entra: register the Entra tenant as an OIDC identity provider in IAM, once. Now AWS knows the issuer and can fetch its keys to check signatures.
Then the part to get exactly right, because getting it wrong is how you quietly hand credentials to anyone on the internet with an account in your tenant: the role’s trust policy. “Trust tokens from Entra” is not enough. You trust tokens from one specific Entra app, for one specific audience, and nothing else.
{
"Effect": "Allow",
"Principal": { "Federated": "arn:aws:iam::<account-id>:oidc-provider/login.microsoftonline.com/<tenant-id>/v2.0" },
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"login.microsoftonline.com/<tenant-id>/v2.0:aud": "<entra-app-client-id>"
}
}
}
The aud condition is the load-bearing line. It says this role accepts only a token minted for our tessera app, not every token Entra has ever issued for anything else in the tenant. Add “Assignment required” on the Entra app so only explicitly assigned developers can get a token at all, and your AWS access list becomes a group in Entra, sitting next to everything else a person can reach. Offboarding someone is removing them from one group. That part feels illegal the first time, in a good way.
With the trust set up, the CLI is boring, which for something that touches credentials is exactly what you want.
tess startopens the browser to Entra. The developer signs in the way they already do, MFA and all, over a standard auth-code-with-PKCE flow. tessera never sees the password. It gets back a signed token.- It calls
AssumeRoleWithWebIdentitywith that token and the target role, and gets temporary credentials. - It writes them where the AWS SDK already looks.
That last line is quietly the most important one, and it is why people actually used it. A security control that changes how people work gets routed around by Tuesday. tessera changes nothing about how anyone calls AWS. The CLI, Terraform, the SDKs all run exactly as before. The credentials underneath just stopped being permanent, and stopped being the developer’s problem.
The final piece is a small background daemon, because STS credentials are short by design and nobody wants to re-authenticate every hour. It refreshes them quietly before they expire, until the session’s hard cap, and then it makes you sign in again. Minted at sign-in, rotated while you work, gone the moment you stop.
Which, it turns out, is the whole point of the name. In a Roman camp the tessera was the watchword token, swapped every watch so a stolen or stale one was worthless. I did not pick it to be clever. I picked it because a short-lived credential is the entire idea in one word.
Isn’t this just SSO?
Fair question, and worth being straight about. AWS IAM Identity Center can federate to Entra and hand out short-lived credentials too, and for a lot of teams that is the right call. I built tessera because we were already all-in on Entra for identity, MFA, and conditional access, and I wanted the laptop story to lean on that one source of truth exactly, with no second console becoming the new place access lives. It is a small, sharp tool that does one thing: turn an Entra sign-in into short-lived AWS credentials on any machine a human actually sits at, a laptop, a desktop, a dev VM. Same federation principle underneath as everything else in this space. tessera is just the version cut to fit how we already worked.
What I’d tell past me
If you are where I was, stuck looking for a safe way to put a key on a laptop: stop looking. There is no safe amount, and the search is the mistake. It is the wrong question.
The developer does not need a key. They need an identity, a trusted issuer to vouch for it, and AWS will do the rest, the same way it already does for every pod you run. The whole move was to quit treating a laptop as a special problem and start treating the person in front of it as what they already are, someone your company can prove, every morning, with a second factor.
Pods worked this out years ago. The laptops were just waiting for someone to notice.