Skip to content

Commit

Permalink
Data plane needs gcp secret hydrator and persistence for replication …
Browse files Browse the repository at this point in the history
…activity (airbytehq#17149)

* use prototype for jwt signature because we need a new one

* add comments on why using provider and prototype:

* secret hydrator fix for data plane

* style fix
  • Loading branch information
xiaohansong authored and jhammarstedt committed Oct 31, 2022
1 parent 4f7805c commit 890ed2c
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import io.airbyte.config.persistence.split_secrets.GoogleSecretManagerPersistence;
import io.airbyte.config.persistence.split_secrets.LocalTestingSecretPersistence;
import io.airbyte.config.persistence.split_secrets.NoOpSecretsHydrator;
import io.airbyte.config.persistence.split_secrets.RealSecretsHydrator;
import io.airbyte.config.persistence.split_secrets.SecretPersistence;
import io.airbyte.config.persistence.split_secrets.SecretsHydrator;
Expand Down Expand Up @@ -52,8 +51,6 @@ public SecretPersistence localTestingSecretPersistence(@Named("configDatabase")
@Singleton
@Requires(property = "airbyte.secret.persistence",
pattern = "(?i)^google_secret_manager$")
@Requires(property = "airbyte.worker.plane",
pattern = "(?i)^(?!data_plane).*")
@Named("secretPersistence")
public SecretPersistence googleSecretPersistence(@Value("${airbyte.secret.store.gcp.credentials}") final String credentials,
@Value("${airbyte.secret.store.gcp.project-id}") final String projectId) {
Expand All @@ -73,17 +70,8 @@ public SecretPersistence vaultSecretPersistence(@Value("${airbyte.secret.store.v
}

@Singleton
@Requires(property = "airbyte.worker.plane",
pattern = "(?i)^(?!data_plane).*")
public SecretsHydrator secretsHydrator(@Named("secretPersistence") final SecretPersistence secretPersistence) {
return new RealSecretsHydrator(secretPersistence);
}

@Singleton
@Requires(property = "airbyte.worker.plane",
pattern = "(?i)^data_plane$")
public SecretsHydrator secretsHydrator() {
return new NoOpSecretsHydrator();
}

}

0 comments on commit 890ed2c

Please sign in to comment.