google-nomulus/java/google/registry/proxy/handler
jianglai 4a5b317016 Add web WHOIS redirect support
Opened two ports (30010 and 30011 by default) that handles HTTP(S) GET requests. the HTTP request is redirected to the corresponding HTTPS site, whereas the HTTPS request is redirected to a site that supports web WHOIS.

The GCLB currently exposes port 80, but not port 443 on its TCP proxy load balancer (see https://cloud.google.com/load-balancing/docs/choosing-load-balancer). As a result, the HTTP traffic has to be routed by the HTTP load balancer, which requires a separate HTTP health check (as opposed to the TCP health check that the TCP proxy LB uses). This CL also added support for HTTP health check.

There is not a strong case for adding an end-to-end test for WebWhoisProtocolsModule (like those for EppProtocolModule, etc) as it just assembles standard HTTP codecs used for an HTTP server, plus the WebWhoisRedirectHandler, which is tested. The end-to-end test would just be testing if the Netty provided HTTP handlers correctly parse raw HTTP messages.

Sever other small improvement is also included:

[1] Use setInt other than set when setting content length in HTTP headers. I don't think it is necessary, but it is nevertheless a better practice to use a more specialized setter.
[2] Do not write metrics when running locally.
[3] Rename the qualifier @EppCertificates to @ServerSertificate as it now provides the certificate used in HTTPS traffic as well.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206944843
2018-08-10 13:46:48 -04:00
..
BackendMetricsHandler.java Fix proxy metrics instrumentation bug 2018-05-30 12:18:54 -04:00
EppServiceHandler.java Migrating to fluent logging (green) 2018-05-30 12:18:54 -04:00
HealthCheckHandler.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
HttpsRelayServiceHandler.java Add web WHOIS redirect support 2018-08-10 13:46:48 -04:00
ProxyProtocolHandler.java Make some minor changes to logging messages and test names. 2018-08-10 13:44:25 -04:00
QuotaHandler.java Remove no quota leased warning from quota handler inactive callback 2018-05-17 21:52:35 -04:00
RelayHandler.java Migrating to fluent logging (green) 2018-05-30 12:18:54 -04:00
SslClientInitializer.java Migrating to fluent logging (green) 2018-05-30 12:18:54 -04:00
SslServerInitializer.java Add web WHOIS redirect support 2018-08-10 13:46:48 -04:00
WebWhoisRedirectHandler.java Add web WHOIS redirect support 2018-08-10 13:46:48 -04:00
WhoisServiceHandler.java Clean up some code quality issues in GCP proxy 2018-03-19 18:44:12 -04:00