Commit graph

1649 commits

Author SHA1 Message Date
weiminyu
dbb1f1649d Provide separate scopes list for delegated credentials
Scope changes in delegated credentials require coordinated external changes,
therefore should be separate from those used in the application default
credential.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212488389
2018-09-14 11:43:07 -04:00
weiminyu
5c1d9bd5c3 Refactor DelegatedCredential provisioning for GSuite domains
Updated the registar contact group management, which is the only
use case for this credential.

Also updated GSuite domain delegated admin access config in admin
dashboard for both sandbox (used by alpha and sandbox) and prod.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212320157
2018-09-11 14:18:41 -04:00
mcilwain
1b3df82fb3 Allow creation of reserved domains using allocation tokens
Unlike anchor tenants, these domains can be registered for any number of years,
but only during GA, as third parties cannot register domains pre-GA except
through the anchor tenant program.

Since this is new functionality, unlike creation of anchor tenants, there is no
fallback provided to send codes through the domain authcode; they must be sent
using the allocation token extension.

And note that, like with anchor tenants, providing the domain-specific
allocation token overrides any other reserved types that might apply to that
domain.

No changes are necessary to the domain application create flow because of the
above restriction to GA.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212310701
2018-09-11 14:17:08 -04:00
weiminyu
9c280f99b1 Update marksdb test download url
Marksdb changed the testing url to work with their
SSL certificate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212277787
2018-09-11 14:15:23 -04:00
weiminyu
be18f55640 Switch to new Json credential provisioning
As part of credential consolidation, update the credential provisioing
in StackDriver Module. This is the only module that will continue using
Json-based credential.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211878151
2018-09-08 00:21:22 -04:00
mcilwain
22e1d905b6 Default to admin registrar in check_domain commands
The vast majority of the time this is the registrar client ID you want, so
there's no reason to require specifying it everything each time. These are
read-only commands anyway, so the potential negative effects are minimal.

See the existing lock/unlock_domain commands for existing occurrences of this
behavior.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211857712
2018-09-08 00:19:53 -04:00
mcilwain
72bfd43e00 Add octothorpes to disclaimer in exported reserved list
There's no real standard for commented lines in a CSV, but this seems to be the
most well-supported option, so may as well use it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211847395
2018-09-08 00:18:19 -04:00
weiminyu
9436ce6f0e Introduce simplified Default credential provision
As the first step in credential consolidation, we replace
injection of application default credential in for KMS and
Drive.

Tests:
- for Drive, tested with exportDomainLists and exportReservedTerms.
- For KMS, used CLI commands (get_keyring_secret and update_kms_keyring) to change and
  restore secret for one key.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211819859
2018-09-08 00:16:09 -04:00
mmuller
4c3207647f Remove ServerSideCommand
ServerSideCommand now just aggregates CommandWithConnection and
CommandWithRemoteApi, so it's arguably clearer for commands to just implement
both of these.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211670031
2018-09-08 00:14:30 -04:00
mmuller
8a2388f5b6 Rename RemoteApiCommand to CommandWithRemoteApi
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211521742
2018-09-08 00:12:31 -04:00
mmuller
e43349592d Allow AppEngineConnection to target services other than "tools"
This change required several things:
- Separating out the interfaces that merely do HTTP calls to the backend from those
  that require the remote API (only load the remote API for the latter).  Only the
  tools service provides the remote api endpoint.
- Removing the XSRF token as an authentication mechanism (with OAUTH, we no longer
  need this, and trying to provide it requires initialization of the datastore
  code which requires the remote API)

I can't think of a compelling unit test for this beyond what already exists.
Tested:
  Verified that:
  - nomulus tool commands (e.g. "list_tlds") work against the tools service as they
    currently do
  - The "curl" command hits endpoints on "tools" by default.
  - We can use --server to specify endpoints on the default service.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211510454
2018-09-08 00:10:06 -04:00
mountford
8d131a52bd RDAP: Add registrar entities to nameserver query results
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211462672
2018-09-08 00:08:29 -04:00
larryruili
c5e6eae555 Add Spec11 registrar emailing mechanism
This adds the terminal step of the Spec11 pipeline- processing the output of
the Beam pipeline to send an e-mail to each registrar informing them of
identified 'bad urls.'

This also factors out methods common between invoicing (which uses similar beam pipeline tools) and spec11 to the common superpackage ReportingModule + ReportingUtils classes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210932496
2018-09-08 00:06:53 -04:00
mmuller
e4bb1c281c Uncomment crontab entry for deleteProberData
This was only supposed to stay commented out until load-testing was complete.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210087917
2018-09-08 00:04:26 -04:00
mmuller
7068f758b1 Disallow creating CDNS zones for sandbox TLDs
Do not allow the user to create TLDs on sandbox that aren't of the form
"*.test.".  If real TLDs are created, they will block users from registering
names under that TLD for the nameserver set that we're using for sandbox.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209983482
2018-09-08 00:01:13 -04:00
jianglai
ee97d7c2cd Update max pod number to 10
This should not cause any waste as the pods are only scaled up when necessary.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209881536
2018-09-07 23:59:39 -04:00
mcilwain
7b87ba41c7 Delete all Limited Release Program (LRP) code
We never used it and don't have any plans to use it going forward. All
conceivable parts of its functionality that we might use going forward have
already been subsumed into allocation tokens, which are a simpler way of
handling the same use case that are also standards-compliant.

Also gets rid of the hideous ANCHOR_ prefix on anchor tenant EPP authcodes
that was only ever necessary because of overloading the authcode for
anchor tenant creation. Going forward it'll be based on allocation tokens,
so there's no risk of conflicts.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209418194
2018-08-20 14:28:16 -04:00
larryruili
f7bc17fbe8 Update input/output of Spec11 pipeline to final format
This changes the BigQuery input to the fields we ultimately want (fqdn,
registrarName, registrarEmailAddress) and the output to a structured POJO
holding the results from the API. This POJO is then converted to its final text output, i.e.:

Map from registrar e-mail to list of threat-detected subdomains:
{"registrarEmail": "c@fake.com", "threats": [{"url": "a.com", "threatType": "MALWARE"}]}
{"registrarEmail": "d@fake.com", "threats": [{"url": "x.com", "threatType": "MALWARE"}, {"url": "y.com", "threatType": "MALWARE"}]}

This gives us all the data we want in a JSON structured format, to be acted upon downstream by the to-be-constructed PublishSpec11ReportAction. Ideally, we would send an e-mail directly from the beam pipeline, but this is only possible through third-party providers (as opposed to app engine itself).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209416880
2018-08-20 14:26:46 -04:00
mountford
7dcadaecf6 RDAP: Always use summary output format for registrar entities
For domains (and soon for hosts as well), we output data about the owning registrar. These subrecords wind up being really big if we include all data, because they also list all the registrar contacts. To avoid bloating the RDAP responses, change to output domain response registrar information in summary format, meaning we skip the registrar contacts and events. The requester can still get this information by using the link provided to request the registrar directly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209189993
2018-08-20 14:25:13 -04:00
jianglai
0065e52d84 Log remote IP when EPP SSL handshake fails
This makes it easy to debug issues when registrars cannot finish SSL
handshake. There's no privacy concerns because we keep a record of the
registrars' IP address in our whitelist anyway.

The remote address attribute it set by the ProxyProtocolHandler, which runs before anything is done. The GCLP added the protocol header at the beginning of a stream, so we know that by the time handshake is finished (successful or not), this key must be set.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209169683
2018-08-20 14:23:40 -04:00
mcilwain
d2f849ac0f Add new reserved domain creation from allocation tokens mechanism
Note that this gets rid of anchor tenant codes in reserved lists (yay!), which
are no longer valid.  They have to come from allocation tokens now.

This removes support for LRP from domain application create flow (that's fine,
we never used it and I'm going to delete all of LRP later).  It also uses
allocation tokens from EPP authcodes as a fallback, for now, but that will be
removed later once we switch fully to the allocation token mechanism.

This doesn't yet allow registration of RESERVED_FOR_SPECIFIC_USE domains using
the allocation token extension; that will come in the next CL.  Ditto for
showing these reserved domains as available on domain checks when the allocation
token is specified.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209019617
2018-08-20 14:22:06 -04:00
jianglai
782643ce33 Log all exceptions thrown at the end of the pipeline
The RelayHandler is installed at the end of a channel pipeline (both frontend and backend). If it does not log the exception, it will be regarded and unhandled exception, which shows up in logs, but does not log the corresponding channel.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208984756
2018-08-20 14:20:32 -04:00
jianglai
8a1c99e22b Only log EPP and WHIOS connections
Only connections that have backend are of interest to us. Move the logging
statement accordingly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208898433
2018-08-20 14:15:56 -04:00
jianglai
fc75e08061 Change access token validity and remove logging
The access token renewal on GCE is not what we expected. The metadata server always returns the same token as long as it is valid for 1699 to 3599 seconds and rolls over to the next token on its own schedule. Calling refresh on the GoogleCredential has no effect. We were caching the token for 30 min (1800 seconds), so in a rare case where we "refreshed" the token while its expiry is between 1699 and 1800 seconds, we will cache the token for longer than its validity. [] shorted the caching period to 10 min and added logging, which proved to be working. We no longer need the log any more now that the root cause has been identified. Also changed the cache period to 15 min (900 seconds) which should still be good.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208888170
2018-08-20 14:14:21 -04:00
jianglai
301301cafe Remove some unnecessary loggings from the proxy
We confirmed that the retry is working. Instead of logging the messages them
selves, we only need to log the message hash to ensure that the same message is
retried.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208883712
2018-08-20 14:12:44 -04:00
mmuller
3dba385213 Remove special Cloud DNS configuration from sandbox.
Removing this stanza from the config will cause sandbox to write to production
cloud dns, which is what we want.

Likewise, exclude sandbox in addition to production in the create_cdns_tld
command from the environments that point to staging.

Cloud DNS has 3 environments that we would consider using:
- staging which is reset every week, so we can't use it for sandbox
- testing, which is not accessible from external App Engine
- production

Because of the difficulties with the first two, we've decided to use production.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208834786
2018-08-20 14:09:33 -04:00
jianglai
d878f4ba2d Tweak access token refresh time
There's a very rare error where our access token is denied by GAE which happens a couple of seconds a day (if it happens at all). There doesn't seem to be anything wrong on our side, it could be just that the OAuth server is flaky. But to be safe, the refresh period is shortened. Also added logging to confirm what is refreshed. Note that the logging is at FINE leve, which only actually write to the logs in non-production environment.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208823699
2018-08-20 14:07:59 -04:00
jianglai
c5c0051f5e Ensure that no reference counted objects leak memory
The objects stored in the relay buffer may leak memory when they are no longer used. Alway remember to release their reference count in all cases.

Also save the relay channel and its name in BackendMetricsHandler when the handler is registered. This is because when retrying a relay, the write is sent as soon as the channel is connected, and the channelActive function is not called yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208757730
2018-08-20 14:06:24 -04:00
jianglai
4965478cce Correctly retry relay of reference counted objects
It turns out in the edge case where a write occurs at the same moment that the
relay connection is terminated, the current retry mechanism is not sufficient
because it stores reference coutned objects whose internal buffers are already
freed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208738065
2018-08-20 14:03:18 -04:00
jianglai
2e2898e17c Fix WHOIS issues
[1] Web whois should redirect to www.registry.google. whois.registry.google also points to the proxy IP, so redirecting to whois.registry.google just makes it loop. Also allow HEAD in web whois request in case that is used in monitoring.

[2] Separately, there's a bug introduced in [] where exception handling of inbound messages is moved to HttpsRelayServiceHandler. However the quota handlers are installed behind the HttpServiceServiceHandler in the channel pipeline, therefore the exception thrown in quota handlers never got processed. This results in hung connection when quota exceeded.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208651011
2018-08-20 14:00:08 -04:00
jianglai
0e64015cdf Improve logs in the GCP proxy
Tweaked a few logging levels to not spam error level logs. Also make it easy to debug issues in case relay retry fails.

[1] Put non-fatal exceptions that should be logged at warning in their explicit sets. Also always use the root cause to determine if an exception is non-fatal, because sometimes the actual causes are wrapped inside other exceptions.

[2] Record the cause of a relay failure, and record if a relay retry is successful. This way we can look at the log and figure out if a relay is eventually successful.

[3] Add a log when the frontend connection from the client is terminated.

[4] Alway close the relay channel when a relay has failed, which, depend on if the channel is frontend or backend, will reconnect and trigger a retry.

[5] Lastly changed failure test to use assertThrows instead of fail.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208649916
2018-08-20 13:58:30 -04:00
jianglai
b552c1d115 Remove references to stale domain-registry GCS repo
We stopped updating the GCS bucket a while ago. The external repos should be sufficient.

Also added comment to explain dependency shadowing by closure rules.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208234650
2018-08-10 16:01:51 -04:00
mcilwain
e5b407cab4 Increase default allocation token length to 16
16 is consistent with how we've generated codes for anchor tenants in the past.

Also gets rid of a space in the output so that it's a fully valid CSV.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208106631
2018-08-10 13:46:48 -04:00
jianglai
32ed197103 Update Nomulus to build with bazel 0.16.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208097351
2018-08-10 13:46:48 -04:00
larryruili
33ee7de457 Add GenerateSpec11Action and SafeBrowsing evaluation
This adds actual subdomain verification via the SafeBrowsing API to the Spec11
pipeline, as well as on-the-fly KMS decryption via the GenerateSpec11Action to
securely store our API key in source code.

Testing the interaction becomes difficult due to serialization requirements, and will be significantly expanded in the next cl. For now, it verifies basic end-to-end pipeline behavior.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208092942
2018-08-10 13:46:48 -04:00
jianglai
f554ace51b Log non-200 response at warning
The previous CL had a bug as non-200 response are outbound errors and are not caught in exceptionCaught() method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208063877
2018-08-10 13:46:48 -04:00
jianglai
58e68db386 Update Netty version
This seems to fix the FOSS test timeout.

Also use the static-linked netty-tcnative library in tests to ensure that
OpenSSL provider is always available in tests. In production, we should use
the dynamic-linked version to reduce binary footprint and relay on system
OpenSSL library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208057173
2018-08-10 13:46:48 -04:00
guyben
801c8efbc1 Move the RDE TAR file encoding to a dedicated file
The "tar file encoding" saves the file + metadata (filename and modification) in a "tar" format that is required in the RDE spec, even though it only contains a single file.

This is only relevant for RyDE, and not for Ghostryde. In fact, the only reason Ghostryde exists is to not have the TAR layer.

Currently we only encrypt RyDE, so we only need the TAR encoding. We plan to add decryption ability so we can test files we sent to IronMountain if there's a problem - so we will need TAR decoding for that.

The new file - RydeTar.java - has both encoding and decoding. We keep the format used for all other Input/OutputStreams for consistency, even though in this case it could be a private part of the RyDE encoder / decoder.

This is one of a series of CLs - each merging a single "part" of the encoding.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208056757
2018-08-10 13:46:48 -04:00
weiminyu
81fce674d2 Sanitize EPP XML requests and responses
Masks user credentials (tags 'pw' and 'newPW') in EPP XML messages.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207953894
2018-08-10 13:46:48 -04:00
jianglai
9eec70729f Refine tests in GCP proxy
Previously the ssl initializer tests always uses JDK, which is not really testing what happens in production when we take advantage of the OpenSSL provider. Now the tests will run with all providers that are available (through JUnit parameterization). Some bugs that may cause flakiness are fixed in the process.

Change how SNI is verified in tests. It turns out that the old method (only verifying the SSL parameters in the SSL engine) does not actually ensure that the SNI address is sent to the peer, but only that the SSL engine is configured to send it (this value exists even before a handshake is performed). Also there's likely a bug in Netty's SSL engine that does not set this parameter when created with a peer host.

Lastly HTTP test utils are changed so that they do not use pre-defined constants for header names and values. We want the test to confirm that these constants are what we expect they are. Using string literals makes these tests also more explicit.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207930282
2018-08-10 13:46:48 -04:00
mcilwain
d80f431e21 Add domain name support to AllocationToken entities
The design doc is at []
The next step will be to tie this into the domain create flow, and if the domain
name is on a reserved list, allow it to be created if the token is specified that
has the given domain name on it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207884521
2018-08-10 13:46:48 -04:00
mmuller
e3977024f3 Create a nomulus "curl" command
Create a command to send arbitrary, authenticated HTTP requests to the backend
and remove the existing commands that are basically just wrappers around this.

Tested:
  In addition to the unit tests, verified both get and post requests against
  alpha.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207756509
2018-08-10 13:46:48 -04:00
jianglai
6810e959f9 Refine logs in the proxy
[1] All logs should contain a reference to the channel so that it is easy to search for logs about a specific channel.

[2] EPP ssl handshake failure should be logged at warning. It is mostly the client that failed to complete the handshake, for example by sending bad cert, or not sending cert, or not using the correct SSL version. We should not lot it at error and spam the log.

[3] When the EPP response is not 200, we should not log at error because it means that the GAE app responded successfully. For example when datastore contention occurs, app engine responds with a non-200 status and logs at warning. The proxy should not at a higher level than app engine itself.

[4] Timeout is a non-fatal error that should be logged at warning.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207562299
2018-08-10 13:46:48 -04:00
jianglai
4ff77fb370 Automatic reconnect to GAE when the connection is dropped
The connection to GAE is not persistent and can drop. Reconnect when that happens, as long as the connection from the client is still active.

We need to consider the fact that while a reconnection is happening, the client may be sending requests that was relayed to the old connection, which is not going through. In that case these requests are queued and will be retried when the new connection is available.

Since we are no longer tying the lifecycles of the two connections, we cannot automatically terminate one when another is terminated. Also we need to explicitly control how WHOIS connection is terminated, not depending on the HTTP connection header.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207335498
2018-08-10 13:46:48 -04:00
larryruili
0b8e7498e0 Re-enable automatic invoice publish
All the pipeline-crashing problems should be fixed now, so we should have no
problem re-automating the invoice publish.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207265990
2018-08-10 13:46:48 -04:00
jianglai
3f55216b21 Reduce web WHOIS error log level to warning
There's not much we can do when the user sends incorrect HTTP requests or cannot finish SSL handshake (the problematic requests are likely from bots anyway). Reducing the log level to warning in order to reduce spamming.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207159118
2018-08-10 13:46:48 -04:00
jianglai
8664101687 Make web WHOIS more resilient to malformed requests
We are seeing some web WHOIS HTTP(S) requests made to our endpoints without the Host header specified. This is an error according to the HTTP/1.1 spec. However we do not want to spam our logs with errors that are outside of our control. Do not throw and return a 400 response instead.

Also re-worked the logic a bit to only return HSTS headers if we send a redirect response, not any other error responses. The tests are re-arrange to correspond with the logical flow in the code.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207143230
2018-08-10 13:46:48 -04:00
jianglai
628aacd754 Cache server certificates for up to 30 min
The server certificates and corresponding keys are encrypted by KMS and stored on GCS. This allows us to easily replace expiring certs without having to roll out a new proxy release. However currently the certificate is obtained as a singleton and used in all connections served by a proxy instance. This means that if we were to upload a new cert, all existing instances will not use it.

This CL makes it so that we only cache the certificate for 30 min, after which a new cert is fetched and decrypted. Local certificates used for testing are still singletons.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206976318
2018-08-10 13:46:48 -04:00
mcilwain
e665a34810 Automated g4 rollback of changelist 204783809.
*** Reason for rollback ***

It's still having the same issues from b/79463634 in sandbox, so we don't want to deploy it to prod.

*** Original change description ***

Switch pubapi/default service to basic scaling in prod/sandbox

Also goes back up to 100 max instances.

Hopefully this'll work better this time.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206975159
2018-08-10 13:46:48 -04:00
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