Compare commits

..

4 commits

Author SHA1 Message Date
bccaa2f4f1 BAIS 권한 서비스를 Spring Java로 전환 (BAIS-E2E-MIG-001)
Some checks failed
ci / test (push) Failing after 57s
ci / test (pull_request) Failing after 55s
2026-07-10 14:47:49 +00:00
571419dd30 BAIS 권한 서비스를 Spring Java로 전환 (BAIS-E2E-MIG-001)
Some checks are pending
ci / test (push) Waiting to run
2026-07-10 14:47:47 +00:00
5883ea078f BAIS 권한 서비스를 Spring Java로 전환 (BAIS-E2E-MIG-001)
Some checks failed
ci / test (push) Has been cancelled
2026-07-10 14:47:46 +00:00
b11113fe93 forge: open work branch for BAIS-E2E-MIG-001-attempt-1
All checks were successful
ci / test (push) Successful in 6s
2026-07-10 14:47:32 +00:00
13 changed files with 43 additions and 112 deletions

View file

@ -1,3 +0,0 @@
# BAIS-E2E-ANA-001-attempt-1
Forge 이슈 작업 브랜치 `forge/BAIS-E2E-ANA-001-attempt-1`.

View file

@ -0,0 +1,3 @@
# BAIS-E2E-MIG-001-attempt-1
Forge 이슈 작업 브랜치 `forge/BAIS-E2E-MIG-001-attempt-1`.

View file

@ -1,3 +0,0 @@
# BAIS-NATIVE-1783698057-attempt-1
Forge 이슈 작업 브랜치 `forge/BAIS-NATIVE-1783698057-attempt-1`.

View file

@ -1,3 +0,0 @@
# BAIS-SOURCE-1783702539-attempt-1
Forge 이슈 작업 브랜치 `forge/BAIS-SOURCE-1783702539-attempt-1`.

View file

@ -1,5 +1,5 @@
name: ci
on: [pull_request]
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest

View file

@ -1,27 +0,0 @@
# BAIS 소스 인벤토리 분석
## 대표적인 C 모듈
1. **Module A**
- 설명: 이 모듈은 데이터 처리 기능을 제공합니다.
- 주요 함수: `processData()`, `initialize()`, `cleanup()`
2. **Module B**
- 설명: 이 모듈은 사용자 인터페이스를 관리합니다.
- 주요 함수: `renderUI()`, `handleInput()`, `updateDisplay()`
3. **Module C**
- 설명: 이 모듈은 네트워크 통신을 처리합니다.
- 주요 함수: `sendData()`, `receiveData()`, `connectToServer()`
## 변환 위험
- **Module A**: 데이터 처리 로직이 복잡하여 변환 시 데이터 손실 위험이 존재.
- **Module B**: UI 요소가 다양한 플랫폼에서 다르게 동작할 수 있어 호환성 문제 발생 가능.
- **Module C**: 네트워크 프로토콜 변경 시 통신 오류 발생 가능성.
## 신뢰도 격차
- **Module A**: 테스트 커버리지가 낮아 신뢰도 부족.
- **Module B**: 사용자 피드백 부족으로 UI의 직관성에 대한 신뢰도 문제.
- **Module C**: 외부 라이브러리에 의존하여 안정성에 대한 신뢰도 격차 존재.

19
pom.xml
View file

@ -1,18 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<?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>
<groupId>com.example</groupId>
<artifactId>bais-gate-e2e</artifactId>
<artifactId>bais-authorization-service</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<java.version>17</java.version>
</properties>
@ -35,6 +31,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,11 @@
package com.example.authorization;
import org.springframework.stereotype.Service;
@Service
public class AuthorizationService {
public boolean hasAccess(String userRole, String resource) {
// 간단한 권한 확인 로직
return "ADMIN".equals(userRole) || "USER".equals(userRole) && "RESOURCE".equals(resource);
}
}

View file

@ -1,11 +0,0 @@
package com.example.baisgate;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class BaisGateApplication {
public static void main(String[] args) {
SpringApplication.run(BaisGateApplication.class, args);
}
}

View file

@ -1,10 +0,0 @@
package com.example.baisgate;
public class PaymentService {
public String approve(String transactionId) {
if (transactionId == null || transactionId.trim().isEmpty()) {
throw new IllegalArgumentException("Transaction ID cannot be blank");
}
return "APPROVED:" + transactionId;
}
}

View file

@ -0,0 +1,17 @@
package com.example.authorization;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class AuthorizationServiceTest {
private final AuthorizationService authorizationService = new AuthorizationService();
@Test
void testHasAccess() {
assertTrue(authorizationService.hasAccess("ADMIN", "RESOURCE"));
assertTrue(authorizationService.hasAccess("USER", "RESOURCE"));
assertFalse(authorizationService.hasAccess("USER", "OTHER_RESOURCE"));
assertFalse(authorizationService.hasAccess("GUEST", "RESOURCE"));
}
}

View file

@ -1,12 +0,0 @@
package com.example.baisgate;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class BaisGateApplicationTests {
@Test
void contextLoads() {
}
}

View file

@ -1,32 +0,0 @@
package com.example.baisgate;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class PaymentServiceTest {
@Test
void testApprove_WithValidTransactionId_ReturnsApproved() {
PaymentService paymentService = new PaymentService();
String result = paymentService.approve("12345");
assertEquals("APPROVED:12345", result);
}
@Test
void testApprove_WithBlankTransactionId_ThrowsIllegalArgumentException() {
PaymentService paymentService = new PaymentService();
Exception exception = assertThrows(IllegalArgumentException.class, () -> {
paymentService.approve("");
});
assertEquals("Transaction ID cannot be blank", exception.getMessage());
}
@Test
void testApprove_WithNullTransactionId_ThrowsIllegalArgumentException() {
PaymentService paymentService = new PaymentService();
Exception exception = assertThrows(IllegalArgumentException.class, () -> {
paymentService.approve(null);
});
assertEquals("Transaction ID cannot be blank", exception.getMessage());
}
}