Skip to content

Commit

Permalink
iwp
Browse files Browse the repository at this point in the history
  • Loading branch information
alafanechere committed May 17, 2024
1 parent 2e11783 commit 6ee7d9e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions airbyte-ci/connectors/pipelines/pipelines/models/secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,12 @@ class SecretNotFoundError(Exception):


class SecretStore(ABC):
@property
@abstractmethod
def name(self):
raise NotImplementedError()

@abstractmethod
def fetch_secret(self, name: str) -> str:
raise NotImplementedError()


class GSMSecretStore(SecretStore):


def __init__(self, gcp_credentials: Secret) -> None:
service_account_info = json.loads(gcp_credentials.value)
credentials = service_account.Credentials.from_service_account_info(service_account_info)
Expand Down Expand Up @@ -62,8 +55,6 @@ def fetch_secret(self, name: str) -> str:


class EnvVarSecretStore(SecretStore):


def fetch_secret(self, name: str) -> str:
try:
return os.environ[name]
Expand All @@ -72,7 +63,6 @@ def fetch_secret(self, name: str) -> str:


class LocalDirectorySecretStore(SecretStore):

def __init__(self, local_directory_path: Path) -> None:
if not local_directory_path.exists() or not local_directory_path.is_dir():
raise ValueError(f"The path {local_directory_path} does not exists on your filesystem or is not a directory.")
Expand All @@ -88,7 +78,6 @@ def fetch_secret(self, name: str) -> str:


class InMemorySecretStore(SecretStore):

def __init__(self) -> None:
self._store: Dict[str, str] = {}

Expand Down

0 comments on commit 6ee7d9e

Please sign in to comment.