hkb-alert-assume-root
Fires on: sts:AssumeRoot (centralized root sessions into member accounts).
Run the common pre-checks first.
Symptoms
An email from hkb master alert: sts:AssumeRoot, with the caller's role ARN and IP. A task-scoped root session into a member account has started.
Pre-checks
- Only HKB-RootUnlock may call
sts:AssumeRoot, and only for three task policies: the root audit, the S3 bucket policy unlock and the SQS queue policy unlock. The caller ARN should containAWSReservedSSO_HKB-RootUnlock_. - Find the target account and the task:
aws cloudtrail lookup-events --profile ro-hkb-master --region us-east-1 --lookup-attributes AttributeKey=EventName,AttributeValue=AssumeRoot --max-results 5, then readrequestParameters.targetPrincipalandrequestParameters.taskPolicyArn.
Resolution
- Planned: confirm the task finished and the session expired (sessions last at most 15 minutes). Record the account, the task and the reason.
- Not planned, or a caller other than HKB-RootUnlock: remove the HKB-RootUnlock assignment in Identity Center (an Identity Center alert follows, as expected), then read the target account's CloudTrail for events with
userIdentity.typeRootsince the session started.
Post-checks
No AssumeRoot events after the planned one. An unlocked bucket or queue has its intended resource policy back.
Rollback
Reassign HKB-RootUnlock to hkb-admins through hkb-bootstrap-identity once the cause is understood.
Alert details
| Property | Value |
|---|---|
| Runs in | the management account, us-east-1 |
From hkb master alert: sts:AssumeRoot at <time> by <who> from <ip>. |
|
| Source | security/hkb-security-master-alerts.yaml, resource AssumeRootRule |
The event pattern, as deployed:
EventPattern:
source: [aws.sts]
detail-type: [AWS API Call via CloudTrail]
detail:
eventSource: [sts.amazonaws.com]
eventName: [AssumeRoot]
Page information
- Owner
- Detection and Response
- Status
- current Current: generated from the templates and records in the repository at this build.
- Generated from
site/content/runbooks.md,security/hkb-security-master-alerts.yaml- Linked from
- Management account alerts, Runbooks, Management account alerts
- Plain markdown
- /wiki/runbooks/management/hkb-alert-assume-root/index.md