Compare commits
16 commits
forge/runt
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ad341ae12 | |||
| e7766c6ba5 | |||
| 376786dd55 | |||
| 5a42946820 | |||
| 0469100bfe | |||
| 506761b978 | |||
| 89d0288b3d | |||
| cd04f9101b | |||
| c985f6e7bf | |||
| bd8b77feac | |||
| 3ef86bf9bf | |||
| db7ead282c | |||
| bf7772d6df | |||
| d927492ef4 | |||
| 3c1983a8d0 | |||
| 0d99314574 |
12 changed files with 356 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
# runtime-role-matrix-live-20260714101723-v7-aa-001-attempt-2-run-b63a6a7e452e
|
||||
|
||||
Forge 이슈 작업 브랜치 `forge/runtime-role-matrix-live-20260714101723-v7-aa-001-attempt-2-run-b63a6a7e452e`.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# runtime-role-matrix-live-20260714101723-v7-developer-001-attempt-1-run-e27e8d6f28aa
|
||||
|
||||
Forge 이슈 작업 브랜치 `forge/runtime-role-matrix-live-20260714101723-v7-developer-001-attempt-1-run-e27e8d6f28aa`.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# runtime-role-matrix-live-20260714101723-v7-pm-001-attempt-1-run-507b47dae85f
|
||||
|
||||
Forge 이슈 작업 브랜치 `forge/runtime-role-matrix-live-20260714101723-v7-pm-001-attempt-1-run-507b47dae85f`.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# runtime-role-matrix-live-20260714101723-v7-ta-001-attempt-2-run-8f9fb566223b
|
||||
|
||||
Forge 이슈 작업 브랜치 `forge/runtime-role-matrix-live-20260714101723-v7-ta-001-attempt-2-run-8f9fb566223b`.
|
||||
71
audit/AA_ROLE_EVIDENCE_INVENTORY.json
Normal file
71
audit/AA_ROLE_EVIDENCE_INVENTORY.json
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
"inventoryId": "AA_ROLE_EVIDENCE_INVENTORY",
|
||||
"role": "AA",
|
||||
"version": "v7",
|
||||
"generatedDate": "2026-07-14",
|
||||
"inputSources": [
|
||||
{
|
||||
"sourceId": "IS-001",
|
||||
"sourceName": "AA_ROLE_SPEC",
|
||||
"description": "AA 역할 정의 명세서",
|
||||
"location": "role-aa/specs/aa_role_spec.yaml",
|
||||
"type": "SPECIFICATION",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"sourceId": "IS-002",
|
||||
"sourceName": "PERMISSION_MATRIX",
|
||||
"description": "권한 매트릭스 문서",
|
||||
"location": "role-aa/specs/permission_matrix.json",
|
||||
"type": "MATRIX",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"sourceId": "IS-003",
|
||||
"sourceName": "WORKFLOW_DEF",
|
||||
"description": "워크플로우 정의",
|
||||
"location": "role-aa/workflows/aa_workflow.yaml",
|
||||
"type": "WORKFLOW",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"sourceId": "IS-004",
|
||||
"sourceName": "API_CONTRACT",
|
||||
"description": "API 계약 정의",
|
||||
"location": "role-aa/contracts/aa_api_contract.yaml",
|
||||
"type": "CONTRACT",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
],
|
||||
"evidenceLocations": [
|
||||
{
|
||||
"evidenceId": "EV-001",
|
||||
"sourceId": "IS-001",
|
||||
"type": "ROLE_DEFINITION",
|
||||
"verificationMethod": "스키마 검증"
|
||||
},
|
||||
{
|
||||
"evidenceId": "EV-002",
|
||||
"sourceId": "IS-002",
|
||||
"type": "PERMISSION_MATRIX",
|
||||
"verificationMethod": "매트릭스 교차 검증"
|
||||
},
|
||||
{
|
||||
"evidenceId": "EV-003",
|
||||
"sourceId": "IS-003",
|
||||
"type": "WORKFLOW_LOG",
|
||||
"verificationMethod": "실행 추적 검증"
|
||||
},
|
||||
{
|
||||
"evidenceId": "EV-004",
|
||||
"sourceId": "IS-004",
|
||||
"type": "API_CALL_LOG",
|
||||
"verificationMethod": "요청/응답 검증"
|
||||
}
|
||||
],
|
||||
"auditRequirements": {
|
||||
"versionControl": true,
|
||||
"changeTracking": true,
|
||||
"retentionPeriod": "7years"
|
||||
}
|
||||
}
|
||||
57
audit/AA_ROLE_LEGACY_ANALYSIS.md
Normal file
57
audit/AA_ROLE_LEGACY_ANALYSIS.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# AA 역할 레거시 분석 문서
|
||||
|
||||
## 개요
|
||||
- **역할**: AA
|
||||
- **분석 일자**: 2026-07-14
|
||||
- **버전**: v7
|
||||
- **분석 목적**: 레거시 전환 분석을 위한 입력 소스, 업무 규칙, 위험 영역, 증적 위치 정리
|
||||
|
||||
---
|
||||
|
||||
## 1. 입력 소스 정의
|
||||
|
||||
| ID | 소스명 | 설명 | 위치 |
|
||||
|-----|--------|------|------|
|
||||
| IS-001 | AA_ROLE_SPEC | AA 역할 정의 명세서 | role-aa/specs/aa_role_spec.yaml |
|
||||
| IS-002 | PERMISSION_MATRIX | 권한 매트릭스 문서 | role-aa/specs/permission_matrix.json |
|
||||
| IS-003 | WORKFLOW_DEF | 워크플로우 정의 | role-aa/workflows/aa_workflow.yaml |
|
||||
| IS-004 | API_CONTRACT | API 계약 정의 | role-aa/contracts/aa_api_contract.yaml |
|
||||
|
||||
---
|
||||
|
||||
## 2. 업무 규칙
|
||||
|
||||
| 규칙 ID | 규칙 내용 | 입력 소스 |
|
||||
|---------|----------|----------|
|
||||
| BR-001 | AA 역할은 관리자 권한을 포함한다 | IS-001, IS-002 |
|
||||
| BR-002 | AA 역할은 승인 워크플로우를 통과해야 한다 | IS-003 |
|
||||
| BR-003 | AA 역할의 API 호출은 인증 토큰을 필요로 한다 | IS-004 |
|
||||
|
||||
---
|
||||
|
||||
## 3. 위험 영역
|
||||
|
||||
| 위험 ID | 위험 설명 | 영향도 | 입력 소스 |
|
||||
|---------|----------|--------|----------|
|
||||
| RI-001 | 권한 상승 위험 | 높음 | IS-001, IS-002 |
|
||||
| RI-002 | 워크플로우 우회 위험 | 중간 | IS-003 |
|
||||
| RI-003 | API 인증 우회 위험 | 높음 | IS-004 |
|
||||
|
||||
---
|
||||
|
||||
## 4. 증적 위치
|
||||
|
||||
| 증적 ID | 증적 유형 | 위치 | 검증 방법 |
|
||||
|---------|----------|------|----------|
|
||||
| EV-001 | 역할 정의 | IS-001 | 스키마 검증 |
|
||||
| EV-002 | 권한 매트릭스 | IS-002 | 매트릭스 교차 검증 |
|
||||
| EV-003 | 워크플로우 로그 | IS-003 | 실행 추적 검증 |
|
||||
| EV-004 | API 호출 로그 | IS-004 | 요청/응답 검증 |
|
||||
|
||||
---
|
||||
|
||||
## 5. 감사 추적 요구사항
|
||||
|
||||
- 모든 입력 소스는 버전 관리되어야 함
|
||||
- 변경 이력은 추적 가능해야 함
|
||||
- 증적은 보존 기간 동안 유지되어야 함
|
||||
49
docs/adr/ADR-001-spring-boundary-architecture.md
Normal file
49
docs/adr/ADR-001-spring-boundary-architecture.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# ADR-001: Spring Layer Boundary Architecture
|
||||
|
||||
## Context
|
||||
|
||||
TA 역할의 Spring 기반 마이크로서비스는 역할 매트릭스 관리 기능을 제공한다. Controller-Service-Repository 패턴을 적용하되, 각 계층의 책임과 경계를 명확히 정의하여 응집도를 높이고 결합도를 낮추어야 한다. 또한 오류 처리와 트랜잭션 관리의 일관된 전략이 필요하다.
|
||||
|
||||
## Decision
|
||||
|
||||
### 1. Controller-Service-Repository 경계
|
||||
|
||||
| Layer | Responsibility | Forbidden Dependencies |
|
||||
|-------|---------------|------------------------|
|
||||
| Controller | HTTP 요청/응답 변환, 입력 검증, HTTP 상태 코드 관리 | 직접 Repository 접근 금지 |
|
||||
| Service | 비즈니스 로직, 도메인 규칙, 트랜잭션 경계 | HTTP Servlet API 직접 사용 금지 |
|
||||
| Repository | 데이터 접근, JPA 쿼리, 엔티티 매핑 | 비즈니스 로직 포함 금지 |
|
||||
|
||||
### 2. 오류 계약 (Error Contract)
|
||||
|
||||
| Scenario | HTTP Status | Response Body |
|
||||
|----------|-------------|---------------|
|
||||
| Validation Error | 400 | `{ "code": "VALIDATION_ERROR", "message": "...", "field": "..." }` |
|
||||
| Resource Not Found | 404 | `{ "code": "NOT_FOUND", "message": "...", "resourceId": "..." }` |
|
||||
| Business Rule Violation | 409 | `{ "code": "BUSINESS_ERROR", "message": "..." }` |
|
||||
| Internal Error | 500 | `{ "code": "INTERNAL_ERROR", "message": "..." }` |
|
||||
|
||||
### 3. 트랜잭션 경계
|
||||
|
||||
- **시작점**: Service Layer (public method 진입점)
|
||||
- **종료점**: Service Layer (public method 종료점)
|
||||
- **전파**: `@Transactional(propagation = REQUIRED)` 기본값 사용
|
||||
- **읽기 전용**: 조회 전용 Service Method에 `@Transactional(readOnly = true)` 적용
|
||||
|
||||
## Alternatives
|
||||
|
||||
1. **TransactionTemplate 사용**: 프로그래밍 방식 트랜잭션 관리로 더 세밀한 제어 가능하나, 선언적 방식 대비 복잡성 증가
|
||||
2. **Controller에서 트랜잭션 관리**: 테스트 용이성 감소, 단일 책임 원칙 위반
|
||||
3. **Repository에서 비즈니스 로직 포함**: 데이터 접근 계층의 재사용성 저하
|
||||
|
||||
## Consequences
|
||||
|
||||
### Positive
|
||||
- 계층별 단일 책임 원칙 준수
|
||||
- 일관된 오류 처리로 API consumers 보호
|
||||
- 트랜잭션 경계 명확화로 데이터 무결성 보장
|
||||
- 테스트 용이성 향상 (Mock 주입 용이)
|
||||
|
||||
### Negative
|
||||
- 간단한 CRUD 연산에도 Service Layer 필요로 인한 코드 증가
|
||||
- 트랜잭션 경계 설정 오류 시 롤백 누락 위험
|
||||
39
pom.xml
Normal file
39
pom.xml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.2.5</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>developer-role-smoke</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>Developer Role Smoke Test</name>
|
||||
<description>Spring Boot smoke application for Developer role</description>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
69
role-pm/HANDOVER.md
Normal file
69
role-pm/HANDOVER.md
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# PM 역할 인수인계 문서
|
||||
|
||||
**프로젝트**: runtime-role-matrix-live-20260714101723-v7
|
||||
**작성일**: 2025-07-14
|
||||
**버전**: v7
|
||||
|
||||
---
|
||||
|
||||
## 1. 프로젝트 목표
|
||||
|
||||
| 목표 | 설명 |
|
||||
|------|------|
|
||||
| 핵심 | 런타임 역할 매트릭스 라이브 데모 시스템 구축 및 운영 |
|
||||
| 세부 | 역할 기반 접근 제어(RBAC) 매트릭스를 런타임에 동적 렌더링하는 시스템 |
|
||||
| 기대산출물 | 설정 파일 기반 역할-권한 매핑, 실시간 UI 갱신, smoke 테스트 통과 |
|
||||
|
||||
---
|
||||
|
||||
## 2. 완료 기준
|
||||
|
||||
- [ ] 역할 매트릭스 설정 파일(JSON/YAML) 파싱 정상 동작
|
||||
- [ ] 런타임 시 역할-권한 매핑 동적 로딩
|
||||
- [ ] UI 컴포넌트에서 매트릭스 렌더링 확인
|
||||
- [ ] smoke 테스트 100% 통과
|
||||
- [ ] 빌드 산출물 생성 및 배포 가능 상태
|
||||
|
||||
---
|
||||
|
||||
## 3. 위험 (Risks)
|
||||
|
||||
| ID | 위험 항목 | 영향 | 완화 방안 |
|
||||
|----|-----------|------|----------|
|
||||
| R-01 | 역할 매트릭스 설정 변경 시 런타임 반영 지연 | 중간 | 설정 변경 감시(watch) 모드 구현 |
|
||||
| R-02 | 권한 검증 로직 누락 가능성 | 높음 | 단위 테스트 커버리지 80% 이상 확보 |
|
||||
| R-03 | 동시 접근 시 데이터 정합성 | 중간 | 락(lock) 또는 트랜잭션 처리 검토 |
|
||||
| R-04 | 의존성 버전 충돌 | 낮음 | BOM 기반 명시적 버전 관리 |
|
||||
|
||||
---
|
||||
|
||||
## 4. 다음 액션 (Next Actions)
|
||||
|
||||
| 순서 | 액션 | 담당 | 기한 |
|
||||
|------|------|------|------|
|
||||
| 1 | smoke 테스트 실행 및 결과 공유 | PM | D+1 |
|
||||
| 2 | 역할 매트릭스 설정 파일 스키마 확정 | PM | D+2 |
|
||||
| 3 | 런타임 갱신 메커니즘 설계안 검토 | PM | D+3 |
|
||||
| 4 | 위험 R-02 관련 테스트 커버리지 보고서 확인 | PM | D+5 |
|
||||
| 5 | 인수인계 완료 보고서 제출 | PM | D+7 |
|
||||
|
||||
---
|
||||
|
||||
## 5. 주요 의사결정 로그
|
||||
|
||||
| 일자 | 결정 | 사유 |
|
||||
|------|------|------|
|
||||
| 2025-07-14 | BOM 기반 의존성 관리 채택 | 일관된 버전 관리 및 충돌 방지 |
|
||||
| 2025-07-14 | smoke 테스트 우선 통과 전략 | 빠른 피드백 루프 확보 |
|
||||
|
||||
---
|
||||
|
||||
## 6. 연락처 및 참고자료
|
||||
|
||||
- **이전 PM**: role-pm 컨텍스트 참조
|
||||
- **문서 위치**: `role-pm/HANDOVER.md`
|
||||
- **테스트 명령**: `mvn test` (Maven 기준)
|
||||
|
||||
---
|
||||
|
||||
*본 문서는 프로젝트 인수인계 시 작성되며, 후임 PM이 참조해야 할 핵심 정보를 포함함.*
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.example.developer;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DeveloperApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DeveloperApplication.class, args);
|
||||
}
|
||||
}
|
||||
15
src/main/java/com/example/developer/DeveloperService.java
Normal file
15
src/main/java/com/example/developer/DeveloperService.java
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package com.example.developer;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DeveloperService {
|
||||
|
||||
public String getRole() {
|
||||
return "Developer";
|
||||
}
|
||||
|
||||
public boolean isValidRole(String role) {
|
||||
return "Developer".equals(role);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.example.developer;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@SpringBootTest
|
||||
class DeveloperServiceTest {
|
||||
|
||||
@Autowired
|
||||
private DeveloperService developerService;
|
||||
|
||||
@Test
|
||||
void getRole_returnsDeveloper() {
|
||||
String role = developerService.getRole();
|
||||
assertTrue("Developer".equals(role), "Role should be Developer");
|
||||
}
|
||||
|
||||
@Test
|
||||
void isValidRole_withDeveloper_returnsTrue() {
|
||||
boolean valid = developerService.isValidRole("Developer");
|
||||
assertTrue(valid, "Developer role should be valid");
|
||||
}
|
||||
|
||||
@Test
|
||||
void isValidRole_withOtherRole_returnsFalse() {
|
||||
boolean valid = developerService.isValidRole("Admin");
|
||||
assertTrue(!valid, "Admin role should not be valid for DeveloperService");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue