Class DummyKeyringModule

java.lang.Object
google.registry.keyring.api.DummyKeyringModule

@Module @Immutable public abstract class DummyKeyringModule extends Object
Dagger keyring module that provides an InMemoryKeyring instance populated with dummy values.

This dummy module allows the domain registry code to compile and run in an unmodified state, with all attempted outgoing connections failing because the supplied dummy credentials aren't valid. For a real system that needs to connect with external services, you should replace this module with one that loads real credentials from secure sources.

The dummy PGP keyrings are created using gnupg1/pgp1 roughly like the following (using gnupg2/pgp2 is an exercise left for the developer):


 # mkdir gpg
 # chmod 700 gpg
 # gpg1 --homedir gpg --gen-key <<<EOF
 1
 1024
 0
 Y
 Test Registry
 test-registry@example.com

 O
 EOF
 [press enter twice at keyring password prompts]
 # gpg1 --homedir gpg -a -o pgp-public-keyring.asc --export test-registry@example.com
 # gpg1 --homedir gpg -a -o pgp-private-keyring.asc --export-secret-keys test-registry@example.com
 # mv pgp*keyring.asc java/google/registry/keyring/api
 # rm -rf gpg