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:

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:

[!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:

  1. Manually disable profiles: disabling a user's profile deactivates all their API keys immediately.
  2. Enforce automatic expiration: use the Turbot > IAM > Profile > Expiration and Turbot > IAM > Profile > Expiration > Days policies 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:

[!IMPORTANT] The policy_value_updated notification can generate extremely high volume. Setting a single policy that applies to 100,000 resources produces one policy_setting_created notification and 100,000 policy_value_updated notifications. 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:

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:

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:

  1. A ticket is opened in ServiceNow about a problem in a specific account and assigned to an operator in the AWSOperations group.
  2. A ServiceNow workflow step makes a GraphQL call to Guardrails, granting Turbot/Operator and AWS/Operator to the assigned operator in the specified account. The grant is time-limited to 6 hours.
  3. The operator logs into Guardrails, gets an AWS console session with elevated permissions, and resolves the issue.
  4. The ticket is closed. ServiceNow makes another GraphQL call to remove the elevated permissions.
  5. 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:

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:

Guardrails Admin team commits had no such restrictions. API auditing provided an additional layer of accountability across all teams.

Next Steps