Skip to content

fix: 관리자 URL 매칭을 PathPatternRequestMatcher로 전환 - #1396

Merged
jei007 merged 1 commit into
eGovFramework:mainfrom
leejongyoung:upstream-submit-interceptor-20261027
Oct 30, 2026
Merged

jei007 merged 1 commit into
eGovFramework:mainfrom
leejongyoung:upstream-submit-interceptor-20261027

Conversation

@leejongyoung

Copy link
Copy Markdown
Contributor

기준·범위

  • 기준: main fd9062b.
  • 결함 하나만 담습니다: deprecated API 교체 + 회귀 테스트 1개. 버전 인상·릴리스는 포함하지 않습니다.

문제

AuthenticInterceptor가 Spring Security 6.x에서 삭제 예정(deprecated and marked for removal)인 AntPathRequestMatcher를 사용해 컴파일 경고가 발생합니다(부모 POM이 관리하는 Spring Security 6.5.5 확인, 해당 버전 태그 소스에서 권장 대체 API 존재 확인).

변경

  • setAdminAuthPatternList에서 PathPatternRequestMatcher.withDefaults()로 패턴을 미리 파싱해 재사용하고, 요청 시 매칭합니다. 인증 실패·ROLE_ADMIN 거부 조건과 리다이렉트 문자열은 그대로입니다(매칭 불일치 시 조기 break는 동작 중립).
  • 신규 AuthenticInterceptorTest: 파라미터화 18행(정상 서블릿 경로·parsed path 유무·GET/POST × 권한·인증 여부). DB·서버·Spring 컨텍스트 불필요합니다.

검증

  • 실행: 신규 단위 테스트 18건 전부 통과(JDK 21·Maven 3.9.11 로컬 실행, mvn -DskipTests=false -Dtest=AuthenticInterceptorTest test).
  • 실행 안 함: 전체 스위트(CI는 -DskipTests), 특수 인코딩 URI·Ant 전용 확장 패턴의 전역 동등성(실제 /sec/ram/*.do 설정과 정상 서블릿 경로 기준으로만 주장).

@jei007 jei007 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

표준프레임워크에 대한 지속적인 참여에
대단히 감사드립니다.

@jei007
jei007 merged commit 8badeb0 into eGovFramework:main Oct 30, 2026
1 check passed
@leejongyoung
leejongyoung deleted the upstream-submit-interceptor-20261027 branch October 31, 2026 01:47
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.

2 participants