google-nomulus/java/google/registry/tmch
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
..
BUILD Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
ClaimsListParser.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
icann-tmch-pilot.crl Update signed marks files and add an expiration test 2018-06-27 15:28:53 -04:00
icann-tmch-pilot.crt Use enum instead of boolean for TMCH CA mode 2017-01-18 11:11:35 -05:00
icann-tmch.crl Update signed marks files and add an expiration test 2018-06-27 15:28:53 -04:00
icann-tmch.crt mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
LordnLog.java Add more valid response codes to Lordn 2018-05-30 12:18:54 -04:00
LordnRequestInitializer.java Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
LordnTaskUtils.java Refactor LordnTask to LordnTaskUtils 2018-10-22 18:59:48 -04:00
marksdb-public-key.asc mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
Marksdb.java Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
NordnUploadAction.java Refactor StringGenerator bindings 2018-10-22 19:06:35 -04:00
NordnVerifyAction.java Migrate to Flogger (green) 2018-05-30 12:18:54 -04:00
package-info.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
SmdrlCsvParser.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
TmchCertificateAuthority.java Refactor TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
TmchCrlAction.java Remove unnecessary generic type arguments 2017-11-21 18:17:31 -05:00
TmchData.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
TmchDnlAction.java Migrate to Flogger (green) 2018-05-30 12:18:54 -04:00
TmchModule.java Don't add all claims data to NORDN verify task 2018-05-17 21:52:35 -04:00
TmchSmdrlAction.java Migrate to Flogger (green) 2018-05-30 12:18:54 -04:00
TmchXmlSignature.java Un-Ignore a test in DomainApplicationCreateFlowTest 2017-05-03 10:44:56 -04:00