Skip to content

feat: Parameter Store 기반 설정 관리 전환 및 loadtest 프로필 추가#670

Open
lsy1307 wants to merge 5 commits intosolid-connection:developfrom
lsy1307:644-feat-parameter-store
Open

feat: Parameter Store 기반 설정 관리 전환 및 loadtest 프로필 추가#670
lsy1307 wants to merge 5 commits intosolid-connection:developfrom
lsy1307:644-feat-parameter-store

Conversation

@lsy1307
Copy link
Contributor

@lsy1307 lsy1307 commented Feb 16, 2026

관련 이슈

작업 내용

  • secret 서브모듈 제거 및 설정 로딩 구조를 config/*.yml + AWS Parameter Store import 방식으로 전환
  • loadtest 프로필 추가 (application-loadtest.yml)
  • Spring Cloud AWS Parameter Store 의존성 추가
  • 배포 파이프라인 정리
    • dev/prod workflow에서 submodule checkout 제거
    • docker compose(dev/prod)에 AWS_REGION=ap-northeast-2 추가
  • S3 인증 방식 전환
    • 정적 access key/secret key 제거
    • DefaultCredentialsProvider 기반(IAM Role 체인)으로 변경

특이 사항

  • EC2 3대(prod/stage/monitoring)에 SolidConnectionParameterStoreReadProfile 연결 완료
  • Parameter Store 경로는 /solid-connection/{common|local|dev|prod|loadtest} 사용
  • 기존 secret 서브모듈 기반 설정은 제거됨

리뷰 요구사항 (선택)

  • profile별 Parameter Store key naming(spring.datasource.*, spring.flyway.*, jwt.secret)이 현재 운영 정책과 맞는지
  • loadtest 운영 시 flyway 적용 정책(활성/비활성) 확정 필요

- secret 서브모듈 제거 및 설정 파일 분리

- 프로필별 Parameter Store import와 loadtest 프로필 추가
- Spring Cloud AWS Parameter Store 의존성 추가

- config 분리와 profile별 import/loadtest 프로필 설정
- dev/prod workflow에서 submodule checkout 제거

- compose 환경변수에 AWS_REGION 주입
- 정적 access key/secret key 주입 제거

- DefaultCredentialsProvider 기반 S3Client 구성
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Walkthrough

1. Git 서브모듈 제거 —\t.gitmodules에서 src/main/resources/secret 항목과 해당 서브모듈 커밋 참조가 삭제되었습니다.
2. CI 워크플로우 변경 —\t.github/workflows/dev-cd.ymlprod-cd.yml에서 Checkout 단계의 submodules 설정과 서브모듈 액세스 토큰 인자가 제거되었습니다.
3. AWS 자격증명 변경 —\tAmazonS3Config.java에서 StaticCredentialsProvider 및 하드코딩된 @Value 필드를 제거하고 DefaultCredentialsProvider로 전환했습니다.
4. 파라미터 스토어 통합 및 설정 분리 —\tapplication.yml이 AWS Parameter Store optional import로 재구성되고 application-cloud.yml, application-db.yml, application-variable.yml, application-loadtest.yml이 추가되었습니다.
5. 빌드·도커 환경 업데이트 —\tbuild.gradlespring-cloud-aws-starter-parameter-store:3.0.4 의존성이 추가되고, docker-compose.dev.ymldocker-compose.prod.ymlAWS_REGION=ap-northeast-2가 추가되었습니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • wibaek
  • whqtker
  • Gyuhyeok99
  • sukangpunch
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 주요 변경사항을 명확하게 반영하고 있습니다. Parameter Store 기반 설정 관리 전환과 loadtest 프로필 추가라는 핵심 내용을 간결하게 표현했습니다.
Description check ✅ Passed PR 설명이 템플릿의 필수 섹션(관련 이슈, 작업 내용, 특이 사항)을 모두 포함하고 있으며, 구체적인 변경사항과 배포 관련 내용을 충실하게 기술했습니다.
Linked Issues check ✅ Passed 코드 변경사항이 링크된 이슈 #644의 주요 목표인 AWS Parameter Store 연동, loadtest 프로필 분리, S3 인증 방식 전환을 모두 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 issue #644의 목표 범위 내에 있습니다. Parameter Store 연동, 설정 파일 구조화, loadtest 프로필 추가, 배포 파이프라인 정리, S3 인증 방식 변경이 모두 명시된 요구사항과 일치합니다.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/main/resources/application-loadtest.yml`:
- Around line 17-25: The outbound websocket thread-pool block is missing a
queue-capacity setting which defaults to an unbounded queue; update the
websocket.thread-pool.outbound configuration to include queue-capacity (e.g.,
match inbound's 4000) so outbound uses a bounded queue like inbound:
core-pool-size, max-pool-size, and queue-capacity should all be specified for
websocket.thread-pool.outbound to avoid unbounded memory growth during load
tests.

In `@src/main/resources/config/application-variable.yml`:
- Around line 189-191: 로컬 프로필의 token.refresh.cookie-domain이
".stage.solid-connection.com"으로 잘못 설정되어 있어 로컬에서 쿠키가 동작하지 않습니다;
token.refresh.cookie-domain 값을 로컬 전용 설정에서 "localhost" (또는 빈값/생략하여 기본 호스트 사용)로
변경하거나 로컬 프로파일(application-local.yml 등)에 별도 항목을 추가해 ".stage.solid-connection.com"
대신 localhost를 사용하도록 수정하세요.
🧹 Nitpick comments (3)
src/main/resources/config/application-variable.yml (1)

30-30: 카카오 OAuth 프로퍼티의 네이밍 일관성을 맞춰주세요.

현재 user-info_url은 언더스코어와 하이픈이 혼용되어 있는데, 같은 oauth 섹션의 모든 다른 프로퍼티들(token-url, redirect-url, client-id, client-secret-audience-url 등)은 케밥 케이스(hyphen)를 사용하고 있습니다. Spring Boot의 relaxed binding 때문에 현재도 정상 작동하지만, 일관성을 위해 user-info-url로 통일하면 좋겠습니다.

변경 사항:

  1. user-info_urluser-info-url로 변경
    • src/main/resources/config/application-variable.yml (line 30)
    • src/test/resources/application.yml
♻️ 변경 예시
-    user-info_url: "https://kapi.kakao.com/v2/user/me"
+    user-info-url: "https://kapi.kakao.com/v2/user/me"
src/main/resources/config/application-cloud.yml (1)

6-11: Spring Cloud AWS 3.x에 맞춰 프로퍼티 네임스페이스를 정렬하세요.

현재 설정에서 cloud.aws.* 네임스페이스는 Spring Cloud AWS 2.x 관례입니다. 3.0.4 버전에서는 공식 네임스페이스가 spring.cloud.aws.*로 변경되었습니다.

다음 개선사항을 고려해 주세요:

  1. cloud.aws.region.staticspring.cloud.aws.region.static로 변경

    • AmazonS3Config에서 @Value("${spring.cloud.aws.region.static}")로 읽도록 수정
    • Spring Cloud AWS 자동 설정의 중앙 리전 제공자와 일관성 유지
  2. cloud.aws.stack.auto 및 기타 cloud.aws.* 속성도 spring.cloud.aws.*로 통일

    • Spring Cloud AWS 3.x의 공식 설정 구조와 맞춤
    • 향후 유지보수 시 혼동 방지

현재는 Parameter Store 클라이언트가 Docker Compose의 AWS_REGION 환경 변수를 통해 리전을 올바르게 해석하므로 기능상 문제가 없습니다. 다만 네임스페이스 정렬은 코드 일관성과 명확성을 크게 개선합니다.

src/main/resources/application-loadtest.yml (1)

12-15: HikariCP 풀 사이즈 설정 관련 참고 사항

  1. 풀 사이즈
    • maximum-pool-size: 50, minimum-idle: 20은 부하테스트 용도로 합리적인 수치입니다.
  2. 타임아웃 설정 부재
    • connection-timeout, idle-timeout 등이 명시되어 있지 않아 HikariCP 기본값(각각 30초, 600초)이 적용됩니다.
    • K6 부하테스트 시 커넥션 풀 소진 상황에서 기본 connection-timeout(30초)이 적절한지 확인해 보시면 좋겠습니다. 필요하다면 부하테스트 특성에 맞게 조정을 고려해 주세요.

- local 프로필 refresh cookie-domain을 localhost로 수정

- loadtest outbound thread pool에 queue-capacity 추가
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/main/resources/config/application-variable.yml`:
- Around line 134-142: The dev CORS list under cors.allowed-origins contains the
prod admin domain; update the entry "https://admin.solid-connection.com" in the
dev profile to the staging admin domain
"https://admin.stage.solid-connection.com" (or remove/replace it) so dev uses
the stage admin host; if the admin service intentionally uses a single global
domain, leave it as-is but add a comment explaining that choice.
- Around line 12-14: Add an explicit queue-capacity entry for the outbound
thread pool in the default and prod profiles: update the outbound block (keys:
outbound, core-pool-size, max-pool-size) to include queue-capacity (e.g., 1000
or another bounded value) so Spring's ThreadPoolTaskExecutor does not use
Integer.MAX_VALUE; ensure the same queue-capacity is added under both the
default outbound section and the prod outbound section to mirror inbound's
configuration.
🧹 Nitpick comments (2)
src/main/resources/config/application-variable.yml (2)

176-177: dev/local 프로필에서 JWT_SECRET의 기본값이 비어 있습니다.

${JWT_SECRET:}는 환경 변수가 설정되지 않으면 빈 문자열로 바인딩됩니다. 로컬 개발 시 Parameter Store 없이 실행하면 JWT 서명이 빈 키로 수행될 수 있어, 토큰 검증이 의미 없어지거나 예기치 않은 오류가 발생할 수 있습니다. 로컬용으로는 안전한 기본 개발용 시크릿을 넣어두는 것을 권장합니다.

🛡️ 로컬 프로필에 개발용 기본 시크릿 추가 제안
 jwt:
-  secret: ${JWT_SECRET:}
+  secret: ${JWT_SECRET:local-dev-only-secret-do-not-use-in-production}

30-30: user-info_url 키의 네이밍 불일치를 수정하세요.

파일 전체에서 kebab-case를 일관되게 사용하고 있는데(token-url, client-secret-audience-url, public-key-url 등), 이 키만 user-info_url로 언더스코어가 섞여 있습니다. Spring Boot의 relaxed binding이 자동으로 처리하므로 동작에는 문제가 없지만, 코드 스타일 통일을 위해 다음을 진행해 주세요:

  1. 키 이름 수정: user-info_urluser-info-url로 변경
    • Java의 KakaoOAuthClientProperties.userInfoUrl 바인딩은 Spring의 relaxed binding을 통해 자동으로 매핑되므로 추가 수정이 필요 없습니다.
✏️ 제안된 변경
-    user-info_url: "https://kapi.kakao.com/v2/user/me"
+    user-info-url: "https://kapi.kakao.com/v2/user/me"

Comment on lines +12 to +14
outbound:
core-pool-size: 6
max-pool-size: 12
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

기본(default) 프로필의 outbound 스레드 풀에 queue-capacity가 누락되어 있습니다.

inbound 쪽(Line 11)에는 queue-capacity: 1000이 명시되어 있는 반면, outbound에는 빠져 있습니다. prod 프로필(Line 75-77)에서도 동일하게 outbound queue-capacity가 누락되어 있네요. 의도적인 생략인지, 아니면 설정 누락인지 확인이 필요합니다. 만약 Spring의 ThreadPoolTaskExecutor 기본값(Integer.MAX_VALUE)이 적용된다면 사실상 무제한 큐가 되어 메모리 이슈로 이어질 수 있습니다.

🔧 outbound에도 queue-capacity 추가 제안
     outbound:
       core-pool-size: 6
       max-pool-size: 12
+      queue-capacity: 1000
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
outbound:
core-pool-size: 6
max-pool-size: 12
outbound:
core-pool-size: 6
max-pool-size: 12
queue-capacity: 1000
🤖 Prompt for AI Agents
In `@src/main/resources/config/application-variable.yml` around lines 12 - 14, Add
an explicit queue-capacity entry for the outbound thread pool in the default and
prod profiles: update the outbound block (keys: outbound, core-pool-size,
max-pool-size) to include queue-capacity (e.g., 1000 or another bounded value)
so Spring's ThreadPoolTaskExecutor does not use Integer.MAX_VALUE; ensure the
same queue-capacity is added under both the default outbound section and the
prod outbound section to mirror inbound's configuration.

Comment on lines +134 to +142
cors:
allowed-origins:
- "https://www.stage.solid-connection.com"
- "https://api.stage.solid-connection.com"
- "https://admin.solid-connection.com"
- "http://localhost:3000"
- "https://localhost:3000"
- "http://localhost:5173"

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Dev 프로필 CORS에 운영(prod) admin 도메인이 포함되어 있습니다.

Line 138의 https://admin.solid-connection.com은 prod 프로필(Line 96)에서도 동일하게 사용되는 운영 도메인입니다. dev 환경이라면 https://admin.stage.solid-connection.com이 의도된 값이 아닌지 확인 부탁드립니다. 만약 admin 서비스가 환경 구분 없이 하나의 도메인을 사용하는 구조라면 현재 설정이 맞습니다.

🤖 Prompt for AI Agents
In `@src/main/resources/config/application-variable.yml` around lines 134 - 142,
The dev CORS list under cors.allowed-origins contains the prod admin domain;
update the entry "https://admin.solid-connection.com" in the dev profile to the
staging admin domain "https://admin.stage.solid-connection.com" (or
remove/replace it) so dev uses the stage admin host; if the admin service
intentionally uses a single global domain, leave it as-is but add a comment
explaining that choice.

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.

refactor: stage 서버 RDS -> EC2로 전환 및 K6 부하테스트용 프로필 전환을 위한 AWS Parameter Store 연동

1 participant