The Simplest Way to Make Pulumi and SAML Work Like They Should
Using pulumi and saml together lets teams log in with one central identity. This setup maps company groups to cloud stacks so engineers deploy code with scoped permissions. Cloud teams use Pulumi to build and update resources with real code. As the team grows, managing local logins for each person becomes a risk. Linking your identity provider with SAML fixes this problem right away. Users sign in once and get the exact team roles they need. When someone leaves the company, you turn off their a
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Using pulumi and saml together lets teams log in with one central identity. This setup maps company groups to cloud stacks so engineers deploy code with scoped permissions.
Cloud teams use Pulumi to build and update resources with real code. As the team grows, managing local logins for each person becomes a risk. Linking your identity provider with SAML fixes this problem right away. Users sign in once and get the exact team roles they need. When someone leaves the company, you turn off their account in one place.
How login and roles flow between pulumi and saml
In this setup, Pulumi acts as the service provider for your team. Your identity system acts as the identity provider that checks each user. When an engineer logs in, Pulumi sends a request to the identity system. The identity system checks the user and sends back a signed XML message. This message holds the user email and their current group names.
Pulumi reads those group names and maps them to internal team roles. A developer might get read access to production and write access to test stacks. Platform leads might get full admin rights across all company stacks. The CLI then uses a personal token tied to that web login. Every stack update checks these mapped roles before making any cloud changes.
Common failure modes and how to scope roles
Many teams set up single sign-on for the web app and stop there. They still use shared service accounts with broad tokens for automated pipelines. If a shared token leaks, an attacker can read state files and secrets. State files often hold raw database keys, emails, and phone numbers. Broad tokens also make it hard to see who ran a command.
Group drift is another common problem in growing cloud teams. If group names change in the identity system, role mapping breaks in Pulumi. Users might lose access or keep old admin rights by mistake. Long-lived personal tokens also bypass fresh SAML checks until you revoke them.
SAML 2.0 + Pulumi Policy as Code: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix these gaps with strict role and token rules. Map each identity group to the smallest stack role possible. Give read roles to most engineers and save write roles for specific teams. Set short expiration times on all personal and machine tokens. Turn on SCIM provisioning if your plan supports it to sync group changes fast. Keep network paths between runners and cloud targets locked down to known hosts.
Securing live infrastructure targets after deployment
Pulumi builds your cloud databases, servers, and clusters from code. Once those targets run, engineers still need to check logs and run queries. SAML controls who can update the Pulumi stack, not who touches live databases. Teams often hand out static database keys after the stack finishes running. This habit brings back the exact risks you tried to remove.
Treat live target access with the same care as stack updates. Tie every database query and server session back to your SAML identity. Mask sensitive fields like card numbers and national IDs in query results. Log every command at the target level so audits stay clean and fast.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Does SAML cover the Pulumi CLI as well as the web console?
Yes, engineers sign in through the browser using SAML to get a token. The CLI then uses that scoped token to run stack updates.
How do we handle automated pipelines when SAML requires a browser login?
Use team tokens or OpenID Connect for automated pipeline runs instead of user accounts. Scope each pipeline token to the exact stack it needs to update.
What happens to active CLI tokens when a user leaves the company?
Removing a user through SCIM revokes their web access and personal tokens right away. Without SCIM, an admin must remove the user in Pulumi to kill active tokens.
Related guides
In this post