1
0
mirror of https://github.com/google/nomulus synced 2025-12-23 14:25:44 +00:00

Fix keyring in BEAM pipeline (#2632)

SecretManager based keyring not included in keyring bindings, resulting
in runtime failure.

We should simply keyring bindings. There is no use case for multiple
implementations. See b/388835696.
This commit is contained in:
Weimin Yu
2025-01-09 15:01:32 -05:00
committed by GitHub
parent 1cbbc660d2
commit c2030e5859

View File

@@ -36,6 +36,7 @@ import dagger.Provides;
import google.registry.config.RegistryConfig.Config;
import google.registry.keyring.KeyringModule;
import google.registry.keyring.api.DummyKeyringModule;
import google.registry.keyring.secretmanager.SecretManagerKeyringModule;
import google.registry.persistence.transaction.CloudSqlCredentialSupplier;
import google.registry.persistence.transaction.JpaTransactionManager;
import google.registry.persistence.transaction.JpaTransactionManagerImpl;
@@ -66,7 +67,14 @@ import javax.inject.Singleton;
import org.hibernate.cfg.Environment;
/** Dagger module class for the persistence layer. */
@Module(includes = {KeyringModule.class, SecretManagerModule.class, DummyKeyringModule.class})
// TODO(b/388835696): Use SecreteManagerKeyring in all environments and drop the `includes` below.
@Module(
includes = {
KeyringModule.class,
SecretManagerModule.class,
DummyKeyringModule.class,
SecretManagerKeyringModule.class
})
public abstract class PersistenceModule {
// This name must be the same as the one defined in persistence.xml.