Skip to content

[datagsm] 이벤트 웹훅 누락 복구#97

Merged
hej090224 merged 2 commits into
developfrom
fix/restore-datagsm-event-webhook
Jul 14, 2026
Merged

[datagsm] 이벤트 웹훅 누락 복구#97
hej090224 merged 2 commits into
developfrom
fix/restore-datagsm-event-webhook

Conversation

@hej090224

Copy link
Copy Markdown
Member

개요

#93에서 추가되었으나 현재 develop 브랜치에 누락된 DataGSM 이벤트 웹훅 수신 기능을 복구하였습니다.
POST /api/v2/events/datagsm 엔드포인트와 인증 예외 설정을 다시 반영하여 DataGSM 이벤트 재시도 요청이 인증 필터에서 차단되지 않도록 하였습니다.

본문

DataGsmEventController를 복구하여 DataGSM 이벤트를 수신하고, X-DataGSM-Signature 헤더 기반 HmacSHA256 서명을 검증하도록 하였습니다.

HandleDataGsmEventServiceImpl를 복구하여 student.updated 이벤트 수신 시 기존 User의 이름, 호실, 학년, 층, 권한 정보를 갱신하도록 하였습니다. 동일 이벤트가 중복
처리되지 않도록 DataGsmEventIdempotencySupport를 통해 이벤트 idRedis에 기록하는 로직도 함께 복구하였습니다.

DomainAuthorizationConfig/api/v2/events/datagsm 경로를 permitAll()로 추가하여 외부 DataGSM 웹훅 요청이 JWT 인증 없이 컨트롤러까지 도달하도록 하였습니다. 실
제 인증은 컨트롤러의 서명 검증으로 처리됩니다.

운영 설정을 위해 DataGsmEventEnvironmentTHIRD_PARTY_DATAGSM_EVENT_SECRET, THIRD_PARTY_DATAGSM_EVENT_IDEMPOTENCY_TTL_DAYS 설정을 복구하였습니다.

검증:

  • ./gradlew spotlessApply
  • ./gradlew test --tests "team.washer.server.v2.domain.datagsm.*"
  • ./gradlew test

@hej090224
hej090224 requested a review from d1ng1724 July 14, 2026 09:15
@hej090224 hej090224 self-assigned this Jul 14, 2026
@hej090224 hej090224 added the 버그 애플리케이션의 버그에 대응합니다. label Jul 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces integration with DataGSM webhook events, specifically handling the student.updated event to synchronize user information. It includes signature verification, idempotency checks using Redis, and updates to the user entity and security configurations. The review feedback highlights several important areas for improvement: addressing a potential race condition in the idempotency check by using Redis setIfAbsent, adding a null check for rawBody to prevent exceptions during signature verification, optimizing student updates to avoid N+1 queries, and enhancing integer parsing to handle decimal values formatted as strings.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@hej090224
hej090224 merged commit 0962dab into develop Jul 14, 2026
1 check passed
@hej090224
hej090224 deleted the fix/restore-datagsm-event-webhook branch July 14, 2026 09:18
@hej090224 hej090224 mentioned this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

버그 애플리케이션의 버그에 대응합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants