google-nomulus/javatests/google/registry/flows
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
..
async Test AsyncFlowMetrics without mock 2018-10-22 19:10:01 -04:00
contact Consolidate generic success response XMLs in unit tests 2018-06-27 15:28:52 -04:00
custom Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
domain Refactor LordnTask to LordnTaskUtils 2018-10-22 18:59:48 -04:00
host Consolidate generic success response XMLs in unit tests 2018-06-27 15:28:52 -04:00
poll Add more absent clTrid unit tests 2018-06-27 15:28:52 -04:00
session Remove checking of SNI headers 2018-09-14 21:34:44 -04:00
testdata Sanitize EPP XML requests and responses 2018-08-10 13:46:48 -04:00
BUILD Test AsyncFlowMetrics without mock 2018-10-22 19:10:01 -04:00
CheckApiActionTest.java Start using non-EPP-flow-wrapping implementation in CheckAPI 2018-06-27 15:28:52 -04:00
EppCommitLogsTest.java Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
EppConsoleActionTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
EppControllerTest.java Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
EppLifecycleContactTest.java Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
EppLifecycleDomainApplicationTest.java Inject clock for Tmch validity using InjectRule instead of manually 2018-06-27 15:28:53 -04:00
EppLifecycleDomainTest.java Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
EppLifecycleHostTest.java Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
EppLifecycleLoginTest.java Refactor assertCommandAndResponse to be "fluent" 2018-04-02 16:42:59 -04:00
EppLoggedOutTest.java Refactor assertCommandAndResponse to be "fluent" 2018-04-02 16:42:59 -04:00
EppLoginAdminUserTest.java Refactor assertCommandAndResponse to be "fluent" 2018-04-02 16:42:59 -04:00
EppLoginTlsTest.java Remove checking of SNI headers 2018-09-14 21:34:44 -04:00
EppLoginUserTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
EppTestCase.java Refactor TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
EppTestComponent.java Refactor TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
EppTlsActionTest.java Remove checking of SNI headers 2018-09-14 21:34:44 -04:00
EppToolActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
EppXmlSanitizerTest.java Fix bugs exposed by testing with Gradle 2018-10-17 11:44:41 -04:00
EppXmlTransformerTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
EppXxeAttackTest.java Refactor assertCommandAndResponse to be "fluent" 2018-04-02 16:42:59 -04:00
ExtensionManagerTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
FlowReporterTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
FlowRunnerTest.java Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
FlowTestCase.java Refactor TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
ResourceCheckFlowTestCase.java Add base AllocationToken validation logic for domain checks 2018-01-19 14:32:48 -05:00
ResourceFlowTestCase.java Add more absent clTrid unit tests 2018-06-27 15:28:52 -04:00
TlsCredentialsTest.java Remove checking of SNI headers 2018-09-14 21:34:44 -04:00