gpki yml 파일 설정 수정

main
박성영 1 month ago
parent 0ea22b0678
commit 00a98a2294

@ -0,0 +1,88 @@
### GPKI 인증서 경로 설정 분석 결과
코드 내부 로직을 분석한 결과, **각 속성의 사용 방식이 다릅니다**:
---
### 📋 경로 설정 규칙
#### 1**certFilePath** (디렉토리 경로)
- **용도**: LDAP를 사용하지 않을 때 **대상 서버(target server)** 인증서를 읽기 위한 **디렉토리 경로**
- **사용 위치**: `NewGpkiUtil.java` 라인 108
```java
cert = Disk.readCert(certFilePath + File.separator + certId + ".cer");
```
- **조합 방식**: `certFilePath + File.separator + certId + ".cer"`
- 예: `c:\GPKI\Certificate\class1` + `\` + `SVR1611000006` + `.cer`
- 결과: `c:\GPKI\Certificate\class1\SVR1611000006.cer`
#### 2**envCertFilePathName, envPrivateKeyFilePathName, sigCertFilePathName, sigPrivateKeyFilePathName** (전체 경로)
- **용도**: **본인(내 시스템)** 인증서 및 개인키 파일을 읽기 위한 **전체 파일 경로**
- **사용 위치**: `NewGpkiUtil.java` 라인 57-71
```java
X509Certificate _myEnvCert = Disk.readCert(this.getEnvCertFilePathName());
PrivateKey _myEnvKey = Disk.readPriKey(this.getEnvPrivateKeyFilePathName(), this.getEnvPrivateKeyPasswd());
X509Certificate _mySigCert = Disk.readCert(this.getSigCertFilePathName());
PrivateKey _mySigKey = Disk.readPriKey(this.getSigPrivateKeyFilePathName(), this.getSigPrivateKeyPasswd());
```
- **조합 방식**: **직접 사용 (조합하지 않음)**
---
### ✅ 올바른 설정 방법
#### **방법 1: 전체 경로로 개별 설정 (현재 설정 - 권장)**
```yaml
vmis:
gpki:
certFilePath: "c:\\GPKI\\Certificate\\class1" # 대상 서버 인증서 디렉토리
envCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.cer" # 전체 경로
envPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.key" # 전체 경로
envPrivateKeyPasswd: "*sbm204221"
sigCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.cer" # 전체 경로
sigPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.key" # 전체 경로
sigPrivateKeyPasswd: "*sbm204221"
```
#### **방법 2: 파일명만 설정 (동일 디렉토리에 모든 인증서가 있는 경우)**
```yaml
vmis:
gpki:
certFilePath: "c:\\GPKI\\Certificate\\class1"
envCertFilePathName: "SVR5640020001_env.cer" # 파일명만
envPrivateKeyFilePathName: "SVR5640020001_env.key" # 파일명만
envPrivateKeyPasswd: "*sbm204221"
sigCertFilePathName: "SVR5640020001_sig.cer" # 파일명만
sigPrivateKeyFilePathName: "SVR5640020001_sig.key" # 파일명만
sigPrivateKeyPasswd: "*sbm204221"
```
> ⚠️ **주의**: 방법 2는 코드 로직상 **작동하지 않습니다**. `Disk.readCert()``Disk.readPriKey()`는 전체 경로를 요구하므로, 파일명만 제공하면 파일을 찾을 수 없습니다.
---
### 🔍 현재 설정 검증
현재 `application-dev.yml``application-prd.yml`의 설정은 **올바릅니다**:
```yaml
certFilePath: "c:\\GPKI\\Certificate\\class1" # ✅ 디렉토리 경로
envCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.cer" # ✅ 전체 경로
envPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.key" # ✅ 전체 경로
sigCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.cer" # ✅ 전체 경로
sigPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.key" # ✅ 전체 경로
```
---
### 📌 핵심 요약
| 속성 | 타입 | 사용 방식 | 예시 |
|------|------|-----------|------|
| `certFilePath` | 디렉토리 경로 | 대상 서버 인증서용 (LDAP 미사용 시) | `c:\GPKI\Certificate\class1` |
| `envCertFilePathName` | **전체 파일 경로** | 직접 사용 (조합 X) | `c:\GPKI\Certificate\class1\SVR5640020001_env.cer` |
| `envPrivateKeyFilePathName` | **전체 파일 경로** | 직접 사용 (조합 X) | `c:\GPKI\Certificate\class1\SVR5640020001_env.key` |
| `sigCertFilePathName` | **전체 파일 경로** | 직접 사용 (조합 X) | `c:\GPKI\Certificate\class1\SVR5640020001_sig.cer` |
| `sigPrivateKeyFilePathName` | **전체 파일 경로** | 직접 사용 (조합 X) | `c:\GPKI\Certificate\class1\SVR5640020001_sig.key` |
**결론**: 현재 설정처럼 **모든 인증서/키 파일 경로를 전체 경로로 설정**하는 것이 정확합니다. `certFilePath`만 디렉토리 경로로 사용되며, 나머지는 전체 파일 경로입니다.

@ -61,7 +61,7 @@ vmis:
system:
infoSysId: "41-345" # 정보시스템 ID
infoSysIp: "105.19.10.135" # 정보시스템 IP 주소
sigunguCode: "41460" # 시군구 코드 (화성시)
sigunguCode: "41460" # 시군구 코드 (경기도 용인시)
departmentCode: "" # 부서 코드
chargerId: "" # 담당자 ID
chargerIp: "" # 담당자 IP 주소
@ -71,15 +71,15 @@ vmis:
useSign: true # 서명 사용 여부
charset: "UTF-8" # 문자셋 인코딩
certServerId: "SVR5640020001" # 인증서 서버 ID (요청 시스템)
targetServerId: "SVR1500000015" # 대상 서버 ID (차세대교통안전공단)
targetServerId: "SVR1611000006" # 대상 서버 ID (차세대교통안전공단)
ldap: true # LDAP 사용 여부
gpkiLicPath: "src/GPKI/conf" # GPKI 라이선스 파일 경로
certFilePath: "src/GPKI/certs" # 인증서 파일 디렉토리 경로
envCertFilePathName: "src/GPKI/certs/SVR5640020001_env.cer" # 암호화용 인증서 파일 경로
envPrivateKeyFilePathName: "src/GPKI/certs/SVR5640020001_env.key" # 암호화용 개인키 파일 경로
gpkiLicPath: "C:\\GPKI\\Lic" # GPKI 라이선스 파일 경로
certFilePath: "c:\\GPKI\\Certificate\\class1" # 인증서 파일 디렉토리 경로
envCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.cer" # 암호화용 인증서 파일 경로
envPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.key" # 암호화용 개인키 파일 경로
envPrivateKeyPasswd: "*sbm204221" # 암호화용 개인키 비밀번호
sigCertFilePathName: "src/GPKI/certs/SVR5640020001_sig.cer" # 서명용 인증서 파일 경로
sigPrivateKeyFilePathName: "src/GPKI/certs/SVR5640020001_sig.key" # 서명용 개인키 파일 경로
sigCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.cer" # 서명용 인증서 파일 경로
sigPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.key" # 서명용 개인키 파일 경로
sigPrivateKeyPasswd: "*sbm204221" # 서명용 개인키 비밀번호
gov:
scheme: "http" # 프로토콜 (http/https)

@ -62,7 +62,7 @@ vmis:
system:
infoSysId: "41-345" # 정보시스템 ID
infoSysIp: "105.19.10.135" # 정보시스템 IP 주소
sigunguCode: "41460" # 시군구 코드 (화성시)
sigunguCode: "41460" # 시군구 코드 (경기도 용인시)
departmentCode: "" # 부서 코드
chargerId: "" # 담당자 ID
chargerIp: "" # 담당자 IP 주소
@ -71,16 +71,16 @@ vmis:
enabled: "Y" # GPKI 사용 여부 (운영환경에서는 활성화)
useSign: true # 서명 사용 여부
charset: "UTF-8" # 문자셋 인코딩
certServerId: "SVR5640020001" # 인증서 서버 ID (요청 시스템) - 운영 인증서 ID로 교체
targetServerId: "SVR1500000015" # 대상 서버 ID (차세대교통안전공단)
certServerId: "SVR5640020001" # 인증서 서버 ID (요청 시스템)
targetServerId: "SVR1611000006" # 대상 서버 ID (차세대교통안전공단)
ldap: true # LDAP 사용 여부
gpkiLicPath: "src/GPKI/conf" # GPKI 라이선스 파일 경로
certFilePath: "src/GPKI/certs" # 인증서 파일 디렉토리 경로
envCertFilePathName: "src/GPKI/certs/SVR5640020001_env.cer" # 암호화용 인증서 파일 경로
envPrivateKeyFilePathName: "src/GPKI/certs/SVR5640020001_env.key" # 암호화용 개인키 파일 경로
gpkiLicPath: "C:\\GPKI\\Lic" # GPKI 라이선스 파일 경로
certFilePath: "c:\\GPKI\\Certificate\\class1" # 인증서 파일 디렉토리 경로
envCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.cer" # 암호화용 인증서 파일 경로
envPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_env.key" # 암호화용 개인키 파일 경로
envPrivateKeyPasswd: "*sbm204221" # 암호화용 개인키 비밀번호
sigCertFilePathName: "src/GPKI/certs/SVR5640020001_sig.cer" # 서명용 인증서 파일 경로
sigPrivateKeyFilePathName: "src/GPKI/certs/SVR5640020001_sig.key" # 서명용 개인키 파일 경로
sigCertFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.cer" # 서명용 인증서 파일 경로
sigPrivateKeyFilePathName: "c:\\GPKI\\Certificate\\class1\\SVR5640020001_sig.key" # 서명용 개인키 파일 경로
sigPrivateKeyPasswd: "*sbm204221" # 서명용 개인키 비밀번호
gov:
scheme: "http" # 프로토콜 (http/https)

Loading…
Cancel
Save