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:
- The
AWS > Turbot > Permissions > Sourcepolicy automatically generates a Terraform configuration. - The
AWS > Turbot > IAMstack control runs, creating IAM users, groups, and policies. - When complete, the
AWS > Turbot > IAMcontrol should be in OK state.
How User Mode Works
When a Guardrails permission grant is made:
- Guardrails creates an IAM user for the grantee.
- The user is added to IAM groups corresponding to their permission level.
- 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 %}
- Login names must be unique within the AWS account.
- You can set exceptions directly on individual Guardrails profiles to customize login names for specific users.
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:
- Assign existing IAM groups to Guardrails-managed users alongside Guardrails standard groups.
- Manage access to data sets via IAM groups concurrently with Guardrails service-level groups.
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
- Set
AWS > Turbot > Permissions > Custom Group Levels [Account]on the target account with a list of existing IAM group names. - Grant Custom Group permissions to users on the Guardrails Permissions page.
- The
AWS > Turbot > IAMcontrol 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 > Groupcontrols are configured (Approved, Active, Tags, etc.).
Troubleshooting Custom Groups
- Verify
AWS > Turbot > PermissionsisEnforce: User Mode. - Verify the custom groups exist in the account with CMDB entries in Guardrails.
- Verify spelling in the
Custom Group Levels [Account]policy. Use group names, not ARNs. - Verify the end user has a profile in Guardrails.
- Check the
AWS > Turbot > IAMcontrol 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.