google-nomulus/javatests/google/registry/tools
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
..
params Rename "absent" to "empty" in test names 2018-08-10 13:46:48 -04:00
server Delete all Limited Release Program (LRP) code 2018-08-20 14:28:16 -04:00
testdata Update signed marks files and add an expiration test 2018-06-27 15:28:53 -04:00
AllocateDomainCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
AuthModuleTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
BUILD Clean up internal imports in BUILD files 2018-07-14 01:37:03 -04:00
CheckDomainClaimsCommandTest.java Default to admin registrar in check_domain commands 2018-09-08 00:19:53 -04:00
CheckDomainCommandTest.java Default to admin registrar in check_domain commands 2018-09-08 00:19:53 -04:00
CommandTestCase.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ComparableEntityTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
CompareDbBackupsTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
CountDomainsCommandTest.java Add nomulus count_domains command 2018-05-05 23:37:11 -04:00
CreateAnchorTenantCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
CreateCdnsTldTest.java Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
CreateContactCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
CreateDomainCommandTest.java Allow square bracket expansion when specifying nameservers 2018-08-10 13:44:25 -04:00
CreateHostCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
CreateOrUpdatePremiumListCommandTestCase.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
CreateOrUpdateReservedListCommandTestCase.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
CreatePremiumListCommandTest.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
CreateRegistrarCommandTest.java Handle Purchase Order numbers explicitly in billing pipeline 2018-09-20 11:19:36 -04:00
CreateRegistrarGroupsCommandTest.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
CreateReservedListCommandTest.java Remove more unnecessary "throws" declarations 2018-06-27 15:28:52 -04:00
CreateTldCommandTest.java Remove the deprecated MISTAKEN_PREMIUM reservation type 2018-09-14 21:28:23 -04:00
CurlCommandTest.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
DefaultRequestFactoryModuleTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DeleteAllocationTokensCommandTest.java Add nomulus command for deleting AllocationTokens 2018-10-03 11:54:10 -04:00
DeleteDomainCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DeleteHostCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DeletePremiumListCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DeleteReservedListCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DeleteTldCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DomainApplicationInfoCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
EncryptEscrowDepositCommandTest.java Simplify the RyDE API 2018-07-17 22:03:53 -04:00
EppToolCommandTest.java Don't prompt to confirm non-mutating nomulus EPP tool commands 2018-04-10 16:53:18 -04:00
EppToolCommandTestCase.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
EppToolVerifier.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
ExecuteEppCommandTest.java Do not use InjectRule to mock stdin in ExecuteEppCommandTest 2018-10-22 18:46:36 -04:00
GenerateAllocationTokensCommandTest.java Increase default allocation token length to 16 2018-08-10 13:46:48 -04:00
GenerateAuctionDataCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GenerateDnsReportCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GenerateEscrowDepositCommandTest.java Wrap ModulesService in new AppEngineServiceUtils 2018-08-10 13:44:25 -04:00
GetApplicationCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetApplicationIdsCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetClaimsListCommandTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
GetContactCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetDomainCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetHistoryEntriesCommandTest.java Pretty-print actual XML in tests 2018-07-14 01:37:03 -04:00
GetHostCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetRegistrarCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetResourceByKeyCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetSchemaTreeCommandTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
GetTldCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GhostrydeCommandTest.java Simplify the Ghostryde API 2018-06-27 15:28:53 -04:00
GtechToolTest.java Add a command-line tool suitable for tech support usage 2018-09-20 11:19:36 -04:00
LevelDbFileBuilder.java Implement compare_db_backups "main" 2017-09-20 10:27:17 -04:00
LevelDbFileBuilderTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
LevelDbLogReaderTest.java Create an entity record accumulator 2017-09-12 15:51:50 -04:00
LevelDbUtil.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
ListCursorsCommandTest.java Add an auto update time field to the Cursor entity 2018-08-10 13:44:25 -04:00
ListDomainsCommandTest.java Default to REAL TLDs in nomulus list_domains command 2018-10-22 18:53:16 -04:00
ListHostsCommandTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListObjectsCommandTestCase.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
ListPremiumListsCommandTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListRegistrarsCommandTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListReservedListsCommandTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListTldsCommandTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
LoadTestCommandTest.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
LockDomainCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
MutatingCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
MutatingEppToolCommandTest.java Don't prompt to confirm non-mutating nomulus EPP tool commands 2018-04-10 16:53:18 -04:00
NonMutatingEppToolCommandTest.java Don't prompt to confirm non-mutating nomulus EPP tool commands 2018-04-10 16:53:18 -04:00
RecordAccumulatorTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
RegistrarContactCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
RegistryToolEnvironmentTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
RegistryToolTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
RenewDomainCommandTest.java Add a nomulus renew_domain command 2018-06-06 15:16:09 -04:00
ResaveEntitiesCommandTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
ResaveEnvironmentEntitiesCommandTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
ResaveEppResourcesCommandTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
SetupOteCommandTest.java Add registrar contact to OTE registrars 2018-10-22 18:58:06 -04:00
ShellCommandTest.java Automated g4 rollback of changelist 212879670. 2018-10-03 11:50:47 -04:00
UniformRapidSuspensionCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UnlockDomainCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UpdateApplicationStatusCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UpdateClaimsNoticeCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UpdateCursorsCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UpdateDomainCommandTest.java Allow square bracket expansion when specifying nameservers 2018-08-10 13:44:25 -04:00
UpdatePremiumListCommandTest.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
UpdateRegistrarCommandTest.java Handle Purchase Order numbers explicitly in billing pipeline 2018-09-20 11:19:36 -04:00
UpdateReservedListCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UpdateServerLocksCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UpdateSmdCommandTest.java Refactor TmchCertificateAuthority 2018-10-25 14:40:38 -04:00
UpdateTldCommandTest.java Remove the deprecated MISTAKEN_PREMIUM reservation type 2018-09-14 21:28:23 -04:00
UploadClaimsListCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ValidateEscrowDepositCommandTest.java Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
ValidateLoginCredentialsCommandTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
VerifyOteCommandTest.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00