Skip to content

[feat] PB-104 CongestionClient Lambda Function URL SigV4 인증 적용 - #210

Merged
PHJ2000 merged 8 commits into
mainfrom
feat/PB-104-sigv4-auth
Apr 10, 2026
Merged

PHJ2000 merged 8 commits into
mainfrom
feat/PB-104-sigv4-auth

Conversation

@geonusp

@geonusp geonusp commented Apr 7, 2026 •

Copy link
Copy Markdown
Collaborator

✨ Feature PR

🔗 이슈 링크 (필수)

PR 제목: [feat] PB-104 CongestionClient Lambda Function URL SigV4 인증 적용


🧩 이 PR의 변경사항 (필수)

전체 중 위치 (Stacked PR 시)

이 PR에서 변경한 것

  • AWS SDK v2 BOM 의존성 추가
  • AwsSigV4Interceptor: Lambda Function URL 요청에 SigV4 서명 헤더 주입
  • AwsConfig: congestionInterceptor 빈 추가, CONGESTION_SIGV4_ENABLED 플래그로 NoOp 분기
  • app.congestion.sigv4-enabled 환경 변수 바인딩 추가
  • SdkClientException 엄격한 정책 주석 명시
  • docs: Spring + AWS SDK v2 SSO 자격증명 로드 실패 트러블슈팅 문서 추가

✅ 이 PR이 커버하는 AC (필수)

Covers (이 PR에서 완료)

  • AC1: Lambda Function URL AWS_IAM 인증 적용 (SigV4 서명)
  • AC2: 로컬 환경 SigV4 조건부 비활성화 (CONGESTION_SIGV4_ENABLED 플래그)

Not covered (후속 작업)


🧪 테스트 결과 (필수)

로컬

./gradlew test
  • ✅/❌ 결과:

CI

  • (자동 첨부)

Smoke 테스트

  • 시나리오:
  • 결과:

🧭 영향 범위 체크 (필수)

  • API 변경 (요약: RestClient 요청 경로가 내부 서버 → Lambda Function URL로 변경)
  • DB 변경 (마이그레이션: )
  • 설정 변경 (항목: app.congestion.sigv4-enabled 설정 추가, 환경변수 CONGESTION_SIGV4_ENABLED로 주입 가능 (기본값 true))
  • Breaking change (무엇: )

💬 리뷰 포인트 (필수)

  • 집중해서 볼 파일/라인:

  • AwsSigV4Interceptor.java: intercept() — SigV4 서명 헤더 주입 흐름

  • AwsConfig.java: congestionInterceptor() — sigv4-enabled 분기 로직 추가

  • docs/troubleshooting/aws-sso-credentials-spring.md

  • 트레이드오프/대안:

geonusp added 4 commits April 7, 2026 17:15
- AWS SDK BOM 2.42.23 의존성 추가 (auth, regions)
- AwsSigV4Interceptor: Lambda Function URL AWS_IAM 인증용 SigV4 서명 인터셉터 구현
- CongestionInterceptor: 구체 구현 대신 인터페이스에 의존하도록 추상화 (마커 인터페이스)
- AwsConfig: DefaultCredentialsProvider Bean 등록
- CongestionClient: SigV4 인터셉터 주입, base-url 환경변수(CONGESTION_BASE_URL)로 관리
- application.yml: app.congestion.base-url, app.aws.region 환경변수 주입 구조로 변경
- NoOpRequestInterceptor: 테스트용 Null Object 패턴 구현체 추가
- CongestionClientTest: NoOpRequestInterceptor로 생성자 인자 수정
- troubleshooting-lambda-secrets.md 추가
@geonusp geonusp self-assigned this Apr 7, 2026
@coderabbitai

coderabbitai Bot commented Apr 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2c53d91f-924a-48e2-bbf7-df8e2f168ac2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/PB-104-sigv4-auth

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@geonusp geonusp changed the title Feat/pb 104 sigv4 auth [feat] PB-104 CongestionClient Lambda Function URL SigV4 인증 적용 Apr 7, 2026
@geonusp
geonusp requested a review from PHJ2000 April 7, 2026 08:28
@geonusp
geonusp marked this pull request as ready for review April 7, 2026 08:29
@geonusp geonusp added docs Improvements or additions to documentation feat fix refactor chore test labels Apr 7, 2026

@PHJ2000 PHJ2000 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

docs/troubleshooting/troubleshooting-lambda-secrets.md 문서가 해당 pr에서 다루는 부분과 연관이 적어보입니다. pr2로 이관하거나 ai레포쪽으로 이동하는게 좋아보입니다.

@geonusp

geonusp commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator Author

docs/troubleshooting/troubleshooting-lambda-secrets.md 문서가 해당 pr에서 다루는 부분과 연관이 적어보입니다. pr2로 이관하거나 ai레포쪽으로 이동하는게 좋아보입니다.

말씀하신대로 우선 관련 커밋을 revert 하고 추후에 어디 넣을지 검토해보겠습니다. 피드백 감사합니다.

@PHJ2000 PHJ2000 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

수고하셨습니다.
추가로 PR 본문에 적힌 변경사항과 현재 diff 사이에 일부 차이가 있어 보여서, 머지 전 설명도 한 번 최신화해주시면 리뷰어가 실제 변경 범위를 따라가기 더 수월할 것 같습니다. 특히 ProcessCredentialsProvider / app.aws.profile, app.aws.cli-command / transport header 제외 관련 설명은 현재 코드와 기준을 맞춰주면 좋을 것 같아요.

geonusp added 3 commits April 10, 2026 03:58
- CONGESTION_SIGV4_ENABLED=false 시 NoOp 인터셉터 등록 (기본값 true)
- AwsConfig에서 CongestionInterceptor 빈 생성 책임 이전 (기존 @component 제거)
- 운영/로컬 통합 테스트는 기존과 동일하게 SigV4 서명 유지
@geonusp

geonusp commented Apr 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

수고하셨습니다. 추가로 PR 본문에 적힌 변경사항과 현재 diff 사이에 일부 차이가 있어 보여서, 머지 전 설명도 한 번 최신화해주시면 리뷰어가 실제 변경 범위를 따라가기 더 수월할 것 같습니다. 특히 ProcessCredentialsProvider / app.aws.profile, app.aws.cli-command / transport header 제외 관련 설명은 현재 코드와 기준을 맞춰주면 좋을 것 같아요.

리뷰까지 반영하여 pr 본문을 수정했습니다.

@PHJ2000
PHJ2000 merged commit 5c22dd2 into main Apr 10, 2026
2 checks passed
@PHJ2000

PHJ2000 commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

수고하셨습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore docs Improvements or additions to documentation feat fix refactor test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants