File size: 992 Bytes
1b7e88c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from abc import ABC, abstractmethod
from typing import List

from omagent_core.engine.orkes.models.metadata_tag import MetadataTag


class SecretClient(ABC):
    @abstractmethod
    def put_secret(self, key: str, value: str):
        pass

    @abstractmethod
    def get_secret(self, key: str) -> str:
        pass

    @abstractmethod
    def list_all_secret_names(self) -> set[str]:
        pass

    @abstractmethod
    def list_secrets_that_user_can_grant_access_to(self) -> List[str]:
        pass

    @abstractmethod
    def delete_secret(self, key: str):
        pass

    @abstractmethod
    def secret_exists(self, key: str) -> bool:
        pass

    @abstractmethod
    def set_secret_tags(self, tags: List[MetadataTag], key: str):
        pass

    @abstractmethod
    def get_secret_tags(self, key: str) -> List[MetadataTag]:
        pass

    @abstractmethod
    def delete_secret_tags(
        self, tags: List[MetadataTag], key: str
    ) -> List[MetadataTag]:
        pass