-
Notifications
You must be signed in to change notification settings - Fork 1
feat: DisableSwaggerSecurity 어노테이션으로 Swagger 내 로그인과 토큰 갱신 API 보안 설정을 비활성화하는 기능 추가 #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
0f70fbf
36067d8
8fc6fa6
6aace86
9f365f9
2bfddf5
40c0bbf
90716b2
cb2340b
76851b7
ce96fb3
558d48b
7c3977e
dc46056
a6516db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package org.yapp.globalutils.annotation | ||
|
|
||
| @Target(AnnotationTarget.FUNCTION) | ||
move-hoon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| @Retention(AnnotationRetention.RUNTIME) | ||
| annotation class DisableSwaggerSecurity() | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
인터페이스에
@DisableSwaggerSecurity부착은 의도에 부합하지만, 현 Customizer 로직으로는 미감지 위험SwaggerConfig.securityOperationCustomizer()가handlerMethod.getMethodAnnotation(...)로만 검사하면, 구현 클래스의 메서드에 어노테이션이 없을 때(=인터페이스에만 있을 때) 감지가 누락될 수 있습니다.AnnotatedElementUtils.findMergedAnnotation기반 + 인터페이스 메서드 탐색으로 보강하면 안정적으로 동작합니다. 관련 수정 제안은SwaggerConfig.kt코멘트를 참고하세요.빠른 점검:
Also applies to: 25-25, 52-52
🏁 Script executed:
Length of output: 240
다음 스크립트를 실행해
SwaggerConfig.kt내securityOperationCustomizer구현이handlerMethod.getMethodAnnotation만 사용하고 있는지 확인해 주세요:🏁 Script executed:
Length of output: 784
securityOperationCustomizer 로직 보강 필요: 인터페이스 메서드 어노테이션 감지 누락
현재
SwaggerConfig.kt의securityOperationCustomizer는 구현 클래스의 메서드에만 붙은 어노테이션을handlerMethod.getMethodAnnotation(...)로 조회하기 때문에, 인터페이스에만 선언된@DisableSwaggerSecurity를 놓칠 수 있습니다. 아래 위치를 수정해 주세요.apis/src/main/kotlin/org/yapp/apis/config/SwaggerConfig.kt
fun securityOperationCustomizer (라인 57~63)
현 구현 예시:
제안된 수정 방법 (인터페이스 메서드까지 탐색):
위와 같이 변경하면 인터페이스에 선언된
@DisableSwaggerSecurity도 안정적으로 감지됩니다.🤖 Prompt for AI Agents