Repository navigation
Conversation
This was referenced Nov 3, 2026
jyx-07
force-pushed
the
feat/gateway-security
branch
from
November 3, 2026 14:14
d7febed to
12bec58
Compare
jyx-07
force-pushed
the
feat/gateway-security
branch
from
November 3, 2026 14:19
12bec58 to
6fe3dc1
Compare
cfcromn
reviewed
Nov 3, 2026
| private val IPV4 = Regex("""^(\d{1,3})(\.\d{1,3}){3}$""") | ||
| private val IPV6 = Regex("""^[0-9a-fA-F:.]+$""") | ||
|
|
||
| fun isIpLiteral(value: String): Boolean = IPV4.matches(value) || (value.contains(':') && IPV6.matches(value)) |
There was a problem hiding this comment.
999.999.999.999도 이 정규식을 통과합니다. 신뢰 프록시에서 이 값을 전달하면 이후 IpAddressMatcher.matches()에서 파싱 예외가 발생해서 /actuator/info가 403 대신 500을 반환하는 것을 확인했습니다. 잘못된 IP는 접근 거부로 처리하고, 이런 입력도 테스트에 추가해 두면 좋을 것 같아요.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
actuator는 health만 공개하고, 나머지 관리용 엔드포인트는 허용 IP에서만 열리게 합니다.
본문
gateway(라우트 조회만),circuitbreakers,info는GATEWAY_ADMIN_ALLOWED_IPS에서만 접근, 그 외 403 공통 응답TRUSTED_PROXIES에서 온 요청만X-Forwarded-For사용rush-gateway.yml에 지정#10 위에서 작업했습니다. #10을 먼저 머지해 주세요.