CloudFormation reference
Customer template reference
This page is generated from the exact template object CloudFormation fetches. It shows the two roles, their trust policies, every IAM permission, and the raw YAML.
Overview
Creates the IAM roles that the JIT Guard system uses to manage IAM Identity Center group membership, SSO permission set assignments, event rule lifecycle, and cross-account event forwarding.
This build fetched the template from the URL above. Production builds usehttps://jitguard-prod-public.s3.eu-west-1.amazonaws.com/cloudformation/jitguard-customer-template.yml; dev builds usehttps://jitguard-dev-public.s3.eu-west-1.amazonaws.com/cloudformation/jitguard-customer-template.yml. The displayed SHA-256 is computed from the fetched bytes, so it changes whenever the published object changes.
Parameters
CustomerId
StringThe JIT Guard customer identifier (a lowercase UUID) assigned to your organisation. Provided by the JIT Guard system administrator.
- Minimum length
- 36
- Maximum length
- 36
- Allowed pattern
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
JitGuardRole
AWS::IAM::Role IAM role jitguard.
Grants the JIT Guard system permission to manage IAM Identity Center groups, memberships, and account assignments for ephemeral access.
Trust policy
- Effect
- Allow
- Principal
AWS: arn:aws:iam::233084605897:role/jitguard-customer-access- Action
sts:AssumeRole
| Condition operator | Key | Value |
|---|---|---|
| StringEquals | sts:ExternalId | !Ref CustomerId |
Permissions
| Permission (Sid) | Actions | Resource | Why it is needed |
|---|---|---|---|
IdentityStoreGroupManagement |
| * | Creates and deletes the reusable Identity Center groups JIT Guard uses for access, and adds or removes the requesting user's membership. It can also list users and groups so the Slack app can resolve who is asking and who approves. It cannot create or edit permission sets. |
SSOAdminAccountAssignment |
| * | Assigns the permission set you chose to the reusable JIT Guard group for the target AWS account on first use, and removes that assignment when the group is reclaimed. It cannot create or change permission sets. |
OrganizationRead |
| * | Reads your AWS Organisation structure (accounts, organisational units, roots, parents, children, and tags) so the dashboard and Slack account picker stay in sync. This is read-only discovery. |
RegionDiscovery |
| * | Lists the AWS regions enabled for the account so JIT Guard can find the region where IAM Identity Center is enabled. It does not read or change resources in those regions. |
SSODiscovery |
| * | Lists Identity Center instances and permission sets so JIT Guard can discover your existing SSO setup. It reads configuration only; it does not create, edit, or delete permission sets. |
EventBridgeRuleManagement |
| arn:aws:events:*:*:rule/jitguard-* | Creates and maintains the EventBridge rules named jitguard-* that forward organisation events to JIT Guard, including their targets. It cannot touch rules outside the jitguard-* naming convention. |
PassForwardRoleToEventBridge |
| !GetAtt JitGuardEvents.Arn | Allows EventBridge to use the dedicated JIT Guard event-forwarding role when delivering events. The permission is limited to that one role, not arbitrary IAM roles. |
JitGuardEvents
AWS::IAM::Role IAM role jitguard-events.
Allows EventBridge rules in this account to forward customer events to the central JIT Guard event bus.
Trust policy
- Effect
- Allow
- Principal
Service: events.amazonaws.com- Action
sts:AssumeRole
Permissions
| Permission (Sid) | Actions | Resource | Why it is needed |
|---|---|---|---|
forward-to-central-buspolicy name |
| arn:aws:events:eu-west-1:233084605897:event-bus/jitguard-org-events | Lets the EventBridge service role put organisation events onto the central JIT Guard event bus. It can send events only to that one bus and cannot read or change anything else. |
Why some permissions use Resource: '*'
Several AWS APIs do not support resource-level permissions, so the only valid resource for those actions is '*'. That does not mean the role can do anything: the actions are still limited to the list shown above.
5 permission statements useResource: '*':
IdentityStoreGroupManagement— Creates and deletes the reusable Identity Center groups JIT Guard uses for access, and adds or removes the requesting user's membership. It can also list users and groups so the Slack app can resolve who is asking and who approves. It cannot create or edit permission sets.SSOAdminAccountAssignment— Assigns the permission set you chose to the reusable JIT Guard group for the target AWS account on first use, and removes that assignment when the group is reclaimed. It cannot create or change permission sets.OrganizationRead— Reads your AWS Organisation structure (accounts, organisational units, roots, parents, children, and tags) so the dashboard and Slack account picker stay in sync. This is read-only discovery.RegionDiscovery— Lists the AWS regions enabled for the account so JIT Guard can find the region where IAM Identity Center is enabled. It does not read or change resources in those regions.SSODiscovery— Lists Identity Center instances and permission sets so JIT Guard can discover your existing SSO setup. It reads configuration only; it does not create, edit, or delete permission sets.
Mitigations
- The trust policy only allows the JIT Guard account's
jitguard-customer-accessrole. - That role must supply your Customer ID as
sts:ExternalIdbefore it can assume the customer role. - The permission list contains no data-plane actions (no EC2, S3, RDS, or similar resource access).
- EventBridge rule management is scoped to rules named
jitguard-*. - Passing a role to EventBridge is scoped to the single
JitGuardEventsrole.
Outputs
| Name | Description | Value |
|---|---|---|
RoleArn | ARN of the JIT Guard role assumed by the backend | !GetAtt JitGuardRole.Arn |
EventsRoleArn | ARN of the JIT Guard event forwarding role | !GetAtt JitGuardEvents.Arn |
Raw template
The collapsed block below is the exact response body fetched for this build. The SHA-256 above is computed from these same bytes.
Show the raw YAML
AWSTemplateFormatVersion: '2010-09-09'
# docs:overview
Description: >
Creates the IAM roles that the JIT Guard system uses to manage IAM
Identity Center group membership, SSO permission set assignments, event
rule lifecycle, and cross-account event forwarding.
Parameters:
# docs:parameter-customer-id
CustomerId:
Type: String
Description: >
The JIT Guard customer identifier (a lowercase UUID) assigned to your
organisation. Provided by the JIT Guard system administrator.
MinLength: 36
MaxLength: 36
AllowedPattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
ConstraintDescription: >
Customer ID must be a lowercase UUID of the form
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa.
Resources:
# docs:role-jitguard
JitGuardRole:
Type: AWS::IAM::Role
Properties:
RoleName: 'jitguard'
Description: >
Grants the JIT Guard system permission to manage IAM Identity Center
groups, memberships, and account assignments for ephemeral access.
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
AWS: 'arn:aws:iam::233084605897:role/jitguard-customer-access'
Action: sts:AssumeRole
Condition:
StringEquals:
sts:ExternalId: !Ref CustomerId
Policies:
- PolicyName: jitguard-permissions
PolicyDocument:
Version: '2012-10-17'
Statement:
# docs:permission-identity-store-group-management
- Sid: IdentityStoreGroupManagement
Effect: Allow
Action:
- identitystore:CreateGroup
- identitystore:DeleteGroup
- identitystore:CreateGroupMembership
- identitystore:DeleteGroupMembership
- identitystore:ListUsers
- identitystore:ListGroups
- identitystore:GetGroupId
- identitystore:DescribeGroup
# The engine resolves approver group members to emails via
# DescribeUser (#1335); without it, approval lookup fails.
- identitystore:DescribeUser
- identitystore:ListGroupMemberships
- identitystore:ListGroupMembershipsForMember
Resource: '*'
# docs:permission-sso-admin-account-assignment
- Sid: SSOAdminAccountAssignment
Effect: Allow
Action:
- sso:CreateAccountAssignment
- sso:DescribeAccountAssignmentCreationStatus
- sso:ListAccountAssignments
- sso:DeleteAccountAssignment
- sso:DescribeAccountAssignmentDeletionStatus
Resource: '*'
# docs:permission-organization-read
- Sid: OrganizationRead
Effect: Allow
Action:
- organizations:ListAccounts
- organizations:ListOrganizationalUnitsForParent
- organizations:ListRoots
- organizations:DescribeOrganization
- organizations:DescribeAccount
- organizations:ListTagsForResource
- organizations:ListParents
- organizations:ListChildren
Resource: '*'
# docs:permission-region-discovery
- Sid: RegionDiscovery
Effect: Allow
Action:
- ec2:DescribeRegions
Resource: '*'
# docs:permission-sso-discovery
- Sid: SSODiscovery
Effect: Allow
Action:
- sso:ListInstances
- sso:DescribeInstance
- sso:ListPermissionSets
- sso:DescribePermissionSet
Resource: '*'
# docs:permission-eventbridge-rule-management
- Sid: EventBridgeRuleManagement
Effect: Allow
Action:
- events:DescribeRule
- events:PutRule
- events:PutTargets
- events:RemoveTargets
- events:DeleteRule
- events:ListTargetsByRule
Resource: 'arn:aws:events:*:*:rule/jitguard-*'
# docs:permission-pass-forward-role
- Sid: PassForwardRoleToEventBridge
Effect: Allow
Action:
- iam:PassRole
- iam:GetRole
Resource: !GetAtt JitGuardEvents.Arn
# docs:role-jitguard-events
JitGuardEvents:
Type: AWS::IAM::Role
Properties:
RoleName: 'jitguard-events'
Description: >
Allows EventBridge rules in this account to forward customer events
to the central JIT Guard event bus.
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: events.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: forward-to-central-bus
PolicyDocument:
Version: '2012-10-17'
Statement:
# docs:permission-forward-to-central-bus
- Effect: Allow
Action: events:PutEvents
Resource: 'arn:aws:events:eu-west-1:233084605897:event-bus/jitguard-org-events'
# docs:outputs
Outputs:
RoleArn:
Description: ARN of the JIT Guard role assumed by the backend
Value: !GetAtt JitGuardRole.Arn
EventsRoleArn:
Description: ARN of the JIT Guard event forwarding role
Value: !GetAtt JitGuardEvents.Arn