Replace VoidKeyring with InMemoryKeyring and a dummy module

VoidKeyring always threw exceptions whenever any of its methods were called,
which caused several parts of the system to fail early (and thus required a
proper Keyring to be implemented almost immediately, early on in the "just
playing around with the system" phase).

I'm swapping this out with an InMemoryKeyring which is supplied by
DummyKeyringModule, which, instead of throwing exceptions, returns dummy
values, delaying the onset of errors to when connecting to external services
is attempted.  This pushes off the required implementation of a real Keyring-
providing module, allowing the system to be played around with more first.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132361157
This commit is contained in:
mcilwain 2016-09-06 14:16:08 -07:00 committed by Ben McIlwain
parent 27dfe358ce
commit 3b4b7a475b
12 changed files with 326 additions and 171 deletions

View file

@ -22,7 +22,7 @@ import google.registry.groups.DirectoryModule;
import google.registry.groups.GroupsModule;
import google.registry.groups.GroupssettingsModule;
import google.registry.keyring.api.KeyModule;
import google.registry.keyring.api.VoidKeyringModule;
import google.registry.keyring.api.DummyKeyringModule;
import google.registry.request.Modules.AppIdentityCredentialModule;
import google.registry.request.Modules.DatastoreServiceModule;
import google.registry.request.Modules.GoogleCredentialModule;
@ -53,7 +53,7 @@ import javax.inject.Singleton;
UseAppIdentityCredentialForGoogleApisModule.class,
SystemClockModule.class,
SystemSleeperModule.class,
VoidKeyringModule.class,
DummyKeyringModule.class,
})
interface ToolsComponent {
ToolsRequestComponent startRequest(RequestModule requestModule);