fresh-mechanic-57821
10/01/2026, 9:25 PMservice-account:ysff347-xxx-xxxx-xxx). So even when I request a team scoped token from inside the Lambda, that token's underlying identity can do a lot more than just read that one team's environment values. It effectively inherits the broader deploy and management privileges of the provisioning identity, which feels like privilege escalation. All I want the workload to be able to do at runtime is open and read one specific environment, nothing else.
So my question is really about the right way to model this. How should I structure my IaC and my Pulumi Cloud permissions so that the runtime identity used by my workloads is strictly scoped to reading the environments it needs, and is fully separate from the identity that provisions and manages infrastructure? A few specific things I'm unsure about:
How do people keep the provisioning identity and the runtime identity distinct when both end up flowing through OIDC? Is the right answer a dedicated, least privileged service account (or team) for runtime that only has read/open on specific environments, with the OIDC issuer trust mapped to that identity rather than the deploy one? And is there a recommended way to make the token the Lambda receives incapable of anything beyond opening the target environment, regardless of what the deploy identity can do?
If anyone has a reference pattern or docs for this separation of duties between deploy time and run time with ESC, I'd really appreciate it. Thanks!stocky-restaurant-98004
10/01/2026, 9:46 PMstocky-restaurant-98004
10/01/2026, 9:53 PMfresh-mechanic-57821
10/02/2026, 2:12 PMservice-account:xxx-xxx-.... Then when my workloads (like an AWS Lambda) authenticate to Pulumi via OIDC and request a team scoped token, they do get access to what that specific team is permitted to do, which is what I want. But the exchanged token also resolves to an identity, and that identity is the same service-account:xxx-xxx-....
Because of that shared identity, my Lambda, which should only have the team's permissions, effectively also inherits access to everything that service account owns, which is basically all of my infra. That is the escalation I'm worried about.
As a test, I went into the Pulumi web UI and changed the owner of the environments from that service account over to my user, and the escalation went away. So that confirms the ownership of the deploying service account is what is leaking the extra access.
So what I'm really trying to figure out through this forum is the best way to manage the IaC, specifically how to manage identities, so that we don't run into this kind of permission escalation when a workload is just trying to read secrets.
I'm happy to provide more details if there's anything you want me to highlight more. Thanks in advance!stocky-restaurant-98004
10/02/2026, 2:38 PMfresh-mechanic-57821
10/02/2026, 2:44 PMfuture-hairdresser-70637
10/02/2026, 7:20 PM