vgs-api-client 0.0.1.dev202305161416__py3-none-any.whl → 0.0.1.dev202404232319__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vgs/__init__.py +3 -3
- vgs/aliases_api.py +21 -12
- vgs/base_api.py +1 -3
- vgs/configuration.py +7 -5
- vgs/control_plane/__init__.py +1 -0
- vgs/control_plane/apis/__init__.py +1 -0
- vgs/control_plane/apis/vault_management.py +0 -0
- vgs/control_plane/clients/__init__.py +1 -0
- vgs/control_plane/clients/organizations.py +2 -0
- vgs/control_plane/clients/vaults.py +6 -0
- vgs/functions_api.py +7 -19
- vgs/sdk/account_mgmt.py +1 -1
- vgs/sdk/accounts_api.py +1 -1
- vgs/sdk/auth_api.py +2 -2
- vgs/sdk/errors.py +3 -11
- vgs/sdk/routes.py +9 -0
- vgs/sdk/vault_mgmt.py +1 -1
- vgs/sdk/vaults_api.py +1 -1
- vgs_api_client/__init__.py +2 -2
- vgs_api_client/api/aliases_api.py +182 -11
- vgs_api_client/api_client.py +2 -2
- vgs_api_client/configuration.py +2 -2
- vgs_api_client/exceptions.py +1 -1
- vgs_api_client/model/{alias.py → alias_dto.py} +4 -4
- vgs_api_client/model/alias_format.py +10 -6
- vgs_api_client/model/api_error.py +1 -1
- vgs_api_client/model/batch_aliases_request.py +264 -0
- vgs_api_client/model/create_aliases_request.py +4 -6
- vgs_api_client/model/create_aliases_request_new.py +1 -1
- vgs_api_client/model/create_aliases_request_reference.py +1 -1
- vgs_api_client/model/inline_response200.py +1 -1
- vgs_api_client/model/inline_response2001.py +1 -1
- vgs_api_client/model/inline_response201.py +1 -1
- vgs_api_client/model/inline_response_default.py +1 -1
- vgs_api_client/model/revealed_data.py +9 -9
- vgs_api_client/model/update_alias_request.py +1 -1
- vgs_api_client/model/update_alias_request_data.py +1 -1
- vgs_api_client/model_utils.py +1 -1
- vgs_api_client/models/__init__.py +2 -1
- vgs_api_client/rest.py +1 -1
- vgs_api_client-0.0.1.dev202404232319.dist-info/METADATA +95 -0
- vgs_api_client-0.0.1.dev202404232319.dist-info/RECORD +57 -0
- {vgs_api_client-0.0.1.dev202305161416.dist-info → vgs_api_client-0.0.1.dev202404232319.dist-info}/top_level.txt +0 -1
- vgs_api_client-0.0.1.dev202305161416.dist-info/METADATA +0 -75
- vgs_api_client-0.0.1.dev202305161416.dist-info/RECORD +0 -50
- /sdk/__init__.py → /vgs/control_plane/apis/account_management.py +0 -0
- {vgs_api_client-0.0.1.dev202305161416.dist-info → vgs_api_client-0.0.1.dev202404232319.dist-info}/LICENSE +0 -0
- {vgs_api_client-0.0.1.dev202305161416.dist-info → vgs_api_client-0.0.1.dev202404232319.dist-info}/WHEEL +0 -0
vgs/__init__.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
__version__ = "0.0.1
|
|
1
|
+
__version__ = "0.0.1.dev202404232319"
|
|
2
2
|
|
|
3
3
|
# import Aliases
|
|
4
4
|
from vgs.aliases_api import Aliases
|
|
5
|
-
from vgs.
|
|
6
|
-
from vgs.configuration import config, Configuration
|
|
5
|
+
from vgs.configuration import VGSConfiguration, config
|
|
7
6
|
from vgs.exceptions import *
|
|
7
|
+
from vgs.functions_api import Functions
|
vgs/aliases_api.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import logging
|
|
2
|
+
|
|
2
3
|
import vgs_api_client
|
|
3
|
-
from vgs.configuration import Configuration
|
|
4
4
|
from vgs_api_client import Configuration
|
|
5
5
|
from vgs_api_client.api import aliases_api
|
|
6
6
|
from vgs_api_client.exceptions import (
|
|
7
7
|
ApiException,
|
|
8
|
+
ForbiddenException,
|
|
8
9
|
NotFoundException,
|
|
9
10
|
UnauthorizedException,
|
|
10
|
-
ForbiddenException,
|
|
11
11
|
)
|
|
12
12
|
from vgs_api_client.model.alias_format import AliasFormat
|
|
13
13
|
from vgs_api_client.model.create_aliases_request import CreateAliasesRequest
|
|
@@ -15,6 +15,9 @@ from vgs_api_client.model.create_aliases_request_new import CreateAliasesRequest
|
|
|
15
15
|
from vgs_api_client.model.update_alias_request import UpdateAliasRequest
|
|
16
16
|
from vgs_api_client.model.update_alias_request_data import UpdateAliasRequestData
|
|
17
17
|
|
|
18
|
+
import vgs.exceptions
|
|
19
|
+
from vgs.configuration import VGSConfiguration
|
|
20
|
+
|
|
18
21
|
|
|
19
22
|
def _map_exception(message, e):
|
|
20
23
|
error_message = message
|
|
@@ -36,7 +39,7 @@ class Aliases:
|
|
|
36
39
|
|
|
37
40
|
self._api = aliases_api.AliasesApi(
|
|
38
41
|
vgs_api_client.ApiClient(
|
|
39
|
-
|
|
42
|
+
VGSConfiguration(username=config.username, password=config.password, host=config.host)
|
|
40
43
|
)
|
|
41
44
|
)
|
|
42
45
|
|
|
@@ -58,30 +61,36 @@ class Aliases:
|
|
|
58
61
|
api_response = self._api.create_aliases(create_aliases_request=create_aliases_request)
|
|
59
62
|
return api_response["data"]
|
|
60
63
|
except Exception as e:
|
|
61
|
-
|
|
64
|
+
logging.exception(e)
|
|
65
|
+
ex = _map_exception(f"Failed to redact data ${data}", e)
|
|
66
|
+
raise ex
|
|
62
67
|
|
|
63
68
|
def reveal(self, aliases):
|
|
64
69
|
# TODO: validate data and raise meaningful exception on validation error
|
|
65
70
|
try:
|
|
66
71
|
query = ",".join(aliases) if isinstance(aliases, list) else aliases
|
|
67
|
-
api_response = self._api.reveal_multiple_aliases(
|
|
72
|
+
api_response = self._api.reveal_multiple_aliases(aliases=query)
|
|
68
73
|
return api_response["data"]
|
|
69
74
|
except Exception as e:
|
|
70
|
-
|
|
75
|
+
logging.exception(e)
|
|
76
|
+
ex = _map_exception(f"Failed to reveal aliases ${aliases}", e)
|
|
77
|
+
raise ex
|
|
71
78
|
|
|
72
79
|
def delete(self, alias):
|
|
73
80
|
try:
|
|
74
81
|
self._api.delete_alias(alias=alias)
|
|
75
82
|
except Exception as e:
|
|
76
|
-
|
|
83
|
+
logging.exception(e)
|
|
84
|
+
ex = _map_exception(f"Failed to reveal delete ${alias}", e)
|
|
85
|
+
raise ex
|
|
77
86
|
|
|
78
87
|
def update(self, alias, data):
|
|
79
88
|
try:
|
|
80
89
|
self._api.update_alias(
|
|
81
90
|
alias=alias,
|
|
82
|
-
update_alias_request=UpdateAliasRequest(
|
|
83
|
-
UpdateAliasRequestData(data["classifiers"])
|
|
84
|
-
),
|
|
91
|
+
update_alias_request=UpdateAliasRequest(UpdateAliasRequestData(data["classifiers"])),
|
|
85
92
|
)
|
|
86
93
|
except Exception as e:
|
|
87
|
-
|
|
94
|
+
logging.exception(e)
|
|
95
|
+
ex = _map_exception(f"Failed to update alias ${alias}.", e)
|
|
96
|
+
raise ex
|
vgs/base_api.py
CHANGED
|
@@ -33,9 +33,7 @@ class BaseApi(object):
|
|
|
33
33
|
self.refresh_token = response.body.get(self.REFRESH_TOKEN_KEY)
|
|
34
34
|
else:
|
|
35
35
|
if not auth_api.validate_access_token(self.auth_token):
|
|
36
|
-
response = auth_api.refresh_token(
|
|
37
|
-
self.auth_api, refresh_token=self.refresh_token
|
|
38
|
-
)
|
|
36
|
+
response = auth_api.refresh_token(self.auth_api, refresh_token=self.refresh_token)
|
|
39
37
|
self.auth_token = response.body.get(self.REFRESH_TOKEN_KEY)
|
|
40
38
|
except Exception as e:
|
|
41
39
|
raise AuthenticationError(e)
|
vgs/configuration.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
from vgs_api_client import Configuration
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class VGSConfiguration(Configuration):
|
|
2
5
|
def __init__(
|
|
3
6
|
self,
|
|
4
7
|
vault_id=None,
|
|
@@ -8,15 +11,14 @@ class Configuration:
|
|
|
8
11
|
environment="sandbox",
|
|
9
12
|
service_account_name=None,
|
|
10
13
|
service_account_password=None,
|
|
14
|
+
**kwargs,
|
|
11
15
|
):
|
|
16
|
+
super(VGSConfiguration, self).__init__(username=username, password=password, host=host, **kwargs)
|
|
12
17
|
self.vault_id = vault_id
|
|
13
|
-
self.username = username
|
|
14
|
-
self.password = password
|
|
15
|
-
self.host = host
|
|
16
18
|
self.environment = environment
|
|
17
19
|
self.service_account_name = service_account_name
|
|
18
20
|
self.service_account_password = service_account_password
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
def config(*args, **kwargs):
|
|
22
|
-
return
|
|
24
|
+
return VGSConfiguration(*args, **kwargs)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import apis, clients
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import account_management, vault_management
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import organizations, vaults
|
vgs/functions_api.py
CHANGED
|
@@ -16,7 +16,7 @@ from vgs import certs
|
|
|
16
16
|
from vgs.base_api import BaseApi
|
|
17
17
|
from vgs.configuration import Configuration
|
|
18
18
|
|
|
19
|
-
USER_AGENT = "vgs-sdk/0.0.1
|
|
19
|
+
USER_AGENT = "vgs-sdk/0.0.1.dev202404232319/python"
|
|
20
20
|
|
|
21
21
|
ECHO_SECURE_HOST_CONFIG = "echo\\.secure\\.verygood\\.systems"
|
|
22
22
|
FUNCTION_CONDITION_EXPRESSION = (
|
|
@@ -178,9 +178,7 @@ class Functions(BaseApi):
|
|
|
178
178
|
|
|
179
179
|
@staticmethod
|
|
180
180
|
def _extract_larky(route_config):
|
|
181
|
-
script = route_config["attributes"]["entries"][0]["operations"][0][0]["parameters"][
|
|
182
|
-
"script"
|
|
183
|
-
]
|
|
181
|
+
script = route_config["attributes"]["entries"][0]["operations"][0][0]["parameters"]["script"]
|
|
184
182
|
return script
|
|
185
183
|
|
|
186
184
|
@staticmethod
|
|
@@ -189,10 +187,7 @@ class Functions(BaseApi):
|
|
|
189
187
|
try:
|
|
190
188
|
host_endpoint = route["attributes"]["host_endpoint"]
|
|
191
189
|
filter_config = str(route["attributes"]["entries"][0]["config"])
|
|
192
|
-
if
|
|
193
|
-
host_endpoint == ECHO_SECURE_HOST_CONFIG
|
|
194
|
-
and FUNCTION_CONDITION_EXPRESSION in filter_config
|
|
195
|
-
):
|
|
190
|
+
if host_endpoint == ECHO_SECURE_HOST_CONFIG and FUNCTION_CONDITION_EXPRESSION in filter_config:
|
|
196
191
|
function_name = route["attributes"]["tags"]["name"]
|
|
197
192
|
yield function_name
|
|
198
193
|
except Exception as e:
|
|
@@ -206,9 +201,7 @@ class Functions(BaseApi):
|
|
|
206
201
|
|
|
207
202
|
@staticmethod
|
|
208
203
|
def _function_id(name):
|
|
209
|
-
return uuid.uuid5(
|
|
210
|
-
uuid.NAMESPACE_URL, f"https://echo.secure.verygood.systems/post?function_name={name}"
|
|
211
|
-
)
|
|
204
|
+
return uuid.uuid5(uuid.NAMESPACE_URL, f"https://echo.secure.verygood.systems/post?function_name={name}")
|
|
212
205
|
|
|
213
206
|
@staticmethod
|
|
214
207
|
def _get_proxy_host(environment):
|
|
@@ -261,9 +254,7 @@ class Functions(BaseApi):
|
|
|
261
254
|
return routes_api.routes.delete(route_id)
|
|
262
255
|
|
|
263
256
|
def _create_routes_api(self):
|
|
264
|
-
api = vgs.sdk.vaults_api.create_api(
|
|
265
|
-
None, self.config.vault_id, self.auth_environment, self.auth_token
|
|
266
|
-
)
|
|
257
|
+
api = vgs.sdk.vaults_api.create_api(None, self.config.vault_id, self.auth_environment, self.auth_token)
|
|
267
258
|
api.headers["User-Agent"] = USER_AGENT
|
|
268
259
|
return api
|
|
269
260
|
|
|
@@ -275,8 +266,7 @@ class Functions(BaseApi):
|
|
|
275
266
|
)
|
|
276
267
|
if not self.config.vault_id:
|
|
277
268
|
raise vgs.exceptions.FunctionsApiException(
|
|
278
|
-
"Functions API configuration is not complete. "
|
|
279
|
-
"Please set 'vault_id' to use functions invocation API."
|
|
269
|
+
"Functions API configuration is not complete. " "Please set 'vault_id' to use functions invocation API."
|
|
280
270
|
)
|
|
281
271
|
username = self.config.username
|
|
282
272
|
password = self.config.password
|
|
@@ -298,9 +288,7 @@ class Functions(BaseApi):
|
|
|
298
288
|
verify=ca_file.name,
|
|
299
289
|
)
|
|
300
290
|
if response.status_code != 200:
|
|
301
|
-
raise vgs.FunctionsApiException(
|
|
302
|
-
f"Failed to invoke function '{name}'. Reason: {response.content}"
|
|
303
|
-
)
|
|
291
|
+
raise vgs.FunctionsApiException(f"Failed to invoke function '{name}'. Reason: {response.content}")
|
|
304
292
|
if response.headers.get("X-VGS-Function") != "True":
|
|
305
293
|
raise vgs.FunctionsApiException(f"Function '{name}' doesn't exist.")
|
|
306
294
|
return response.content
|
vgs/sdk/account_mgmt.py
CHANGED
|
@@ -10,7 +10,7 @@ class AccountMgmtAPI(API):
|
|
|
10
10
|
"Accept": "application/vnd.api+json",
|
|
11
11
|
"Authorization": f"Bearer {access_token}",
|
|
12
12
|
"Content-Type": "application/vnd.api+json",
|
|
13
|
-
"User-Agent": f"VGS SDK 0.0.1
|
|
13
|
+
"User-Agent": f"VGS SDK 0.0.1.dev202404232319",
|
|
14
14
|
},
|
|
15
15
|
json_encode_body=True,
|
|
16
16
|
)
|
vgs/sdk/accounts_api.py
CHANGED
|
@@ -33,7 +33,7 @@ def create_api(token, environment):
|
|
|
33
33
|
headers={
|
|
34
34
|
"Content-Type": "application/vnd.api+json",
|
|
35
35
|
"Accept": "application/vnd.api+json",
|
|
36
|
-
"User-Agent": "VGS SDK {}".format("0.0.1
|
|
36
|
+
"User-Agent": "VGS SDK {}".format("0.0.1.dev202404232319"),
|
|
37
37
|
"Authorization": "Bearer {}".format(token),
|
|
38
38
|
},
|
|
39
39
|
timeout=50, # default timeout in seconds
|
vgs/sdk/auth_api.py
CHANGED
|
@@ -21,7 +21,7 @@ def create_api(environment):
|
|
|
21
21
|
api = API(
|
|
22
22
|
api_root_url=env_url[environment],
|
|
23
23
|
params={}, # default params
|
|
24
|
-
headers={"User-Agent": f"VGS SDK 0.0.1
|
|
24
|
+
headers={"User-Agent": f"VGS SDK 0.0.1.dev202404232319"}, # default headers
|
|
25
25
|
timeout=50, # default timeout in seconds
|
|
26
26
|
append_slash=False, # append slash to final url
|
|
27
27
|
)
|
|
@@ -45,7 +45,7 @@ def logout(api, client_id, access_token, refresh_token):
|
|
|
45
45
|
headers={
|
|
46
46
|
"Authorization": access_token,
|
|
47
47
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
48
|
-
"User-Agent": f"VGS SDK 0.0.1
|
|
48
|
+
"User-Agent": f"VGS SDK 0.0.1.dev202404232319",
|
|
49
49
|
},
|
|
50
50
|
body="client_id={client_id}&refresh_token={refresh_token}".format(
|
|
51
51
|
client_id=client_id, refresh_token=refresh_token
|
vgs/sdk/errors.py
CHANGED
|
@@ -32,11 +32,7 @@ class AuthenticationRequiredError(VgsSDKError):
|
|
|
32
32
|
|
|
33
33
|
class AuthenticationError(VgsSDKError):
|
|
34
34
|
def __init__(self, ctx=None, details=None):
|
|
35
|
-
self.message =
|
|
36
|
-
"Authentication error occurred"
|
|
37
|
-
if ctx and ctx.obj.debug
|
|
38
|
-
else "Authentication error occurred."
|
|
39
|
-
)
|
|
35
|
+
self.message = "Authentication error occurred" if ctx and ctx.obj.debug else "Authentication error occurred."
|
|
40
36
|
|
|
41
37
|
if details:
|
|
42
38
|
self.message = "{message} {details}".format(message=self.message, details=details)
|
|
@@ -88,9 +84,7 @@ class RouteNotValidError(VgsSDKError):
|
|
|
88
84
|
def __init__(self, error_message: str, ctx=None):
|
|
89
85
|
error_message = f"Route cannot be applied due to errors:\n{error_message}"
|
|
90
86
|
self.message = (
|
|
91
|
-
error_message
|
|
92
|
-
if ctx and ctx.obj.debug
|
|
93
|
-
else f"{error_message} (Run with --debug for a traceback.)"
|
|
87
|
+
error_message if ctx and ctx.obj.debug else f"{error_message} (Run with --debug for a traceback.)"
|
|
94
88
|
)
|
|
95
89
|
self.ctx = ctx
|
|
96
90
|
|
|
@@ -156,9 +150,7 @@ def status_code_error(**kwargs):
|
|
|
156
150
|
def init(self, e, ctx=None):
|
|
157
151
|
error_handler = kwargs.get(f"e{e.response.status_code}")
|
|
158
152
|
if error_handler:
|
|
159
|
-
self.message = (
|
|
160
|
-
error_handler(e) if isinstance(error_handler, types.FunctionType) else error_handler
|
|
161
|
-
)
|
|
153
|
+
self.message = error_handler(e) if isinstance(error_handler, types.FunctionType) else error_handler
|
|
162
154
|
self.ctx = ctx
|
|
163
155
|
else:
|
|
164
156
|
ApiError.__init__(self, e, ctx=ctx)
|
vgs/sdk/routes.py
CHANGED
|
@@ -42,4 +42,13 @@ def normalize(results):
|
|
|
42
42
|
for filter_item in result["attributes"]["entries"]:
|
|
43
43
|
if isinstance(filter_item["operations"], str):
|
|
44
44
|
filter_item["operations"] = Literal(filter_item["operations"])
|
|
45
|
+
|
|
46
|
+
# this will apply the Literal representation to the script of the operation so it preserves whitespace
|
|
47
|
+
if isinstance(filter_item["operations"], list):
|
|
48
|
+
for operation in filter_item["operations"]:
|
|
49
|
+
if "parameters" in operation:
|
|
50
|
+
for field in ("script", "processorSource"):
|
|
51
|
+
if field in operation["parameters"]:
|
|
52
|
+
operation["parameters"][field] = Literal(operation["parameters"][field])
|
|
53
|
+
|
|
45
54
|
return results
|
vgs/sdk/vault_mgmt.py
CHANGED
|
@@ -10,7 +10,7 @@ class VaultMgmtAPI(API):
|
|
|
10
10
|
"Accept": "application/vnd.api+json",
|
|
11
11
|
"Authorization": f"Bearer {access_token}",
|
|
12
12
|
"Content-Type": "application/vnd.api+json",
|
|
13
|
-
"User-Agent": f"VGS SDK 0.0.1
|
|
13
|
+
"User-Agent": f"VGS SDK 0.0.1.dev202404232319",
|
|
14
14
|
},
|
|
15
15
|
json_encode_body=True,
|
|
16
16
|
)
|
vgs/sdk/vaults_api.py
CHANGED
|
@@ -21,7 +21,7 @@ def create_api(ctx, vault_id, environment, token):
|
|
|
21
21
|
"VGS-Tenant": vault_id,
|
|
22
22
|
"Content-Type": "application/vnd.api+json",
|
|
23
23
|
"Accept": "application/vnd.api+json",
|
|
24
|
-
"User-Agent": "VGS SDK {}".format("0.0.1
|
|
24
|
+
"User-Agent": "VGS SDK {}".format("0.0.1.dev202404232319"),
|
|
25
25
|
"Authorization": "Bearer {}".format(token),
|
|
26
26
|
}, # default headers
|
|
27
27
|
timeout=50, # default timeout in seconds
|
vgs_api_client/__init__.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Vault HTTP API
|
|
5
5
|
|
|
6
|
-
The VGS Vault HTTP API is used for storing, retrieving, and managing sensitive data (aka Tokenization) within a VGS Vault. The VGS API is organized around REST. Our API is built with a predictable resource-oriented structure, uses JSON-encoded requests and responses, follows standard HTTP verbs/responses, and uses industry standard authentication. ## What is VGS Storing sensitive data on your company’s infrastructure often comes with a heavy compliance burden. For instance, storing payments data yourself greatly increases the amount of work needed to become PCI compliant. It also increases your security risk in general. To combat this, companies will minimize the amount of sensitive information they have to handle or store. VGS provides multiple methods for minimizing the sensitive information that needs to be stored which allows customers to secure any type of data for any use-case. **Tokenization** is a method that focuses on securing the storage of data. This is the quickest way to get started and is free. [Get started with Tokenization](https://www.verygoodsecurity.com/docs/tokenization/getting-started). **Zero Data** is a unique method invented by VGS in 2016 that securely stores data like Tokenization, however it also removes the customer’s environment from PCI scope completely providing maximum security, and minimum compliance scope. [Get started with Zero Data](https://www.verygoodsecurity.com/docs/getting-started/before-you-start). Additionally, for scenarios where neither technology is a complete solution, for instance with legacy systems, VGS provides a compliance product which guarantees customers are able to meet their compliance needs no matter what may happen. [Get started with Control](https://www.verygoodsecurity.com/docs/control). ## Learn about Tokenization - [Create an Account for Free Tokenization](https://dashboard.verygoodsecurity.com/tokenization) - [Try a Tokenization Demo](https://www.verygoodsecurity.com/docs/tokenization/getting-started) - [Install a Tokenization SDK](https://www.verygoodsecurity.com/docs/tokenization/client-libraries) ### Authentication This API uses `Basic` authentication and is implemented using industry best practices to ensure the security of the connection. Read more about [Identity and Access Management at VGS](https://www.verygoodsecurity.com/docs/vault/the-platform/iam) Credentials to access the API can be generated on the [dashboard](https://dashboard.verygoodsecurity.com) by going to the Settings section of the vault of your choosing. [Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials) ## Resource Limits ### Data Limits This API allows storing data up to 32MB in size. ### Rate Limiting The API allows up to 3,000 requests per minute. Requests are associated with the vault, regardless of the access credentials used to authenticate the request. Your current rate limit is included as HTTP headers in every API response: | Header Name | Description | |-------------------------|----------------------------------------------------------| | `x-ratelimit-remaining` | The number of requests remaining in the 1-minute window. | If you exceed the rate limit, the API will reject the request with HTTP [429 Too Many Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429). ### Errors The API uses standard HTTP status codes to indicate whether the request succeeded or not. In case of failure, the response body will be JSON in a predefined format. For example, trying to create too many aliases at once results in the following response: ```json { \"errors\": [ { \"status\": 400, \"title\": \"Bad request\", \"detail\": \"Too many values (limit: 20)\", \"href\": \"https://api.sandbox.verygoodvault.com/aliases\" } ] } ``` # noqa: E501
|
|
6
|
+
The VGS Vault HTTP API is used for storing, retrieving, and managing sensitive data (aka Tokenization) within a VGS Vault. The VGS API is organized around REST. Our API is built with a predictable resource-oriented structure, uses JSON-encoded requests and responses, follows standard HTTP verbs/responses, and uses industry standard authentication. ## What is VGS Storing sensitive data on your company’s infrastructure often comes with a heavy compliance burden. For instance, storing payments data yourself greatly increases the amount of work needed to become PCI compliant. It also increases your security risk in general. To combat this, companies will minimize the amount of sensitive information they have to handle or store. VGS provides multiple methods for minimizing the sensitive information that needs to be stored which allows customers to secure any type of data for any use-case. **Tokenization** is a method that focuses on securing the storage of data. This is the quickest way to get started and is free. [Get started with Tokenization](https://www.verygoodsecurity.com/docs/tokenization/getting-started). **Zero Data** is a unique method invented by VGS in 2016 that securely stores data like Tokenization, however it also removes the customer’s environment from PCI scope completely providing maximum security, and minimum compliance scope. [Get started with Zero Data](https://www.verygoodsecurity.com/docs/getting-started/before-you-start). Additionally, for scenarios where neither technology is a complete solution, for instance with legacy systems, VGS provides a compliance product which guarantees customers are able to meet their compliance needs no matter what may happen. [Get started with Control](https://www.verygoodsecurity.com/docs/control). ## Learn about Tokenization - [Create an Account for Free Tokenization](https://dashboard.verygoodsecurity.com/tokenization) - [Try a Tokenization Demo](https://www.verygoodsecurity.com/docs/tokenization/getting-started) - [Install a Tokenization SDK](https://www.verygoodsecurity.com/docs/tokenization/client-libraries) ## Introduction ### Alias-Formats | Format | Description | |---------------------------------|-------------------------------------------------------------------------------------------| | UUID | Generic - VGS Alias (Default) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx | | NUM_LENGTH_PRESERVING | Generic - Numeric Length Preserving - xxxxxxxxxxxxxxxx | | FPE_SIX_T_FOUR | Payment Card - Format Preserving, Luhn Valid (6T4) - <first_six>xxxxxx<last_four> | | FPE_T_FOUR | Payment Card - Format Preserving, Luhn Valid (T4) - xxxxxxxxxxxx<last_four> | | PFPT | Payment Card - Prefixed, Luhn Valid, 19 Digits Fixed Length - xxxxxxxxxxxxxxxxxxx | | NON_LUHN_FPE_ALPHANUMERIC | Payment Card - Format Preserving - Non Luhn Valid - xxxxxxxxxxxxxxxx | | FPE_SSN_T_FOUR | SSN - Format Preserving (A4) - xxx-xx-<last_four> | | FPE_ACC_NUM_T_FOUR | Account Number - Numeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | FPE_ALPHANUMERIC_ACC_NUM_T_FOUR | Account Number - Alphanumeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | GENERIC_T_FOUR | Generic - VGS Alias Last Four (T4) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx_<last_four> | | RAW_UUID | Generic - UUID - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | ALPHANUMERIC_SIX_T_FOUR | Numeric - Include Alphanumeric, 19 symbols length (6T4) - <first_six>xxxxxxxxx<last_four> | | VGS_FIXED_LEN_GENERIC | Generic - VGS Alphanumeric Fixed Length, 29 characters - vgsxxxxxxxxxxxxxxxxxxxxxxxxxx | ## Authentication This API uses `Basic` authentication and is implemented using industry best practices to ensure the security of the connection. Read more about [Identity and Access Management at VGS](https://www.verygoodsecurity.com/docs/vault/the-platform/iam) Credentials to access the API can be generated on the [dashboard](https://dashboard.verygoodsecurity.com) by going to the Settings section of the vault of your choosing. [Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials) ## Resource Limits ### Data Limits This API allows storing data up to 32MB in size. ### Rate Limiting The API allows up to 3,000 requests per minute. Requests are associated with the vault, regardless of the access credentials used to authenticate the request. Your current rate limit is included as HTTP headers in every API response: | Header Name | Description | |-------------------------|----------------------------------------------------------| | `x-ratelimit-remaining` | The number of requests remaining in the 1-minute window. | If you exceed the rate limit, the API will reject the request with HTTP [429 Too Many Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429). ### Errors The API uses standard HTTP status codes to indicate whether the request succeeded or not. In case of failure, the response body will be JSON in a predefined format. For example, trying to create too many aliases at once results in the following response: ```json { \"errors\": [ { \"status\": 400, \"title\": \"Bad request\", \"detail\": \"Too many values (limit: 20)\", \"href\": \"https://api.sandbox.verygoodvault.com/aliases\" } ] } ``` # noqa: E501
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Contact: support@verygoodsecurity.com
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
__version__ = "0.0.1
|
|
14
|
+
__version__ = "0.0.1.dev202404232319"
|
|
15
15
|
|
|
16
16
|
# import ApiClient
|
|
17
17
|
from vgs_api_client.api_client import ApiClient
|