User Mode

User Mode instructs Guardrails to manage AWS permissions using IAM users and groups in addition to IAM roles. User Mode includes all the capabilities of Role Mode plus IAM user and group management.

[!NOTE] Role Mode is recommended for most organizations. User Mode is provided for environments where direct IAM user access is required by policy or technical constraints.

Enable User Mode

Set AWS > Turbot > Permissions to Enforce: User Mode:

resource "turbot_policy_setting" "aws_permissions_user_mode" {
  resource = "id-of-account-or-folder"
  type     = "tmod:@turbot/aws-iam#/policy/types/permissions"
  value    = "Enforce: User Mode"
}

Once this policy is set:

  1. The AWS > Turbot > Permissions > Source policy automatically generates a Terraform configuration.
  2. The AWS > Turbot > IAM stack control runs, creating IAM users, groups, and policies.
  3. When complete, the AWS > Turbot > IAM control should be in OK state.

How User Mode Works

When a Guardrails permission grant is made:

  1. Guardrails creates an IAM user for the grantee.
  2. The user is added to IAM groups corresponding to their permission level.
  3. IAM policies attached to those groups define the AWS permissions.

Permissions are granted and managed through the Guardrails console the same way as in Role Mode. See Grant Permission.

IAM User Login Names

Guardrails creates login names based on the user's Guardrails profile, using the AWS > IAM > Login User Names policy. The default template uses the profile ID:

{% if $.profile.profileId %}- '{{ $.profile.profileId }}'{% else %} [] {% endif %}

Custom Group Levels

Custom Group Levels let you attach your own IAM groups to Guardrails-managed users. This is unique to User Mode. It cannot be used in None, Policy-Only, or Role Mode.

Use cases:

Custom Group Levels appear in the Guardrails Permissions UI as AWS/Group/{GroupName}.

[!IMPORTANT] Custom Group Levels are not cumulative. They don't inherit permissions from Guardrails-defined levels. They are completely independent. Grants can only be made at the AWS account level, not at folders.

Configuration

  1. Set AWS > Turbot > Permissions > Custom Group Levels [Account] on the target account with a list of existing IAM group names.
  2. Grant Custom Group permissions to users on the Guardrails Permissions page.
  3. The AWS > Turbot > IAM control pushes the group membership changes.
resource "turbot_policy_setting" "custom_group_levels" {
  resource = "id-of-account"
  type     = "tmod:@turbot/aws-iam#/policy/types/permissionsCustomGroupLevelsAccount"
  value    = <<-EOT
    - data_oxford
    - data_cambridge
    - data_harvard
  EOT
}

[!NOTE] Guardrails does not create the custom IAM groups. They must already exist in the account. Guardrails manages the group membership only. The custom groups are subject to whatever AWS > IAM > Group controls are configured (Approved, Active, Tags, etc.).

Troubleshooting Custom Groups

  1. Verify AWS > Turbot > Permissions is Enforce: User Mode.
  2. Verify the custom groups exist in the account with CMDB entries in Guardrails.
  3. Verify spelling in the Custom Group Levels [Account] policy. Use group names, not ARNs.
  4. Verify the end user has a profile in Guardrails.
  5. Check the AWS > Turbot > IAM control logs for errors.

Enabling Service-Specific Permissions

To grant service-specific permissions (e.g., AWS/EC2/*), the service must be enabled. Set the service's Enabled policy to Enabled and configure AWS > {Service} > Permissions > Levels as needed. Use AWS > Turbot > Permissions > Levels [Default] to set defaults across all services.