google-nomulus/java/google/registry
jianglai 57d95d4bec Refactor TmchCertificateAuthority
The main goal of this CL is to make the clock constructor injectable (so that tests do not need to use InjectRule to override the clock). The complication is that the clock is used by two static caches (ROOT_CACHE directly and CRL_CACHE indirectly). The clock is not actually used to construct the lock, but rather to verify that the root certificate is within its validity period.

For ROOT_CACHE we move the verification to its call sites. This adds a bit overhead because the validity check happens every time the cache is called, not just when the cache is built or refreshed. However this check is rather cheap.  Also the resources are included in the jar and the cache is valid for 1 year. Given that we deploy every week, there's not much point making it an expiring cache rather than a static map.

For CRL_CACHE we change the key to a tuple of TmchCaMode and X509Certificate. The certificate is no longer provided from the ROOT_CACHE directly and must be verified before it is provided as a cache key. We left the CRL verification inside the cache loader because it (signature verification) is more expensive compared to simple expiration check, and we do not want to do this every time the cache is called.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218385684
2018-10-25 14:40:38 -04:00
..
backup Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
batch Delete the verify entity integrity mapreduce 2018-09-20 11:19:36 -04:00
beam Do not include transactions with zero unit price in invoice 2018-10-08 16:59:29 -04:00
bigquery Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
builddefs Remove the deprecated, now no-op, "data" transition 2018-08-10 13:44:25 -04:00
config Refactor StringGenerator bindings 2018-10-22 19:06:35 -04:00
cron Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
dns Update dependencies to satisfy strictness and remove -jpl_strict_deps feature 2018-09-14 21:33:08 -04:00
env Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
export Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
flows Test AsyncFlowMetrics without mock 2018-10-22 19:10:01 -04:00
gcs Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
groups Refactor DelegatedCredential provisioning for GSuite domains 2018-09-11 14:18:41 -04:00
idn Update IDN tables to comply with https://www.iana.org/help/idn-repository-procedure 2018-02-01 21:59:14 -05:00
keyring Allow choice of Keyring to be configured in YAML 2018-10-17 11:48:12 -04:00
loadtest Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
mapreduce Use locking on async mapreduces 2018-08-10 13:44:25 -04:00
model Explicitly set the shard size when saving the claims list 2018-10-22 19:13:11 -04:00
module Allow choice of Keyring to be configured in YAML 2018-10-17 11:48:12 -04:00
monitoring/whitebox Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
pricing Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
proxy Fix EPP quota handling bug 2018-10-17 11:56:04 -04:00
rdap Allow admins read/write access to all registrar in web console 2018-10-22 19:08:09 -04:00
rde Refactor StringGenerator bindings 2018-10-22 19:06:35 -04:00
reporting Change SendEmailService to an instance field. 2018-10-22 18:43:18 -04:00
request Include the performing user in the "Registrar updated" emails 2018-10-22 18:41:38 -04:00
security Improve internal build system speed 2018-06-27 15:28:52 -04:00
storage/drive Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
tldconfig/idn Remove the use of InjectRule in IdnLabelValidatorTest 2018-10-22 18:54:53 -04:00
tmch Refactor TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
tools Refactor StringGenerator bindings 2018-10-22 19:06:35 -04:00
ui Allow admins read/write access to all registrar in web console 2018-10-22 19:08:09 -04:00
util Refactor StringGenerator bindings 2018-10-22 19:06:35 -04:00
whois Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
xjc Run bazel installer as a argument to bash 2018-08-10 13:44:25 -04:00
xml Pretty-print actual XML in tests 2018-07-14 01:37:03 -04:00
BUILD Remove deprecated DNS subsystem 2018-09-14 12:01:08 -04:00
repositories.bzl Update apache sshd version 2018-10-08 16:59:29 -04:00