File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def _adjust_path(self, path: str) -> str:
69
69
if path .startswith ("secret/" ) and not path .startswith ("secret/data/" ):
70
70
return path .replace ("secret/" , "secret/data/" )
71
71
return path
72
-
72
+
73
73
def _vault_auth (self ):
74
74
if not self .vault_token :
75
75
self .vault_token = self ._get_vault_token_via_kube_auth ()
@@ -78,14 +78,14 @@ def _vault_auth(self):
78
78
}
79
79
if self .pomerium_cookie :
80
80
self .headers ["cookie" ] = f"_pomerium={ self .pomerium_cookie } "
81
-
81
+
82
82
@vault_response_handler
83
83
def _query_vault (
84
84
self ,
85
85
secret_path : str
86
86
):
87
87
self ._vault_auth ()
88
-
88
+
89
89
secret_path = self ._adjust_path (secret_path )
90
90
91
91
return requests .get (
@@ -102,7 +102,7 @@ def get_data_from_vault(
102
102
self ._vault_auth ()
103
103
response_data = self ._query_vault (
104
104
secret_path = secret_path
105
- )
105
+ )
106
106
if 'data' not in response_data :
107
107
raise Exception ("Missing data." )
108
108
@@ -120,7 +120,7 @@ def write_data_to_vault(
120
120
data : dict
121
121
):
122
122
self ._vault_auth ()
123
-
123
+
124
124
secret_path = self ._adjust_path (secret_path )
125
125
126
126
write_vault_path = f"{ self .vault_url } /v1/{ secret_path } "
You can’t perform that action at this time.
0 commit comments