Advanced IAM
Every organization has distinct authentication and authorization requirements. This page covers architectural strategies for enterprise Guardrails IAM deployments, patterns that go beyond basic setup into resilient, secure system design. Use this guidance alongside the prerequisite material to build an IAM architecture that withstands failures, enforces accountability, and scales across teams.
Prerequisites
Before diving into these advanced strategies, make sure you're familiar with the foundational IAM concepts:
- Permissions: how grants, activation, and permission levels work.
- Identity: profiles, directories, and authentication flows.
- Directories: configuring Local, SAML, Google, and LDAP directories.
- Admin Best Practices: day-to-day operational guidance for Guardrails administrators.
The most common IAM configuration uses a Guardrails Local directory (created by default when the workspace is initialized) alongside an external SAML directory. Console users authenticate through SAML, while the Local directory serves as the break-glass fallback.
Disaster Considerations
Losing access to your Guardrails workspace is one of the highest-impact failures you can face. These rules exist to prevent that scenario:
- A profile with valid credentials and
Turbot/Ownerpermissions must exist at all times. Even if theTurbot/Ownergrant is inactive, the profile must have it. Only profiles withTurbot/Ownercan grant permissions to other users. If no such profile exists, you cannot recover without Turbot support intervention. - Two independent directories should be attached to every workspace. The standard approach is Guardrails Local plus SAML. If you're exploring combinations that exclude the Local directory, be exceptionally careful to guard against single points of failure.
- Guardrails Local directories are always available as long as the console is accessible, but they do not support MFA. SAML, Google, and LDAP directories support MFA but depend on external identity providers. They're vulnerable to network outages and misconfigurations. You need both capabilities.
[!WARNING] Test all IAM changes in a non-production workspace before deploying to production. A misconfigured directory or permission change can lock you out entirely.
Profile Cleanup
Guardrails API access keys do not expire by default. This means that even after you revoke a user's SAML access, their API keys continue to work. For enterprise customers with publicly accessible ALBs, or for SaaS customers, this is a significant gap to address.
You have two options for managing stale profiles:
- Manually disable profiles: disabling a user's profile deactivates all their API keys immediately.
- Enforce automatic expiration: use the
Turbot > IAM > Profile > ExpirationandTurbot > IAM > Profile > Expiration > Dayspolicies to force profile expiration after a specified period.
If you use automatic expiration, implement it as a calculated policy that explicitly excludes your break-glass profiles.
[!CAUTION] Failure to exclude break-glass profiles from expiration policies can result in a complete lockout. There is no self-service recovery from this state.
Auditing the API
Tracing user activity in the Guardrails console and API is essential for accountability and security. Forward these logs to a central logging system for storage and analysis.
CloudWatch logs (Enterprise customers): API audit logs are available in the /turbot/<hive_name>/api/audit log group in CloudWatch, located in the Turbot Guardrails Master account. The hive name is specified in the Turbot Guardrails Enterprise Database (TED) stack. All API traffic for all workspaces hosted by a particular hive appears in that hive's log group.
Guardrails Firehose: As an alternative, you can configure Firehose watches to send notifications on grant and policy change events. The most useful notification types are:
active_grants_createdandactive_grants_deletedgrant_createdandgrant_deletedpolicy_setting_created,policy_setting_deleted, andpolicy_setting_updatedpolicy_value_updated
[!IMPORTANT] The
policy_value_updatednotification can generate extremely high volume. Setting a single policy that applies to 100,000 resources produces onepolicy_setting_creatednotification and 100,000policy_value_updatednotifications. Plan your logging system's ingestion capacity accordingly.
Pre-Approved Privileges
Guardrails supports a pattern similar to sudo on Linux or "Run as Administrator" on Windows: you can pre-approve users with elevated permissions that remain inactive until deliberately enabled.
The mechanism works through grant activation. A grant does not have to be active. It can be explicitly activated or deactivated, and activation can be set to expire at a specific time. This enables time-bound temporary privilege escalation with full audit trails.
In practice, this means you grant a user active Turbot/Operator (for day-to-day work) and inactive Turbot/Admin (for emergencies). When elevated access is needed, the user activates their Turbot/Admin grant, resolves the issue, and deactivates it. Every activation and deactivation appears in the audit logs, so misuse is detectable and attributable.
Case Study 1: Pre-Approved Permissions
A customer identified a set of trusted administrators who would receive elevated privileges in Guardrails. Their environment was entirely configured through Terraform. All changes were expected to go through source control and standard approval processes. However, emergency changes sometimes needed to happen immediately.
Environment:
- Guardrails configured with a Local and SAML directory (no group sync).
- A mix of AWS accounts and GCP projects.
- API audit logs shipped to the logging system.
Permission structure: All Guardrails admins held active Turbot/Operator and inactive Turbot/Admin grants. The manager responsible for Guardrails and their backup were the only profiles with Turbot/Owner.
Normal operations: Admins used their Turbot/Operator permissions for common tasks: running controls, checking policy values, and monitoring resource state.
Emergency workflow: When an urgent change was required, an admin activated their Turbot/Admin grant, made the necessary changes, then deactivated it. After the emergency, the changes were committed to source control to keep Terraform and Guardrails in sync.
Accountability: Every grant change appeared in the audit logs. The security monitoring system was configured to automatically open a ticket whenever it detected a privilege escalation, ensuring that every use of Turbot/Admin was reviewed.
Case Study 2: Permissions via Ticketing System
A customer wanted to prevent write access to Guardrails and AWS accounts except when a ticket had been opened and assigned. They used Guardrails-managed roles through AWS > Turbot > Permissions to provide access to targeted AWS accounts.
Environment:
- ServiceNow for ticket management.
- Guardrails configured with a Local and SAML directory (group sync enabled for SAML).
- Multiple AWS accounts.
- API audit logs shipped to the logging system.
Permission structure: A ServiceNow service user held Turbot/Owner. A break-glass user in the Local directory also held Turbot/Owner. Administrators in the AWSOperations SAML group had Turbot/ReadOnly and AWS/ReadOnly at the Guardrails level, giving them read access to any imported account and full visibility into policies and controls.
Emergency workflow:
- A ticket is opened in ServiceNow about a problem in a specific account and assigned to an operator in the
AWSOperationsgroup. - A ServiceNow workflow step makes a GraphQL call to Guardrails, granting
Turbot/OperatorandAWS/Operatorto the assigned operator in the specified account. The grant is time-limited to 6 hours. - The operator logs into Guardrails, gets an AWS console session with elevated permissions, and resolves the issue.
- The ticket is closed. ServiceNow makes another GraphQL call to remove the elevated permissions.
- If the ticket takes longer than 6 hours, the operator must renew their grant.
This pattern ensures that every instance of write access is tied to a ticket, creating a complete audit trail from request through resolution.
Case Study 3: Multi-Team Policy Development
A customer had multiple teams managing various cloud resources, each responsible for a specific set of resource types. All teams had Turbot/Operator access to the Guardrails console and API. Guardrails administrators held Turbot/Owner. All policy and workspace changes had to be reviewed before deployment.
Environment:
- Guardrails configured with a Local and SAML directory (no group sync).
- Multiple AWS accounts across several production workspaces.
- A CodeDeploy pipeline per team per workspace, each with a
Turbot/AdminGuardrails user. - A collection of policy packs per team per workspace for flexible scoping.
The problem: Multiple independent pipelines with Turbot/Admin access created a broad attack surface. A compromised or misconfigured pipeline could modify any policy in the workspace.
The solution: All CodeDeploy pipelines were consolidated into a single pipeline per workspace. Pre-deploy checks enforced that team members could only modify their assigned policy packs and resource types:
- Reject any commit that performs operations other than creating or updating policies.
- Reject any commit that modifies policies outside the team's assigned policy packs.
- Reject any commit that sets policies for services or resources outside the team's assigned set.
- Reject any commit that fails Terraform linting rules.
Guardrails Admin team commits had no such restrictions. API auditing provided an additional layer of accountability across all teams.
Next Steps
- Permissions: review grant types, activation, and permission levels.
- Admin Best Practices: operational guidance for day-to-day Guardrails administration.
- Identity: profiles, directories, and authentication configuration.