feat: 근로자 보안 링크(Worker Link) 발급, 안내, 문서제출, 응답제출 구현 - #76
Merged
Conversation
This was referenced Aug 3, 2026
…eType, WorkerLink 도메인 추가
…kerLinkTenantBootstrap port 추가
…d 테이블 migration 추가
chaeliki
force-pushed
the
feat/7-worker-link
branch
from
August 4, 2026 00:45
67a494c to
2ff71ff
Compare
hywznn
requested changes
Aug 4, 2026
hywznn
left a comment
Contributor
There was a problem hiding this comment.
병합 전 아래 3가지를 맞춰 주세요. 모두 실제 Client 연동 또는 Accepted ADR과 직접 관련된 항목입니다.
- 공개 API canonical path: ADR-0002는
/public/worker-links/**를 정의하지만 현재 Controller·SecurityConfig는/api/v1/public/worker-links/**입니다. ADR 기준으로 Controller, SecurityConfig, OpenAPI, 통합 테스트 경로를 함께 맞춰 주세요. - 문서 업로드 멱등성:
WorkerLinkDocumentController가Idempotency-Key를 받지만 Command·Service에서 사용하지 않고, Service에도 clientRequestId 중복 방지가 TODO로 남아 있습니다. 현재 설명과 달리 같은 요청 재시도 시 파일이 중복 저장됩니다. 한 키 계약으로 실제 중복 저장을 막고 재시도 테스트를 추가해 주세요. - 브라우저 CORS:
CorsConfig허용 헤더에Idempotency-Key가 없어 Client preflight가 차단됩니다. 실제 브라우저 E2E에서 재현했습니다. 허용 헤더와 OPTIONS 통합 테스트를 추가해 주세요.
이 세 항목 반영 후 다시 확인하겠습니다.
hywznn
reviewed
Aug 4, 2026
krestar
reviewed
Aug 4, 2026
krestar
left a comment
Contributor
There was a problem hiding this comment.
추가 테이블 관련 RLS 테스트는 추후에 제가 보강하겠습니다
This was referenced Aug 4, 2026
Contributor
Author
|
3가지 모두 반영했습니다!
다시 확인 부탁드립니다! |
hywznn
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
왜 필요한가요?
Closes #7
#7(근로자 링크)의 API 4개를 구현했습니다.
완료된 범위
API 4개
POST /tasks/{taskId}/worker-link근로자 링크 발급/재발급GET /public/worker-links/{token}근로자 공개 안내 조회POST /public/worker-links/{token}/documents근로자 문서 제출POST /public/worker-links/{token}/responses근로자 응답 제출보안 설계
WorkerLinkTenantBootstrap(AuthTenantBootstrap 패턴, JPA + PostgreSQL SECURITY DEFINER 함수 구현 완료, RLS 정책 적용)ApprovalRequest.isValidFor()재사용)#13의StoredFile/FileStorage재사용,verified필드로 AVAILABLE 판단Cache-Control: no-storeActorType.WORKER_LINK)410으로 통일 (존재 여부 비노출)WorkerLink.conversationStatus를NEEDS_FOLLOWUP으로 전환AuditAction.WORKER_LINK_ACCESSED)worker_url=null,already_issued=true반환(worker_document_upload_idempotency 테이블, 재시도 시 같은 결과 반환)
발견하여 수정한 버그
SecurityConfig에 공개 API 경로permitAll()등록 누락 (실제로는 401로 막히던 문제)통합 테스트
WorkerLinkSecurityIntegrationTest4개 (전체 흐름, 미승인 Task 거부, 타 사업장 격리, 존재하지 않는 토큰)결정 사항
AuditAction.WORKER_LINK_RESPONSE_SUBMITTED추가,AuditTargetType은 기존TASK재사용 (ApprovalService 패턴 확인 후 결정)#34와 동일한 패턴worker_link/worker_response/worker_response_upload에 적용아직 확인 필요 — 후속 조치
/worker-portal라우트만 확인됨, 정확한 파라미터 전달 방식은 미확정. 현재는 원문 토큰만 반환#61완료 후 처리 예정검증
./gradlew clean test전체 통과실제 서버 E2E 확인 완료