Remove EppProxyProtocolHandler from the pipeline - #3202
Conversation
a06123c to
973521c
Compare
gbrodman
left a comment
There was a problem hiding this comment.
@gbrodman reviewed 5 files and all commit messages, and made 2 comments.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on ptkach).
core/src/main/java/google/registry/eppserver/handler/EppServiceHandler.java line 140 at r1 (raw file):
SocketAddress remoteAddress = ctx.channel().remoteAddress(); if (remoteAddress instanceof InetSocketAddress inetSocketAddress) { clientAddress = inetSocketAddress.getAddress().getHostAddress();
i think if the InetSocketAddress fails to resolve for some reason then getAddress() returns null -- that case should probably be handled in the block below rather than throwing an NPE here. But i doubt this would ever actually come up in real life, so no big deal either way
core/src/test/java/google/registry/eppserver/handler/EppServiceHandlerTest.java line 20 at r1 (raw file):
import static google.registry.networking.handler.SslServerInitializer.CLIENT_CERTIFICATE_PROMISE_KEY; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.jupiter.api.Assertions.assertEquals;
we should probably use truth assertions in this class like we do everywhere else
this comment is non-blocking
973521c to
78f0e23
Compare
ptkach
left a comment
There was a problem hiding this comment.
@ptkach made 2 comments.
Reviewable status: 4 of 5 files reviewed, all discussions resolved (waiting on gbrodman).
core/src/main/java/google/registry/eppserver/handler/EppServiceHandler.java line 140 at r1 (raw file):
Previously, gbrodman wrote…
i think if the InetSocketAddress fails to resolve for some reason then getAddress() returns null -- that case should probably be handled in the block below rather than throwing an NPE here. But i doubt this would ever actually come up in real life, so no big deal either way
I don't think it's possible, as the IP in this case is provided by the Load Balancer and the block below should cover any unlikely issue that might appear
core/src/test/java/google/registry/eppserver/handler/EppServiceHandlerTest.java line 20 at r1 (raw file):
Previously, gbrodman wrote…
we should probably use truth assertions in this class like we do everywhere else
this comment is non-blocking
Updated
gbrodman
left a comment
There was a problem hiding this comment.
@gbrodman reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on ptkach).
We no longer need to get an IP from the header, as it's now directly available in the context as verified in prod and crash
This change is