IAM Operation 도메인 이벤트 스토밍
본 문서는 IAM Operation 도메인 요구사항(requirements.md)을 기반으로 Event Storming 방식으로 분석한 결과입니다.
목적
IAM Operation 도메인은 운영자 계정의 인가를 담당하는 도메인 입니다. 권한, 역할 등을 처리합니다.
1. 도메인 이벤트
1.1 권한 생명주기 이벤트
| Event | Description |
|---|---|
| PermissionCreated | 새 권한 생성 |
| PermissionRead | 권한 정보가 조회됨 |
| PermissionUpdated | 권한 정보가 수정됨 |
| PermissionDeleted | 권한 정보가 삭제됨 |
| PermissionVerified | 특정 권한 보유가 확인됨 |
| PermissionVerificationFailed | 특정 권한 보유 확인 실패됨 |
1.2 역할 생명주기 이벤트
| Event | Description |
|---|---|
| RoleCreated | 새 권한 생성 |
| RoleRead | 권한 정보가 조회됨 |
| RoleUpdated | 권한 정보가 수정됨 |
| RoleDeleted | 권한 정보가 삭제됨 |
| RolePermissionMappingUpdated | 역할-권한 매핑 수정됨 |
1.3 그룹 도메인 연동 이벤트
| Event | Description |
|---|---|
| GroupRoleMappingUpdated | 그룹-역할 매핑 정보가 업데이트 됨 |
| GroupPermissionCacheInvalidated | 그룹 권한 캐시가 무효화 됨 |
1.4 관리자(Operation) 계정 정보 관리 이벤트
1.4.1 비밀번호 변경
| Event | Description |
|---|---|
| PasswordChangeRequested | 비밀번호 변경이 요청됨 |
| CurrentPasswordVerificationFailed | 현재 비밀번호 검증이 실패함 |
| PasswordChanged | 비밀번호가 변경됨 |
| PasswordChangeRejectedDueToInvalidCurrentPassword | 현재 비밀번호가 일치하지 않아 변경이 거부됨 |
1.4.2 관리자에 의한 강제 비밀번호 초기화
| Event | Description |
|---|---|
| PasswordForcedResetRequested | 강제 비밀번호 초기화가 요청됨 |
| RandomPasswordGenerated | 무작위 비밀번호가 생성됨 |
| PasswordForciblyReset | 비밀번호가 강제로 초기화됨 |
| PasswordResetEmailSent | 비밀번호 초기화 이메일이 전송됨 |
| PasswordResetEmailFailed | 비밀번호 초기화 이메일 전송이 실패함 (롤백됨) |
1.4.3 보안 코드를 통한 비밀번호 재설정
| Event | Description |
|---|---|
| PasswordResetSecurityCodeRequested | 비밀번호 재설정 보안 코드가 요청됨 |
| SecurityCodeStoredInCache | 보안 코드가 캐시에 저장됨 |
| SecurityCodeEmailSent | 보안 코드 이메일이 전송됨 |
| SecurityCodeVerificationRequested | 보안 코드 검증이 요청됨 |
| SecurityCodeValidated | 보안 코드가 검증됨 |
| SecurityCodeValidationFailed | 보안 코드 검증이 실패함 |
| TemporaryAccessTokenIssued | 임시 액세스 토큰이 발급됨 (30분 유효) |
| PasswordResetWithTemporaryToken | 임시 토큰으로 비밀번호가 재설정됨 |
| PasswordResetRejectedDueToDuplicatePassword | 동일한 비밀번호로 재설정이 거부됨 |
1.4.4 계정 삭제
| Event | Description |
|---|---|
| AccountDeletionRequested | 계정 삭제가 요청됨 |
| AdminAccountDeletionEvaluated | 관리자 계정 삭제 가능 여부가 평가됨 |
| AccountDeleted | 계정이 삭제됨 |
| AccountDeletionRejectedDueToPasswordMismatch | 비밀번호 불일치로 삭제가 거부됨 |
| AccountDeletionRejectedDueToUnauthorizedUser | 권한 없는 사용자의 삭제 시도가 거부됨 |
| AccountDeletionRejectedDueToLastAdmin | 마지막 관리자여서 삭제가 거부됨 |
| SiteDeletedWithLastAccount | 마지막 계정 삭제와 함께 사이트가 삭제됨 |
2. 액터와 명령
각 액터가 수행할 수 있는 명령과 결과 이벤트를 정의합니다.
2.1 권한 생명주기 명령
| Command | Actor | Event |
|---|---|---|
| CreatePermission | System Admin | PermissionCreated |
| ReadPermission | System Admin | PermissionRead |
| UpdatedPermission | System Admin | PermissionUpdated |
| DeletePermission | System Admin | PermissionDeleted |
| VerifyPermission | System | PermissionVerified |
| FailureVerifyPermission | System | PermissionVerificationFailed |
2.2 역할 생명주기 명령
| Command | Actor | Event |
|---|---|---|
| CreateRole | System Admin | RoleCreated |
| ReadRole | System Admin | RoleRead |
| UpdateRole | System Admin | RoleUpdated |
| DeleteRole | System Admin | RoleDeleted |
| UpdateRolePermissionMapping | System Admin | RolePermissionMappingUpdated |
2.3 그룹 도메인 연동 명령
| Command | Actor | Event |
|---|---|---|
| UpdateGroupRoleMapping | System Admin | GroupRoleMappingUpdated |
| InvalidateGroupPermissionCache | System Admin | GroupPermissionCacheInvalidated |
2.4 관리자 계정정보 관리 명령
2.4.1 비밀번호 관리 명령
| Command | Actor | Event |
|---|---|---|
| ChangePassword | Account | PasswordChanged |
| ForceResetPassword | PlatformAdmin, SiteAdmin | PasswordForciblyReset |
| RequestPasswordResetSecurityCode | Account | SecurityCodeStoredInCache |
| VerifySecurityCode | Account | SecurityCodeValidated |
| IssueTemporaryAccessToken | System | TemporaryAccessTokenIssued |
| ResetPasswordWithTemporaryToken | Account | PasswordResetWithTemporaryToken |
2.4.2 계정 삭제 명령
| Command | Actor | Event |
|---|---|---|
| DeleteAccount | Account | AccountDeleted |
3. Aggregate 매핑
각 명령과 이벤트가 어느 Aggregate에서 처리되는지 정의합니다.
3.1 Permission
트랜잭션 경계: 퍼미션 값을 처리
담당 Command:
- Create
- Read
- Update
- Delete
- Verify
발행 Event:
- PermissionCreated
- PermissionRead
- PermissionUpdated
- PermissionDeleted
- PermissionVerified
- PermissionVerificationFailed
3.2 Role
트랜잭션 경계: 롤을 관리하고 퍼미션과의 매핑을 관리
담당 Command:
- Create
- Read
- Update
- Delete
- MapPermission
발행 Event:
- RoleCreated
- RoleRead
- RoleUpdated
- RoleDeleted
3.3 Group
트랜잭션 경계: 롤을 관리하고 퍼미션과의 매핑을 관리
담당 Command:
- MapRole
발행 Event:
- GroupRoleMappingUpdated
- GroupPermissionCacheInvalidated
3.4 SecurityCode
트랜잭션 경계: 비밀번호 재설정 보안 코드의 생성, 저장, 검증을 관리
담당 Command:
- RequestPasswordResetSecurityCode
- VerifySecurityCode
발행 Event:
- PasswordResetSecurityCodeRequested
- SecurityCodeStoredInCache
- SecurityCodeEmailSent
- SecurityCodeVerificationRequested
- SecurityCodeValidated
- SecurityCodeValidationFailed
3.5 Account
트랜잭션 경계: 계정의 생명주기 전체(생성, 비밀번호 관리, 삭제)를 원자적으로 관리
담당 Command:
- ChangePassword
- ForceResetPassword
- ResetPasswordWithTemporaryToken
- DeleteAccount
발행 Event:
- PasswordChangeRequested
- PasswordChanged
- PasswordChangeRejectedDueToInvalidCurrentPassword
- PasswordForcedResetRequested
- RandomPasswordGenerated
- PasswordForciblyReset
- PasswordResetEmailSent
- PasswordResetEmailFailed
- PasswordResetWithTemporaryToken
- PasswordResetRejectedDueToDuplicatePassword
- AccountDeletionRequested
- AdminAccountDeletionEvaluated
- AccountDeleted
- AccountDeletionRejectedDueToPasswordMismatch
- AccountDeletionRejectedDueToUnauthorizedUser
- AccountDeletionRejectedDueToLastAdmin
- SiteDeletedWithLastAccount
변경 이력
| 버전 | 날짜 | 작성자 | 변경 내용 |
|---|---|---|---|
| 0.58.0 | 2025-12-16 | mook@weltcorp.com | Medi, Crm 용 iam ops 작성 |
| 0.57.0 | 2025-12-15 | dalia@weltcorp.com | Event Storming 기반 도메인 모델 작성 |