Skip to content

GitHub OAuth 로그인 흐름 추가#75

Merged
Whale0928 merged 7 commits into
mainfrom
adr/0005
Jul 3, 2026
Merged

GitHub OAuth 로그인 흐름 추가#75
Whale0928 merged 7 commits into
mainfrom
adr/0005

Conversation

@Whale0928

@Whale0928 Whale0928 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Changelog

  • OAuth2 SSO 기본 설정을 CI/테스트에서 안전하게 기동되도록 fake provider 기본값으로 변경
  • GitHub client id/secret 미주입 시에도 Spring OAuth2 ClientRegistration 생성이 실패하지 않도록 stub 값을 제공
  • 기본 provider endpoint를 127.0.0.1:65535로 고정해 테스트 중 실제 GitHub OAuth 서버 호출이 발생하지 않도록 구성
  • OAuth2 로그인 지원 빈을 OAuth2SecuritySupportConfig로 분리해 SecurityConfig가 명시적으로 가져오도록 변경
  • 보안 제외 목적의 MVC slice 테스트는 OAuth2ClientAutoConfiguration도 함께 제외하도록 정리

구성 흐름

flowchart LR
  subgraph CI["CI / 기본 테스트"]
    A["application-sso.yaml<br/>stub client + fake provider endpoint"] --> B["Spring OAuth2 ClientRegistration"]
    B --> C["SecurityConfig<br/>oauth2Login filter chain"]
    C --> D["실제 GitHub 호출 없음<br/>endpoint 접근 시에만 fake 주소 사용"]
  end

  subgraph Runtime["실제 SSO 실행"]
    E["env override<br/>client id / secret / provider uri"] --> B
    F["GitHub / Google SSO"] --> C
    C --> G["OAuth2LoginSuccessHandler"]
    G --> H["대시보드 인증 토큰 발급<br/>현재는 mock token"]
  end

  subgraph Test["장기 테스트 전략"]
    I["MVC slice<br/>security 제외"] --> J["OAuth2ClientAutoConfiguration 제외"]
    K["SSO 통합 테스트"] --> L["Fake OAuth server<br/>authorize / token / userinfo stubbing"]
    L --> C
  end
Loading

검증

  • ./gradlew staticCheck unitTest supportTest apiE2eTest

@Whale0928 Whale0928 changed the title [codex] GitHub OAuth 로그인 흐름 추가 GitHub OAuth 로그인 흐름 추가 Jul 2, 2026
Whale0928 added 3 commits July 3, 2026 00:14
eliminated redundant oauth-related variables from the .env file and removed obsolete test assertions for unused database tables. these changes streamline the configuration and improve test clarity.
@Whale0928 Whale0928 marked this pull request as ready for review July 3, 2026 08:32
@Whale0928 Whale0928 merged commit 705223f into main Jul 3, 2026
2 checks passed
@Whale0928 Whale0928 deleted the adr/0005 branch July 3, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant