Roles a boundary covers
A boundary applies to every IAM role Superblocks uses in your Managed BYOC account:- The deployer role, which the bootstrap creates to deploy and upgrade your instance.
- The support roles, which the bootstrap creates for Superblocks support: the break-glass admin role and the read-only role.
- Every role a deployment creates, such as the roles for your instance’s Kubernetes workloads, nodes, and controllers, and the Superblocks Database roles.
Choose a boundary
If you set
codebuild_permissions_boundary_arn, your boundary replaces the defaults, and the bootstrap ignores create_permissions_boundary. If you set neither, no role carries a boundary.
Superblocks default boundaries
The bootstrap creates four boundaries, one for each group of roles in the table below. Each is an IAM policy namedsuperblocks-permissions-boundary-<boundary>-<region>, such as superblocks-permissions-boundary-workload-us-west-2.
A boundary only takes permissions away. It lists what a role can’t do, and the role can’t do those things even if its own policies allow them. A boundary never gives a role a permission its own policies don’t grant.
The boundaries don’t restrict which KMS keys a role uses.
The deployer boundary
Thecodebuild boundary denies the deployer role:
- Changing itself, the boundaries, or any role or policy the bootstrap creates.
- Changing or passing IAM roles, policies, or instance profiles that don’t have Superblocks names.
- Creating a role that doesn’t carry the
workload,node, orcontrollerboundary. - Creating IAM users, groups, or long-lived credentials.
- Removing a permissions boundary.
- Changing OIDC providers other than your instance’s EKS cluster issuers.
- Attaching policies to the support roles, other than the policies for RDS IAM authentication.
- Deleting or stopping CloudTrail trails or AWS Config recorders that Superblocks doesn’t own.
- Turning off GuardDuty, Security Hub, Inspector, Macie, or IAM Access Analyzer.
- Changing AWS Organizations, account settings, SAML providers, or Direct Connect.
The workload boundary
Theworkload boundary denies:
- All IAM and EC2 changes.
- Data in resources without Superblocks names, in S3, Secrets Manager, Systems Manager Parameter Store, SQS, and DynamoDB.
- Changes in other AWS accounts.
- Account, identity, security service, and audit log changes.
- Requests outside your instance’s regions.
node and controller boundaries deny the same, with the exceptions in the table above.
Review the boundaries
The boundary policies ship with the bootstrap, interraform/permission-boundaries/, one JSON file per boundary. The files contain example values, such as the region, that the bootstrap replaces with your instance’s values. To see the exact policies before they’re created, run terraform plan. After the bootstrap runs, the permissions_boundary_policies output shows them as created.
Regions
The boundaries deny requests outside your instance’s regions. The bootstrap includes:- Your control plane region (
aws_region). - The region of each data plane.
us-east-1, which CloudFront, Lambda@Edge, and the Superblocks container registry need.
AccessDenied. If you attach the optional service control policy, replace it with the newly rendered one too.
Turn them on for an existing instance
New bootstraps turn the default boundaries on. If your instance was deployed without them, turn them on in this order:- Set
create_permissions_boundary = trueinsuperblocks.tfvarsand run the bootstrap. It creates the boundaries and attaches them to the support roles. - Ask your deployment team to deploy. The deployment puts the right boundary on each existing role of your instance.
- Re-run the bootstrap. It now attaches the
codebuildboundary to the deployer role.
codebuild boundary denies changes to roles without a boundary, which would block that deployment. Until then, terraform plan shows a warning and the deployer role has no boundary. Once the codebuild boundary is attached, it stays attached.
Bring your own boundary
Use your own boundary if your organization requires its own policy on IAM roles.-
Start from one of the default boundaries and edit it. Keep its first statement,
AllowAll, which leaves each role’s own policies in control, and add your own Deny statements for what roles can’t do. - Create the policy in your Managed BYOC AWS account.
-
In
superblocks.tfvars, setcodebuild_permissions_boundary_arnto the policy’s ARN. For example: -
Run the bootstrap. It attaches your boundary to the deployer and support roles, and outputs it as
permissions_boundary_arn. - Tell your deployment team. Deployments attach your boundary to every role they create.
iam:PutRolePermissionsBoundary, so a role that already exists can’t take a new boundary. Set your boundary before your initial deployment if you can. To use your own boundary on an instance that’s already deployed, talk to your deployment team first.
You keep your boundary up to date. Superblocks doesn’t edit your policy. If a release needs a permission your boundary denies, your deployment team tells you what to allow.
Optional organization policies
A permissions boundary can’t control some things, such as who a role trusts. For more protection, the bootstrap includes two optional AWS Organizations policies. You attach them at your organization; the bootstrap doesn’t.
Neither policy applies to your organization’s management account, and the resource control policy needs all features turned on in AWS Organizations. The resource control policy doesn’t cover sign-ins through EKS OIDC providers.

