-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Support IP whitelist for Spring Security Webflux #10007
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
Conversation
@terminux Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@terminux Thank you for signing the Contributor License Agreement! |
Hi @terminux. We're beginning to work through our backlog of issues and PRs in preparation for the 5.7 development cycle. Are you able to work through a few rounds of feedback on this PR? If so, the first thing would be to rebase on |
ba7e0d2
to
854d80b
Compare
Ok, the conflict has been resolved. |
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.
@terminux, thanks for the PR and rebasing! I think this is really great, and already coming along nicely! I do have some suggestions inline below. I will be out tomorrow, so apologies if you get to this quickly and I'm delayed in reviewing it.
web/src/main/java/org/springframework/security/web/util/matcher/InetAddressMatcher.java
Outdated
Show resolved
Hide resolved
web/src/test/java/org/springframework/security/web/util/matcher/InetAddressMatcherTests.java
Outdated
Show resolved
Hide resolved
...springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcherTests.java
Outdated
Show resolved
Hide resolved
.../org/springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcher.java
Outdated
Show resolved
Hide resolved
...springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcherTests.java
Outdated
Show resolved
Hide resolved
config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java
Outdated
Show resolved
Hide resolved
config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java
Outdated
Show resolved
Hide resolved
config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java
Outdated
Show resolved
Hide resolved
...gframework/security/web/server/authorization/IpAddressReactiveAuthorizationManagerTests.java
Show resolved
Hide resolved
...gframework/security/web/server/authorization/IpAddressReactiveAuthorizationManagerTests.java
Outdated
Show resolved
Hide resolved
Thanks very much for your review @sjohnr . I've updated the PR. |
e594f17
to
514bfcf
Compare
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.
Thanks for the updates, @terminux! I just have a few more suggestions below.
...springframework/security/web/server/authorization/IpAddressReactiveAuthorizationManager.java
Outdated
Show resolved
Hide resolved
.../org/springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcher.java
Outdated
Show resolved
Hide resolved
.../org/springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcher.java
Show resolved
Hide resolved
...springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcherTests.java
Outdated
Show resolved
Hide resolved
...springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcherTests.java
Outdated
Show resolved
Hide resolved
...gframework/security/web/server/authorization/IpAddressReactiveAuthorizationManagerTests.java
Outdated
Show resolved
Hide resolved
Thanks @sjohnr , nice suggestions. I updated the PR and it's ready for your review again. |
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.
Just two more suggestions, in addition to our discussion above. Thanks for your efforts so far, @terminux!
...springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcherTests.java
Outdated
Show resolved
Hide resolved
...springframework/security/web/server/util/matcher/IpAddressServerWebExchangeMatcherTests.java
Outdated
Show resolved
Hide resolved
Thanks @sjohnr , I've updated the PR based on your suggestions. |
Closes gh-7765
I extracted the
matches
method from IpAddressMatcher into InetAddressMatcher for reuse inHttpServletRequest
andServerWebExchange
: