# hkb-alert-masteradmin-console

Fires on: Console sign-in as the HKB-MasterAdmin permission set (full admin on master).

Run the [common pre-checks](/wiki/runbooks/#common-pre-checks) first.

## Symptoms
An email from `hkb master alert`: `HKB-MasterAdmin CONSOLE SIGN-IN` with the session ARN and IP. Someone opened the console with full admin rights on the management account.

## Pre-checks
1. HKB-MasterAdmin is for running reviewed change sets and manual steps. Is one of those under way?
2. The IP should be a known location. The session ARN ends in the Identity Center user name.

## Resolution
- **Planned:** nothing to do. Sessions last one hour.
- **Not planned:** the Identity Center user is compromised. Reset its password and MFA, delete its active sessions in Identity Center, and read CloudTrail for every call the session made. Direct writes raise their own alert.

## Post-checks
No further HKB-MasterAdmin events without a matching change record.

## Rollback
Nothing to roll back.

## Alert details

| Property | Value |
| --- | --- |
| Runs in | the management account, us-east-1 |
| Email | From `hkb master alert`: `HKB-MasterAdmin CONSOLE SIGN-IN in the management account at <time> by <who> from <ip>.` |
| Source | `security/hkb-security-master-alerts.yaml`, resource `MasterAdminConsoleRule` |

The event pattern, as deployed:

```yaml
EventPattern:
  source: [aws.signin]
  detail-type: [AWS Console Sign In via CloudTrail]
  detail:
    eventName: [ConsoleLogin]
    userIdentity:
      arn:
        - wildcard: "*assumed-role/AWSReservedSSO_HKB-MasterAdmin_*"
```
