AWS Organizations 환경에서 sts:AssumeRoot는 Management Account 또는 Delegated Admin 계정에서 멤버 계정의 Root 수준 임시 세션을 획득하여, 사전 정의된 Task Policy 범위 내에서 특권 작업(Privileged Action)을 수행할 수 있는 기능입니다.
이를 통해 멤버 계정별로 Root 자격증명(비밀번호, 액세스 키, MFA)을 개별 관리하지 않고도, 중앙에서 Root 수준의 긴급 조치를 수행할 수 있습니다.
2. AssumeRoot가 필요한 케이스
2.1 S3 버킷 정책 잠금 해제
항목
내용
상황
잘못된 S3 버킷 정책 적용으로 모든 Principal의 접근이 차단됨 (본인 포함 Deny)
증상
버킷 소유자 포함 어떤 IAM 자격증명으로도 버킷 정책 수정/삭제 불가
Task Policy
S3UnlockBucketPolicy
수행 작업
잠긴 S3 버킷 정책 삭제
예시 시나리오: 버킷 정책에 "Effect": "Deny", "Principal": "*" 를 잘못 적용하여, 관리자 포함 전체 접근이 차단된 경우. 일반 IAM 권한으로는 해당 정책을 수정할 수 없으며, Root 세션으로만 정책 삭제 가능
2.2 SQS 큐 정책 잠금 해제
항목
내용
상황
잘못된 SQS 큐 리소스 정책 적용으로 큐 접근 및 정책 수정 불가
증상
메시지 송수신 및 큐 정책 변경 불가로 서비스 중단
Task Policy
SQSUnlockQueuePolicy
수행 작업
잠긴 SQS 큐 리소스 정책 삭제
예시 시나리오: SQS 큐 정책에서 모든 Principal에 대해 Deny를 적용하여, 연동된 Lambda/EC2 등 워크로드가 메시지를 처리하지 못하고 서비스 장애가 발생한 경우
2.3 멤버 계정 Root 자격증명 삭제
항목
내용
상황
멤버 계정의 Root 자격증명(비밀번호, 액세스 키, MFA)이 유출되었거나, 보안 정책상 Root 자격증명을 제거해야 하는 경우
증상
멤버 계정 Root 로그인 가능 상태가 보안 위험으로 식별됨
Task Policy
IAMDeleteRootUserCredentials
수행 작업
멤버 계정의 Root 콘솔 비밀번호, 액세스 키, 서명 인증서, MFA 디바이스 삭제
예시 시나리오: Organizations 환경에서 멤버 계정의 Root 자격증명을 중앙에서 일괄 제거하여, Root 직접 로그인을 원천 차단하고 중앙 집중식 루트 액세스만 허용하는 경우
2.4 멤버 계정 Root 비밀번호 복구
항목
내용
상황
멤버 계정에 Root로 직접 로그인이 필요하나, 비밀번호가 설정되어 있지 않거나 분실된 경우
증상
Root 이메일을 통한 비밀번호 재설정이 불가하거나 시간이 오래 소요됨
Task Policy
IAMCreateRootUserPassword
수행 작업
멤버 계정의 Root 로그인 프로필(비밀번호) 생성
예시 시나리오: 특정 멤버 계정에서 Root 수준의 콘솔 접근이 필요하나(예: 특정 서비스의 Root-only 설정 변경), Root 비밀번호가 설정되어 있지 않은 경우 임시로 비밀번호를 생성하여 접근
2.5 Root 자격증명 현황 감사
항목
내용
상황
멤버 계정의 Root 자격증명 상태(비밀번호 존재 여부, 액세스 키 활성 여부, MFA 등록 여부)를 중앙에서 확인해야 하는 경우
증상
보안 감사 또는 컴플라이언스 점검 시 각 계정별 Root 자격증명 현황 파악 필요
Task Policy
IAMAuditRootUserCredentials
수행 작업
멤버 계정의 Root 자격증명 현황 조회
예시 시나리오: 분기별 보안 감사에서 전체 멤버 계정의 Root 자격증명이 제거되었는지 일괄 확인. 자격증명이 남아있는 계정에 대해 IAMDeleteRootUserCredentials로 후속 조치
AllowListAccounts Statement는 콘솔에서 Root access management 화면의 조직 구조 조회 및 Take privileged action 대상 계정을 확인하기 위해 필요합니다. 이 권한이 없으면 콘솔에서 계정 목록 및 OU 구조를 로드할 수 없습니다.
Step 3. Specify permission set details
Permission set name: BreakGlassAssumeRoot
Description: Break Glass - sts:AssumeRoot for emergency privileged access
Session duration: 1 hour (최소한으로 설정)
3.3.2 Take privileged action 권한 추가 할당
Delete S3 bucket policy
Delete SQS queue policy
Allow password recovery
임시 루트 세션의 범위를 지정할 수 있습니다.
policy/root-task/IAMDeleteRootUserCredentials 루트 세션은 멤버 루트 자격 증명(콘솔 암호, 액세스 키, 서명 인증서 및 MFA 장치)을 삭제할 수 있도록 범위가 제한됩니다.
policy/root-task/IAMCreateRootUserPassword 루트 세션은 멤버 루트 로그인 프로필 생성을 허용하도록 범위가 지정됩니다.
policy/root-task/IAMAuditRootUserCredentials 루트 세션은 루트 자격 증명을 검토하도록 범위가 지정됩니다.
policy/root-task/S3UnlockBucketPolicy 루트 세션은 S3 버킷 정책을 삭제할 수 있도록 범위가 지정됩니다.
policy/root-task/SQSUnlockQueuePolicy 루트 세션은 SQS 큐 리소스 정책을 삭제할 수 있도록 범위가 지정됩니다.
3.3.3 Permission Set 계정 할당
생성한 Permission Set을 대상 계정(Management Account 또는 Delegated Admin 계정)에 할당합니다.
경로: IAM Identity Center → AWS accounts → 대상 계정 선택 → Assign users or groups
단계
내용
Step 1. Users and groups
Break Glass 담당자 사용자 또는 그룹 선택
Step 2. Permission sets
BreakGlassAssumeRoot 선택
Step 3. Review and submit
확인 후 Submit
Step 1 - Users and groups: Break Glass 담당자 사용자 또는 그룹 선택
Audit 계정에 로그인하는 IAM Identity Center 사용자/그룹이 실제로 sts:AssumeRoot API를 호출할 수 있도록 IAM 권한을 부여하는 것 (Audit 계정에 로그인하는 사람에게 AssumeRoot 실행 권한 부여)
# 메시지 전송 시도
aws sqs send-message --queue-url <https://sqs.ap-northeast-2.amazonaws.com/xxxxxxxxxxxx/assumeroot-saraheee> --message-body "test"
# 큐 속성 조회 시도
aws sqs get-queue-attributes --queue-url <https://sqs.ap-northeast-2.amazonaws.com/xxxxxxxxxxxx/assumeroot-saraheee> --attribute-names All
# 큐 정책 변경 시도 (빈 정책으로 삭제 시도)
aws sqs set-queue-attributes --queue-url <https://sqs.ap-northeast-2.amazonaws.com/xxxxxxxxxxxx/assumeroot-saraheee> --attributes '{"Policy": ""}'
Step 4. Take Privileged Action 수행 (관리/위임 계정)
관리 계정(또는 Delegated Admin 계정)의 콘솔에서 Root access management로 이동하여 Take privileged action을 수행합니다.
CLI 사용 시에는 sts:AssumeRoot API를 직접 호출합니다. (4.2절 참고)
Step 5. SQS 큐 정책 삭제 (Root 세션)
Delete SQS queue policy 작업을 선택하고, 잠긴 큐의 ARN을 지정하여 정책을 삭제합니다:
"errorMessage": "User: arn:aws:sts::xxxxxxxxxxxx:assumed-role/AWSReservedSSO_BreakGlassAssumeRoot_xxxxxxxxxxxxxxxx/saraheee@email.com is not authorized to perform: organizations:DescribeOrganization on resource: * because no identity-based policy allows the organizations:DescribeOrganization action",
(참고) 권한 부족 2.
We couldn't load the root of the organization.
You don't have permissions to see this resource, because the management account has not granted you the permissions to view accounts.
CloudTrail Event history
로그 에러
"errorMessage": "User: arn:aws:sts::xxxxxxxxxxxx:assumed-role/AWSReservedSSO_BreakGlassAssumeRoot_xxxxxxxxxxxxxxxx/saraheee@email.com is not authorized to perform: iam:GetOutboundWebIdentityFederationInfo on resource: * because no identity-based policy allows the iam:GetOutboundWebIdentityFederationInfo action",
organizations:DescribeOrganization
organizations:ListRoots
sso:ListInstances
iam:ListSTSRegionalEndpointsStatus
iam:GetOutboundWebIdentityFederationInfo
(참고) 권한 부족 3.
We couldn't load organizational units.
You don't have permissions to see this resource, because the management account has not granted you the permissions to view accounts.