diff --git a/role-aa/audit/business-rules.json b/role-aa/audit/business-rules.json new file mode 100644 index 0000000..061bb6f --- /dev/null +++ b/role-aa/audit/business-rules.json @@ -0,0 +1,115 @@ +{ + "document_id": "role-aa-business-rules-v1", + "role": "AA", + "created_date": "2026-07-14", + "version": "v1", + "business_rules": [ + { + "id": "BR-001", + "name": "역할 식별", + "description": "AA 역할은 고유 ID로 식별된다", + "validation_criteria": [ + "ID != null", + "ID > 0", + "ID is unique" + ], + "test_cases": [ + { + "tc_id": "TC-BR001-01", + "input": "ID = null", + "expected": "ValidationError" + }, + { + "tc_id": "TC-BR001-02", + "input": "ID = 0", + "expected": "ValidationError" + }, + { + "tc_id": "TC-BR001-03", + "input": "ID = 1", + "expected": "Valid" + } + ] + }, + { + "id": "BR-002", + "name": "권한 검증", + "description": "AA 역할은 인가된 작업만 수행한다", + "validation_criteria": [ + "auth_token != null", + "auth_token is valid", + "auth_token not expired" + ], + "test_cases": [ + { + "tc_id": "TC-BR002-01", + "input": "auth_token = null", + "expected": "UnauthorizedError" + }, + { + "tc_id": "TC-BR002-02", + "input": "auth_token = expired_token", + "expected": "TokenExpiredError" + }, + { + "tc_id": "TC-BR002-03", + "input": "auth_token = valid_token", + "expected": "Authorized" + } + ] + }, + { + "id": "BR-003", + "name": "상태 관리", + "description": "AA 역할은 유효한 상태만 가진다", + "validation_criteria": [ + "state ∈ {ACTIVE, INACTIVE, SUSPENDED}" + ], + "test_cases": [ + { + "tc_id": "TC-BR003-01", + "input": "state = 'ACTIVE'", + "expected": "Valid" + }, + { + "tc_id": "TC-BR003-02", + "input": "state = 'INACTIVE'", + "expected": "Valid" + }, + { + "tc_id": "TC-BR003-03", + "input": "state = 'SUSPENDED'", + "expected": "Valid" + }, + { + "tc_id": "TC-BR003-04", + "input": "state = 'UNKNOWN'", + "expected": "ValidationError" + } + ] + }, + { + "id": "BR-004", + "name": "감사 로깅", + "description": "모든 작업은 감사 로그에 기록된다", + "validation_criteria": [ + "log_entry != null", + "log_entry.timestamp != null", + "log_entry.action != null", + "log_entry.actor != null" + ], + "test_cases": [ + { + "tc_id": "TC-BR004-01", + "input": "action without log", + "expected": "AuditLogCreated" + }, + { + "tc_id": "TC-BR004-02", + "input": "log_entry missing timestamp", + "expected": "ValidationError" + } + ] + } + ] +}