google-nomulus/javatests/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 Format .bzl files with buildifier 2018-07-14 01:37:03 -04:00
config Mark CloudDnsConfigTest as GoogleInternal 2018-09-20 11:19:36 -04:00
cron Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
dns Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
export Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
flows Refactor TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
groups Clean up internal imports in BUILD files 2018-07-14 01:37:03 -04:00
keyring Delete all Braintree code 2018-07-14 01:37:03 -04:00
mapreduce/inputs Clean up internal imports in BUILD files 2018-07-14 01:37:03 -04:00
model Explicitly set the shard size when saving the claims list 2018-10-22 19:13:11 -04:00
module Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -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 Update Spec 11 emails body and add a bcc address. 2018-10-17 11:51:28 -04:00
request Get rid of Providers class 2018-09-20 11:19:36 -04:00
security Improve internal build system speed 2018-06-27 15:28:52 -04:00
server Delete all Braintree code 2018-07-14 01:37:03 -04:00
storage/drive Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
testing Refactor LordnTask to LordnTaskUtils 2018-10-22 18:59:48 -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 TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
ui Allow admins read/write access to all registrar in web console 2018-10-22 19:08:09 -04:00
util Remove InjectRule in UrlFetchUtilsTest 2018-10-22 18:56:30 -04:00
whois Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
xjc Clean up internal imports in BUILD files 2018-07-14 01:37:03 -04:00
xml Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00