improvement: APNs p12 인증서 지원 추가 (#214) #215

Merged
seonkyu.kim merged 1 commits from improvement/#214-apns-p12-support into develop 2026-02-25 04:04:14 +00:00
Owner

📋 작업 요약

  • iOS APNs p12 인증서 지원 추가 (기존 p8만 지원 → p8/p12 분기)
  • AuthType 기반 자격증명 검증/저장/조회 분기 구현
  • p12 인증서 만료일 자동 추출 (X509CertificateLoader)
  • AuthType 전환 시 이전 타입 필드 자동 초기화

Closes #214

🛠️ 작업 내용 (Changes)

  • SPMS.Domain/Entities/Service.cs — ApnsAuthType, ApnsCertificate, ApnsCertPassword, ApnsCertExpiresAt 4개 컬럼 추가
  • SPMS.Infrastructure/Persistence/Configurations/ServiceConfiguration.cs — EF Core 매핑 추가
  • SPMS.Infrastructure/Migrations/AddApnsP12Support — DB Migration 생성/적용
  • SPMS.Application/DTOs/Service/ApnsCredentialsRequestDto.cs — AuthType + p12 필드 추가, p8 필드 nullable 변경
  • SPMS.Application/DTOs/Service/RegisterServiceRequestDto.cs — ApnsCredentialDto 동일 구조 확장
  • SPMS.Application/DTOs/Service/CredentialsResponseDto.cs — AuthType, HasCertificate, CertExpiresAt 응답 필드 추가
  • SPMS.Application/Services/ServiceManagementService.cs — ValidateApnsP8/P12 분기, RegisterApns/Register AuthType 분기, GetCredentials p12 메타 반환
  • SPMS.API/Controllers/ServiceController.cs — Swagger Description에 p8/p12 분기 설명 추가

📢 리뷰어 참고 사항 (To Reviewers)

  • p12 인증서는 JSON body에 Base64 문자열로 전송 (프론트에서 FileReader → Base64)
  • p12 비밀번호는 _credentialEncryptionService.Encrypt()로 암호화 저장
  • .NET 9 권장 API인 X509CertificateLoader.LoadPkcs12() 사용 (deprecated X509Certificate2 생성자 대신)
  • Android(FCM) 로직은 변경 없음

체크리스트 (Self Checklist)

  • 빌드(Build)가 성공적으로 수행되었는가?
  • 모든 단위 테스트(Unit Test)를 통과하였는가?
  • 불필요한 로그나 주석을 제거하였는가?
  • 컨벤션(Clean Architecture, Naming)을 준수하였는가?
  • 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가?

📸 스크린샷 / 테스트 로그 (Screenshots/Logs)

빌드했습니다.
    경고 0개
    오류 0개
## 📋 작업 요약 - iOS APNs p12 인증서 지원 추가 (기존 p8만 지원 → p8/p12 분기) - AuthType 기반 자격증명 검증/저장/조회 분기 구현 - p12 인증서 만료일 자동 추출 (X509CertificateLoader) - AuthType 전환 시 이전 타입 필드 자동 초기화 ## 🔗 관련 이슈 (Related Issues) Closes #214 ## 🛠️ 작업 내용 (Changes) - [x] `SPMS.Domain/Entities/Service.cs` — ApnsAuthType, ApnsCertificate, ApnsCertPassword, ApnsCertExpiresAt 4개 컬럼 추가 - [x] `SPMS.Infrastructure/Persistence/Configurations/ServiceConfiguration.cs` — EF Core 매핑 추가 - [x] `SPMS.Infrastructure/Migrations/AddApnsP12Support` — DB Migration 생성/적용 - [x] `SPMS.Application/DTOs/Service/ApnsCredentialsRequestDto.cs` — AuthType + p12 필드 추가, p8 필드 nullable 변경 - [x] `SPMS.Application/DTOs/Service/RegisterServiceRequestDto.cs` — ApnsCredentialDto 동일 구조 확장 - [x] `SPMS.Application/DTOs/Service/CredentialsResponseDto.cs` — AuthType, HasCertificate, CertExpiresAt 응답 필드 추가 - [x] `SPMS.Application/Services/ServiceManagementService.cs` — ValidateApnsP8/P12 분기, RegisterApns/Register AuthType 분기, GetCredentials p12 메타 반환 - [x] `SPMS.API/Controllers/ServiceController.cs` — Swagger Description에 p8/p12 분기 설명 추가 ## 📢 리뷰어 참고 사항 (To Reviewers) - p12 인증서는 JSON body에 Base64 문자열로 전송 (프론트에서 FileReader → Base64) - p12 비밀번호는 `_credentialEncryptionService.Encrypt()`로 암호화 저장 - .NET 9 권장 API인 `X509CertificateLoader.LoadPkcs12()` 사용 (deprecated X509Certificate2 생성자 대신) - Android(FCM) 로직은 변경 없음 ## ✅ 체크리스트 (Self Checklist) - [x] 빌드(Build)가 성공적으로 수행되었는가? - [x] 모든 단위 테스트(Unit Test)를 통과하였는가? - [x] 불필요한 로그나 주석을 제거하였는가? - [x] 컨벤션(Clean Architecture, Naming)을 준수하였는가? - [x] 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가? ## 📸 스크린샷 / 테스트 로그 (Screenshots/Logs) ``` 빌드했습니다. 경고 0개 오류 0개 ```
seonkyu.kim added 1 commit 2026-02-25 04:02:25 +00:00
- Service 엔티티에 ApnsAuthType/ApnsCertificate/ApnsCertPassword/ApnsCertExpiresAt 추가
- EF Core Configuration + Migration (AddApnsP12Support)
- DTO: AuthType 분기 (p8/p12) 지원, p12 필드 추가
- 서비스 로직: AuthType별 검증/저장/조회 분기, X509CertificateLoader로 만료일 추출
- AuthType 전환 시 이전 타입 필드 null 초기화
- 컨트롤러 Swagger Description 업데이트

Closes #214
seonkyu.kim added the
Priority
Medium
Status
In Progress
Type
Improvement
labels 2026-02-25 04:02:39 +00:00
seonkyu.kim self-assigned this 2026-02-25 04:02:41 +00:00
seonkyu.kim added this to the Phase 1: 서비스 도메인 milestone 2026-02-25 04:02:46 +00:00
seonkyu.kim requested review from Owners 2026-02-25 04:02:54 +00:00
seonkyu.kim merged commit e50f3f186c into develop 2026-02-25 04:04:14 +00:00
seonkyu.kim deleted branch improvement/#214-apns-p12-support 2026-02-25 04:04:38 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-25 04:05:16 +00:00
Sign in to join this conversation.
No description provided.