Commit Graph

216 Commits

Author SHA1 Message Date
15a2dd66e5 improvement: 메시지 발송 상태 집계 규칙 고정 (#178)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/228
2026-02-25 06:11:46 +00:00
SEAN
46a2105c13 improvement: 메시지 발송 상태 집계 규칙 고정 (#178)
Closes #178
2026-02-25 15:09:01 +09:00
a08f0a958c improvement: 메시지 상세/프리뷰 응답 강화 (#226)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/227
2026-02-25 05:51:18 +00:00
SEAN
0eacf25eb3 improvement: 메시지 상세/프리뷰 응답 강화 (#226)
- MessageInfoResponseDto에 service_name, service_code, created_by_name, latest_send_status 추가
- MessagePreviewRequestDto/ResponseDto에 JsonPropertyName snake_case 적용
- MessagePreviewResponseDto에 link_type 필드 추가
- Repository에 GetByMessageCodeWithDetailsAsync (Navigation Include), GetSendStatsAsync 추가
- MessageService.GetInfoAsync에서 서비스/작성자/발송상태 매핑
- MessageService.PreviewAsync에서 link_type 반환

Closes #226
2026-02-25 14:43:29 +09:00
d21fb7c883 improvement: 메시지 목록 확장 (#224)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/225
2026-02-25 05:31:08 +00:00
SEAN
011cb9b380 improvement: 메시지 목록 확장 (#224)
- ServiceCodeMiddleware: message/list를 OPTIONAL_FOR_ADMIN에 추가
- MessageListRequestDto: service_code, send_status 필터 필드 추가
- MessageSummaryDto: service_name, service_code, latest_send_status 추가
- IMessageRepository + MessageRepository: GetPagedForListAsync 구현
  (Service 조인 + PushSendLog 집계 한 번의 쿼리)
- IMessageService + MessageService: serviceId nullable 변경, DetermineSendStatus 헬퍼
- MessageController: GetServiceIdOrNull() 헬퍼 + Swagger 업데이트

Closes #224
2026-02-25 14:28:09 +09:00
b9b3fa2fc0 improvement: 메시지 저장/검증 계약 통일 (#222)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/223
2026-02-25 05:10:22 +00:00
SEAN
b373d59710 improvement: 메시지 저장/검증 계약 통일 (#222)
- MessageValidateRequestDto에 JsonPropertyName 추가 (snake_case 통일)
- MessageValidateRequestDto.Data 타입 string? → object? 변경
- MessageValidationService.ValidateData 파라미터 타입 변경
- Swagger Description 업데이트 (save/validate 엔드포인트)

Closes #222
2026-02-25 14:06:54 +09:00
fecd322763 improvement: API Key 마스킹 및 전체 조회 엔드포인트 추가 (#220)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/221
2026-02-25 04:58:10 +00:00
SEAN
351135549e improvement: API Key 마스킹 및 전체 조회 엔드포인트 추가 (#220)
- 상세 조회 시 API Key 마스킹 (앞 8자 + ********)
- API Key 전체 조회 엔드포인트 신규 (apikey/view)
- 기존 재발급 엔드포인트 (apikey/refresh) 유지
- Swagger Description 업데이트

Closes #220
2026-02-25 13:56:59 +09:00
c20025e181 improvement: 수정/삭제/진단 계약 확장 (#218)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/219
2026-02-25 04:38:10 +00:00
SEAN
17caeb08e2 improvement: 수정/삭제/진단 계약 확장 (#218)
- 플랫폼 자격증명 삭제 API 추가 (APNs/FCM 각각)
- 자격증명 진단 응답에 credentialStatus/statusReason 추가
- 수정 API에 Status 필드 추가 (원자적 상태 변경)
- Swagger Description 업데이트

Closes #218
2026-02-25 13:36:47 +09:00
044ebc17d0 improvement: 서비스 목록/상세 응답에 플랫폼 상태 판정 추가 (#216)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/217
2026-02-25 04:23:52 +00:00
SEAN
e3ed3d4267 improvement: 서비스 목록/상세 응답에 플랫폼 상태 판정 추가 (#216)
- PlatformSummaryDto / PlatformCredentialSummaryDto 신규 생성
- ServiceSummaryDto에 Platforms 필드 추가 (목록 응답)
- ServiceResponseDto에 ApnsAuthType + Platforms 필드 추가 (상세 응답)
- BuildPlatformSummary 메서드로 Android/iOS 상태 판정
  - Android: FcmCredentials 유무 → ok/none
  - iOS p8: → ok
  - iOS p12: 만료됨→error, 30일 이내→warn, 그 외→ok
- Swagger Description 업데이트

Closes #216
2026-02-25 13:21:30 +09:00
e50f3f186c improvement: APNs p12 인증서 지원 추가 (#214)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/215
2026-02-25 04:04:12 +00:00
SEAN
d051ff3b97 improvement: APNs p12 인증서 지원 추가 (#214)
- Service 엔티티에 ApnsAuthType/ApnsCertificate/ApnsCertPassword/ApnsCertExpiresAt 추가
- EF Core Configuration + Migration (AddApnsP12Support)
- DTO: AuthType 분기 (p8/p12) 지원, p12 필드 추가
- 서비스 로직: AuthType별 검증/저장/조회 분기, X509CertificateLoader로 만료일 추출
- AuthType 전환 시 이전 타입 필드 null 초기화
- 컨트롤러 Swagger Description 업데이트

Closes #214
2026-02-25 13:01:55 +09:00
06d2f6d023 improvement: 서비스 통합 등록 플로우 구현 (#212)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/213
2026-02-25 03:34:31 +00:00
SEAN
4916488175 improvement: 서비스 통합 등록 플로우 구현 (#212)
- POST /v1/in/service/register 통합 등록 엔드포인트 추가
- RegisterServiceRequestDto/ResponseDto 신규 생성
- 서비스 생성 + FCM/APNs 자격증명을 트랜잭션으로 원자성 보장
- 검증 로직 private 메서드 추출 (기존 코드 재사용)
- 자격증명은 선택사항, 검증 실패 시 전체 롤백

Closes #212
2026-02-25 12:26:45 +09:00
a44f023027 improvement: 서비스명 중복 확인 API 및 ID 정책 보강 (#210)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/211
2026-02-25 03:17:39 +00:00
SEAN
4577d8c10d improvement: 서비스명 중복 확인 API 및 전용 에러코드 추가 (#210)
- POST /v1/in/service/name/check 엔드포인트 추가
- ServiceNameDuplicate(134) 에러코드 추가
- CreateAsync/UpdateAsync 서비스명 중복 에러코드 변경
- CreateServiceRequestDto MinimumLength=2 검증 추가

Closes #210
2026-02-25 12:15:28 +09:00
7c9939787e improvement: 인증 보안 정책 — Rate Limit + 시도제한 + 보안 로깅 (#190)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/209
2026-02-25 02:59:52 +00:00
SEAN
42aa04f58e improvement: 인증 보안 정책 — Rate Limit + 시도제한 + 보안 로깅 (#190)
- auth_sensitive 명명 Rate Limit 정책 추가 (20회/15분/IP)
- AuthController 3개 + PasswordController 2개 메서드에 EnableRateLimiting 적용
- 로그인 시도 제한 구현 (5회/15분, Redis 카운터, LoginAttemptExceeded 에러코드 활성화)
- 비밀번호 찾기/임시 비밀번호 요청 제한 (3회/1시간, silent 반환)
- AuthService 보안 이벤트 구조적 로깅 (ILogger 주입)
- Swagger 429 응답 문서화

Closes #190
2026-02-25 11:13:49 +09:00
09831ebcbf improvement: 임시 비밀번호 발급 및 강제변경 플로우 구현 (#207)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/208
2026-02-25 01:52:51 +00:00
SEAN
3acae06ed1 improvement: 임시 비밀번호 발급 및 강제변경 플로우 구현 (#207)
- Admin 엔티티에 MustChangePassword, TempPasswordIssuedAt 필드 추가
- POST /v1/in/account/password/temp 엔드포인트 추가
- 임시비밀번호 생성(12자, 영대소+숫자+특수) 및 메일 발송
- 로그인 시 CHANGE_PASSWORD 분기 추가 (VERIFY_EMAIL > CHANGE_PASSWORD > GO_DASHBOARD)
- 비밀번호 변경 시 MustChangePassword 플래그 자동 해제
- LoginResponseDto에 must_change_password 필드 추가
- EF Core 마이그레이션 생성 및 적용

Closes #207
2026-02-25 10:51:37 +09:00
b6008fb657 improvement: 이메일 인증/재전송 강화 (#205)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/206
2026-02-25 01:40:55 +00:00
SEAN
3cc99c0284 improvement: 이메일 인증/재전송 강화 (#205)
- verify API: verifySessionId 기반 입력 지원 (email 하위호환)
- verify API: 시도 횟수 5회 제한 (30분 TTL)
- verify API: 응답에 verified, nextAction 필드 추가
- resend API 신규: POST /v1/in/auth/email/verify/resend
- resend API: 60초 쿨다운, 기존 코드 자동 무효화
- email_verify TTL 1시간→5분 변경 (signup/login 포함)
- ErrorCodes 추가: VerifyResendCooldown(116), VerifyAttemptExceeded(117)

Closes #205
2026-02-25 10:38:41 +09:00
7155fb58dc improvement: 로그인 분기 계약 확장 (#177)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/204
2026-02-25 01:21:03 +00:00
SEAN
859eabd83c improvement: 로그인 분기 계약 확장 (#177)
- LoginResponseDto에 nextAction, emailVerified, verifySessionId, emailSent 추가
- 미인증 유저 로그인 시 verify session/인증코드 생성 + 메일 발송
- Swagger Description에 분기 설명 추가

Closes #177
2026-02-25 10:08:45 +09:00
512585e7e7 improvement: 가입 계약 확장 (#202)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/203
2026-02-25 00:43:59 +00:00
SEAN
8224c7a17b improvement: 가입 계약 확장 — 동의 필드/세션/메일 발송 안정화 (#202)
- Admin 엔티티에 AgreeTerms, AgreePrivacy, AgreedAt 필드 추가
- SignupRequestDto에 동의 필드 추가 (필수 검증)
- SignupResponseDto에 verifySessionId, emailSent 응답 추가
- AuthService.SignupAsync: 동의 검증, verify session 생성, 메일 발송 try-catch
- ErrorCodes에 TermsNotAgreed(114), PrivacyNotAgreed(115) 추가
- EF Core 마이그레이션 AddConsentFieldsToAdmin 생성/적용

Closes #202
2026-02-25 09:29:17 +09:00
10460b40c3 improvement: 로그아웃 시 Access Token 즉시 무효화 (#169)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/201
2026-02-24 08:35:01 +00:00
SEAN
bf8f82e66c improvement: 로그아웃 시 Access Token 즉시 무효화 (#169)
- IJwtService/JwtService에 GetTokenInfo(JTI, 만료시간 추출) 추가
- LogoutAsync에 Redis 블랙리스트 로직 추가 (key: blacklist:{jti}, TTL: 남은 만료시간)
- AuthenticationExtensions OnTokenValidated에서 블랙리스트 체크
- 로그아웃 후 동일 Access Token 재사용 시 401 반환

Closes #169
2026-02-24 17:33:37 +09:00
68fe6b91a5 improvement: 서비스 스코프 정책 고정 (#199)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/200
2026-02-24 08:17:42 +00:00
SEAN
f04eb44fff improvement: 서비스 스코프 정책 고정 (#199)
- ErrorCodes.ServiceScopeRequired("133") 추가
- SpmsException.Forbidden 팩토리 추가
- ServiceCodeMiddleware 3-카테고리 라우팅 (SKIP/REQUIRED/OPTIONAL_FOR_ADMIN)
- Swagger 필터 stats/device-list X-Service-Code optional 표시
- StatsController/DeviceController GetOptionalServiceId() 적용
- IStatsService/IDeviceService/레포지토리 시그니처 long? serviceId 변경
- StatsService/DeviceService null serviceId 전체 서비스 모드 처리

Closes #199
2026-02-24 17:11:30 +09:00
a37e57f789 improvement: 공통 응답/에러 포맷 고정 (#164)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/198
2026-02-24 07:50:14 +00:00
SEAN
4bc08715fa improvement: 공통 응답/에러 포맷 고정 (#164)
- FieldError DTO 공통화 (SPMS.Domain/Common)
- ValidationErrorData + ApiResponse.ValidationFail() 추가
- InvalidModelStateResponseFactory로 ModelState 에러 ApiResponse 변환
- Controller Unauthorized 응답 throw SpmsException으로 통일 (에러코드 102)
- MessageValidationService ValidationErrorDto → FieldError 교체

Closes #164
2026-02-24 16:24:56 +09:00
febd6f6da0 improvement: InMemoryTokenStore를 Redis 기반으로 교체 (#162)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/163
2026-02-11 02:23:06 +00:00
SEAN
74e6bd83dc improvement: InMemoryTokenStore를 Redis 기반으로 교체 (#162)
- RedisTokenStore 구현 (ITokenStore, Redis StringSet/Get/KeyDelete)
- DI 등록 변경 (InMemoryTokenStore → RedisTokenStore)
- AddMemoryCache() 제거 (더 이상 사용처 없음)

Closes #162
2026-02-11 11:20:16 +09:00
890feb9b4c improvement: DeadTokenCleanupWorker Redis 캐시 무효화 연동 (#160)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/161
2026-02-11 02:16:04 +00:00
SEAN
a6d9f2a46f improvement: DeadTokenCleanupWorker Redis 캐시 무효화 연동 (#160)
- ITokenCacheService 주입, 배치 삭제 시 Redis 캐시 무효화
- SELECT → DELETE → 캐시 무효화 순서로 변경
- TASKS.md git 트래킹 해제 (.gitignore에 이미 등록됨)

Closes #160
2026-02-11 11:13:26 +09:00
b1cac9d08a improvement: PushWorker 웹훅 발송 연동 (#158)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/159
2026-02-11 02:08:41 +00:00
SEAN
8b1ae4dc02 improvement: PushWorker 웹훅 발송 연동 (#158)
- PushWorker에 IWebhookService 의존성 주입
- 발송 완료 후 push_sent/push_failed 이벤트 웹훅 호출
- TASKS.md API 커버리지 테이블 업데이트 (65/65 완료)

Closes #158
2026-02-11 11:07:04 +09:00
f972982b85 fix: Health check Redis 상태 실제 PING 체크로 변경 (#156)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/157
2026-02-11 01:51:56 +00:00
SEAN
c63a61bf6a fix: Health check Redis 상태를 실제 PING 체크로 변경 (#156)
- not_configured 하드코딩 제거
- RedisConnection 주입 후 PingAsync()로 실제 연결 상태 확인
- 응답에 latency 포함

Closes #156
2026-02-11 10:49:47 +09:00
bbcb770b2d feat: Redis 토큰 캐시 관리 구현 (#154)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/155
2026-02-11 01:45:16 +00:00
SEAN
1b6a87588c feat: Redis 토큰 캐시 관리 구현 (#154)
- ITokenCacheService 인터페이스 및 Redis 기반 TokenCacheService 구현
- Key: device:token:{serviceId}:{deviceId}, TTL: 1시간
- PushWorker single 발송 시 캐시 우선 조회, 미스 시 DB 조회 후 캐시 저장
- DeviceService 등록/수정/삭제/수신동의 변경 시 캐시 무효화
- RedisConnection에 GetServer() 메서드 추가 (서비스별 전체 무효화용)

Closes #154
2026-02-11 10:40:32 +09:00
fec1bf289f feat: DataRetentionWorker 구현 (#152)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/153
2026-02-11 01:34:30 +00:00
SEAN
feca00e329 feat: DataRetentionWorker 구현 (#152)
- 매일 04:00 KST 스케줄 실행
- PushSendLog/PushOpenLog: 90일 보관, WebhookLog: 30일, SystemLog: 180일
- 배치 단위 10000건씩 삭제 (트랜잭션 없음)
- SystemLog에 정리 완료 로그 기록
- DI에 AddHostedService 등록

Closes #152
2026-02-11 10:31:50 +09:00
ffdc343563 feat: DeadTokenCleanupWorker 구현 (#150)
All checks were successful
SPMS_API/pipeline/head This commit looks good
Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/151
2026-02-11 01:27:46 +00:00
SEAN
ca4f278b14 feat: DeadTokenCleanupWorker 구현 (#150)
- 매주 일요일 03:00 KST 스케줄 실행
- is_active=false, updated_at 7일 이전 Device 물리 삭제
- 배치 단위 1000건씩 삭제 (트랜잭션 없음)
- 안전장치: 전체의 50% 초과 시 삭제 중단 + 경고 로그
- SystemLog에 정리 완료/안전장치 발동 로그 기록
- DI에 AddHostedService 등록

Closes #150
2026-02-11 10:26:00 +09:00