vgs-cli 1.34.0.dev2__py3-none-any.whl → 1.35.0.dev2__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_cli-1.35.0.dev2.data/data/vgscli/form-template.yaml +32 -0
- vgs_cli-1.35.0.dev2.data/data/vgscli/http-route-template.yaml +47 -0
- vgs_cli-1.35.0.dev2.data/data/vgscli/notification-template.yaml +34 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/read-credentials-no-pci.yaml +1 -1
- vgs_cli-1.35.0.dev2.data/data/vgscli/sftp-route-template.yaml +38 -0
- vgs_cli-1.35.0.dev2.data/data/vgscli/tenant-schema.yaml +69 -0
- vgs_cli-1.35.0.dev2.data/data/vgscli/tenant-template.yaml +28 -0
- vgs_cli-1.35.0.dev2.data/data/vgscli/vgs-cli.yaml +17 -0
- {vgs_cli-1.34.0.dev2.dist-info → vgs_cli-1.35.0.dev2.dist-info}/METADATA +18 -6
- {vgs_cli-1.34.0.dev2.dist-info → vgs_cli-1.35.0.dev2.dist-info}/RECORD +45 -31
- vgscli/_version.py +1 -1
- vgscli/calm_api.py +45 -0
- vgscli/cli/__init__.py +38 -0
- vgscli/cli/commands/apply.py +214 -44
- vgscli/cli/commands/generate.py +65 -12
- vgscli/cli/commands/get.py +91 -25
- vgscli/cli_progress.py +81 -0
- vgscli/click_extensions.py +16 -1
- vgscli/errors.py +39 -0
- vgscli/payment_accounts_api.py +57 -0
- vgscli/resource-templates/form-template.yaml +32 -0
- vgscli/resource-templates/http-route-template.yaml +41 -55
- vgscli/resource-templates/notification-template.yaml +34 -0
- vgscli/resource-templates/service-account/read-credentials-no-pci.yaml +1 -1
- vgscli/resource-templates/service-account/vgs-cli.yaml +17 -0
- vgscli/resource-templates/sftp-route-template.yaml +38 -0
- vgscli/resource-templates/tenant-template.yaml +17 -1
- vgscli/tenant_configuration.py +153 -0
- vgscli/tenant_creation.py +603 -0
- vgscli/tenant_provisioning_api.py +43 -0
- vgscli/validation-schemas/tenant-schema.yaml +69 -0
- vgs_cli-1.34.0.dev2.data/data/vgscli/http-route-template.yaml +0 -61
- vgs_cli-1.34.0.dev2.data/data/vgscli/mft-route-template.yaml +0 -10
- vgs_cli-1.34.0.dev2.data/data/vgscli/tenant-template.yaml +0 -12
- vgscli/resource-templates/mft-route-template.yaml +0 -10
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/collect-form-api-schema.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/collect-form-schema.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/credentials-admin.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/notification-integration-schema.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/public-credential-collect.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/read-credentials-with-pci.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/service-account-schema.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/vault-resources.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/vault-schema.yaml +0 -0
- {vgs_cli-1.34.0.dev2.data → vgs_cli-1.35.0.dev2.data}/data/vgscli/vault-template.yaml +0 -0
- {vgs_cli-1.34.0.dev2.dist-info → vgs_cli-1.35.0.dev2.dist-info}/WHEEL +0 -0
- {vgs_cli-1.34.0.dev2.dist-info → vgs_cli-1.35.0.dev2.dist-info}/entry_points.txt +0 -0
- {vgs_cli-1.34.0.dev2.dist-info → vgs_cli-1.35.0.dev2.dist-info}/licenses/LICENSE +0 -0
- {vgs_cli-1.34.0.dev2.dist-info → vgs_cli-1.35.0.dev2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
data:
|
|
3
|
+
# Unique identifier for the Collect Form. Must match ^[A-Za-z0-9_-]+$.
|
|
4
|
+
# Applying this file creates a new form with this ID, or replaces the
|
|
5
|
+
# existing form with this ID after a confirmation prompt.
|
|
6
|
+
id: auto-generated
|
|
7
|
+
|
|
8
|
+
# Display name of the Collect Form.
|
|
9
|
+
name: Auto Generated
|
|
10
|
+
|
|
11
|
+
# Card attributes to collect alongside the card number. Set an attribute to
|
|
12
|
+
# true to enable it; leave it false to keep it disabled. Run
|
|
13
|
+
# `vgs get form -T <TENANT_ID> <FORM_ID>` to see an existing form in this
|
|
14
|
+
# same format.
|
|
15
|
+
card_attributes:
|
|
16
|
+
brands: true
|
|
17
|
+
card-type: true
|
|
18
|
+
product-name: false
|
|
19
|
+
issuer-bin: false
|
|
20
|
+
issuing-country: false
|
|
21
|
+
card-segment-type: false
|
|
22
|
+
virtual-card: false
|
|
23
|
+
prepaid-card: false
|
|
24
|
+
regulated: false
|
|
25
|
+
additional-card-brand: false
|
|
26
|
+
reloadable: false
|
|
27
|
+
hsa: false
|
|
28
|
+
ebt: false
|
|
29
|
+
fsa: false
|
|
30
|
+
bank-name: false
|
|
31
|
+
bank-phone: false
|
|
32
|
+
bank-website: false
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
data:
|
|
2
|
+
- type: rule_chain
|
|
3
|
+
attributes:
|
|
4
|
+
protocol: http
|
|
5
|
+
source_endpoint: '*'
|
|
6
|
+
destination_override_endpoint: https://example.com
|
|
7
|
+
host_endpoint: '*'
|
|
8
|
+
port: 80
|
|
9
|
+
ordinal: null
|
|
10
|
+
tags:
|
|
11
|
+
name: Display name of route here
|
|
12
|
+
source: RouteContainer
|
|
13
|
+
entries:
|
|
14
|
+
- phase: REQUEST
|
|
15
|
+
operation: REDACT
|
|
16
|
+
token_manager: PERSISTENT
|
|
17
|
+
public_token_generator: UUID
|
|
18
|
+
transformer: JSON_PATH
|
|
19
|
+
transformer_config:
|
|
20
|
+
- $.field
|
|
21
|
+
transformer_config_map: null
|
|
22
|
+
operations: null
|
|
23
|
+
targets:
|
|
24
|
+
- body
|
|
25
|
+
id_selector: null
|
|
26
|
+
classifiers: {}
|
|
27
|
+
config:
|
|
28
|
+
condition: AND
|
|
29
|
+
rules:
|
|
30
|
+
- condition: null
|
|
31
|
+
rules: null
|
|
32
|
+
expression:
|
|
33
|
+
field: PathInfo
|
|
34
|
+
type: string
|
|
35
|
+
operator: matches
|
|
36
|
+
values:
|
|
37
|
+
- /post
|
|
38
|
+
- condition: null
|
|
39
|
+
rules: null
|
|
40
|
+
expression:
|
|
41
|
+
field: ContentType
|
|
42
|
+
type: string
|
|
43
|
+
operator: equals
|
|
44
|
+
values:
|
|
45
|
+
- application/json
|
|
46
|
+
expression: null
|
|
47
|
+
version: 1
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
apiVersion: 1.0.0
|
|
2
|
+
kind: NotificationIntegration
|
|
3
|
+
data:
|
|
4
|
+
# Notification provider to use. Run `vgs get notifications -O
|
|
5
|
+
# <ORGANIZATION_ID>` to see existing integrations and the provider
|
|
6
|
+
# parameter names they use.
|
|
7
|
+
provider: webhook
|
|
8
|
+
|
|
9
|
+
# Name of the notification integration to create.
|
|
10
|
+
name: Route alerts
|
|
11
|
+
|
|
12
|
+
# Optional description of the notification integration.
|
|
13
|
+
description: Route lifecycle notifications
|
|
14
|
+
|
|
15
|
+
# Provider-specific configuration. Include every parameter the provider
|
|
16
|
+
# requires. VGS generates and manages provider-controlled values, such as
|
|
17
|
+
# the webhook signing secret; do not add them here.
|
|
18
|
+
providerParameters:
|
|
19
|
+
- name: url
|
|
20
|
+
value: https://example.com/webhooks/vgs
|
|
21
|
+
|
|
22
|
+
# Events to notify on. Set enabled to false to keep an event configured but
|
|
23
|
+
# inactive. An organization-scoped event must omit resourceIds. A
|
|
24
|
+
# non-organization-scoped event requires one or more resource IDs, whose
|
|
25
|
+
# meaning depends on the event: tenant IDs for a tenant-scoped event,
|
|
26
|
+
# organization member IDs for a user-scoped event. Check with your VGS
|
|
27
|
+
# contact for the event's scope if it is not obvious from its name.
|
|
28
|
+
events:
|
|
29
|
+
- id: notifications.changes
|
|
30
|
+
enabled: true
|
|
31
|
+
- id: route.updated
|
|
32
|
+
enabled: true
|
|
33
|
+
resourceIds:
|
|
34
|
+
- <TENANT_ID>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
data:
|
|
2
|
+
- type: rule_chain
|
|
3
|
+
attributes:
|
|
4
|
+
protocol: sftp
|
|
5
|
+
source_endpoint: '*'
|
|
6
|
+
destination_override_endpoint: '*'
|
|
7
|
+
host_endpoint: '*'
|
|
8
|
+
port: 22
|
|
9
|
+
ordinal: null
|
|
10
|
+
tags:
|
|
11
|
+
name: Display name of route here
|
|
12
|
+
source: RouteContainer
|
|
13
|
+
entries:
|
|
14
|
+
- phase: REQUEST
|
|
15
|
+
operation: REDACT
|
|
16
|
+
token_manager: PERSISTENT
|
|
17
|
+
public_token_generator: UUID
|
|
18
|
+
transformer: JSON_PATH
|
|
19
|
+
transformer_config:
|
|
20
|
+
- $.field
|
|
21
|
+
transformer_config_map: null
|
|
22
|
+
operations: null
|
|
23
|
+
targets: []
|
|
24
|
+
id_selector: null
|
|
25
|
+
classifiers: {}
|
|
26
|
+
config:
|
|
27
|
+
condition: AND
|
|
28
|
+
rules:
|
|
29
|
+
- condition: null
|
|
30
|
+
rules: null
|
|
31
|
+
expression:
|
|
32
|
+
field: filePath
|
|
33
|
+
type: string
|
|
34
|
+
operator: matches
|
|
35
|
+
values:
|
|
36
|
+
- '*.*'
|
|
37
|
+
expression: null
|
|
38
|
+
version: 1
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
"$schema": http://json-schema.org/draft-07/schema#
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
apiVersion:
|
|
6
|
+
type: string
|
|
7
|
+
enum:
|
|
8
|
+
- 1.0.0
|
|
9
|
+
kind:
|
|
10
|
+
type: string
|
|
11
|
+
enum:
|
|
12
|
+
- Tenant
|
|
13
|
+
data:
|
|
14
|
+
type: object
|
|
15
|
+
properties:
|
|
16
|
+
name:
|
|
17
|
+
type: string
|
|
18
|
+
minLength: 3
|
|
19
|
+
maxLength: 50
|
|
20
|
+
pattern: "^[A-Za-z0-9]+([ ._-][A-Za-z0-9]+)*$"
|
|
21
|
+
environment:
|
|
22
|
+
type: string
|
|
23
|
+
enum:
|
|
24
|
+
- SANDBOX
|
|
25
|
+
- LIVE
|
|
26
|
+
region:
|
|
27
|
+
type: string
|
|
28
|
+
enum:
|
|
29
|
+
- US
|
|
30
|
+
- EU
|
|
31
|
+
- APAC
|
|
32
|
+
organizationId:
|
|
33
|
+
type: string
|
|
34
|
+
pattern: ^AC[A-Za-z0-9]{22}$
|
|
35
|
+
configurations:
|
|
36
|
+
type: object
|
|
37
|
+
properties:
|
|
38
|
+
accountUpdater:
|
|
39
|
+
"$ref": "#/definitions/enrollmentSettings"
|
|
40
|
+
networkTokens:
|
|
41
|
+
"$ref": "#/definitions/enrollmentSettings"
|
|
42
|
+
additionalProperties: false
|
|
43
|
+
required:
|
|
44
|
+
- name
|
|
45
|
+
- environment
|
|
46
|
+
additionalProperties: false
|
|
47
|
+
required:
|
|
48
|
+
- apiVersion
|
|
49
|
+
- kind
|
|
50
|
+
- data
|
|
51
|
+
additionalProperties: false
|
|
52
|
+
definitions:
|
|
53
|
+
enrollmentSettings:
|
|
54
|
+
type: object
|
|
55
|
+
properties:
|
|
56
|
+
visa:
|
|
57
|
+
"$ref": "#/definitions/enrollmentType"
|
|
58
|
+
mastercard:
|
|
59
|
+
"$ref": "#/definitions/enrollmentType"
|
|
60
|
+
amex:
|
|
61
|
+
"$ref": "#/definitions/enrollmentType"
|
|
62
|
+
discover:
|
|
63
|
+
"$ref": "#/definitions/enrollmentType"
|
|
64
|
+
additionalProperties: false
|
|
65
|
+
enrollmentType:
|
|
66
|
+
type: string
|
|
67
|
+
enum:
|
|
68
|
+
- manual
|
|
69
|
+
- onCreate
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
apiVersion: 1.0.0
|
|
2
|
+
kind: Tenant
|
|
3
|
+
data:
|
|
4
|
+
# Name of the tenant to create. (Must be between 3 and 50 characters long.)
|
|
5
|
+
name: Very Good Tenant
|
|
6
|
+
|
|
7
|
+
# Environment to create the tenant within.
|
|
8
|
+
# See https://www.verygoodsecurity.com/docs/terminology/vaults#environments
|
|
9
|
+
environment: SANDBOX
|
|
10
|
+
|
|
11
|
+
# Region to create the tenant in. SANDBOX supports US only.
|
|
12
|
+
region: US
|
|
13
|
+
|
|
14
|
+
# ID of the organization to associate the tenant with.
|
|
15
|
+
organizationId: <VGS Organization ID>
|
|
16
|
+
|
|
17
|
+
# Optional SANDBOX enrollment behavior for payment credential products.
|
|
18
|
+
configurations:
|
|
19
|
+
accountUpdater:
|
|
20
|
+
visa: manual
|
|
21
|
+
mastercard: manual
|
|
22
|
+
amex: manual
|
|
23
|
+
discover: manual
|
|
24
|
+
networkTokens:
|
|
25
|
+
visa: manual
|
|
26
|
+
mastercard: manual
|
|
27
|
+
amex: manual
|
|
28
|
+
discover: manual
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: 1.0.0
|
|
2
|
+
kind: ServiceAccount
|
|
3
|
+
data:
|
|
4
|
+
name: vgs-cli
|
|
5
|
+
{%- if vaults | length == 0 %}
|
|
6
|
+
{{- cli_warn("Service Account won't have access to any tenants inside the organization. If it needs tenant access, use --tenant <TENANT_ID>.") or "" }}
|
|
7
|
+
{%- else %}
|
|
8
|
+
vaults:
|
|
9
|
+
{%- for vault_id in vaults %}
|
|
10
|
+
- {{ vault_id }}
|
|
11
|
+
{%- endfor %}
|
|
12
|
+
{%- endif %}
|
|
13
|
+
scopes:
|
|
14
|
+
- name: access-logs:read
|
|
15
|
+
- name: organizations:read
|
|
16
|
+
- name: routes:write
|
|
17
|
+
- name: vaults:write
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vgs-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.35.0.dev2
|
|
4
4
|
Summary: VGS Client
|
|
5
5
|
Home-page: https://github.com/verygoodsecurity/vgs-cli
|
|
6
6
|
Author: Very Good Security
|
|
@@ -142,8 +142,9 @@ Use **tenant** and `--tenant/-T` in new commands. Legacy vault commands and
|
|
|
142
142
|
| --- | --- |
|
|
143
143
|
| `vgs get organizations` | List accessible organizations. |
|
|
144
144
|
| `vgs get tenants` | List all tenants visible to the authenticated identity. |
|
|
145
|
+
| `vgs get tenant -T <TENANT_ID>` | Get one tenant with provisioning, account, configuration, and merchant state. |
|
|
145
146
|
| `vgs generate tenant > tenant.yaml` | Generate a tenant template. |
|
|
146
|
-
| `vgs apply tenant -f tenant.yaml` | Create a tenant
|
|
147
|
+
| `vgs apply tenant -f tenant.yaml` | Create and configure a SANDBOX or LIVE tenant through a staged, resumable workflow. |
|
|
147
148
|
| `vgs apply tenant -O <ORGANIZATION_ID> -f tenant.yaml` | Create a tenant when `organizationId` is omitted from the template. |
|
|
148
149
|
| `vgs apply tenant-resources -T <TENANT_ID> -f resources.yaml --dry-run true` | Validate tenant resources without applying them. |
|
|
149
150
|
| `vgs apply tenant-resources -T <TENANT_ID> -f resources.yaml` | Apply reviewed resources to a tenant. |
|
|
@@ -156,9 +157,9 @@ or through `-O/--organization`; if both are present, they must match.
|
|
|
156
157
|
|
|
157
158
|
| Command | Purpose |
|
|
158
159
|
| --- | --- |
|
|
159
|
-
| `vgs get notification-providers` | List supported notification providers. |
|
|
160
160
|
| `vgs get notifications -O <ORGANIZATION_ID>` | List notification integrations. |
|
|
161
161
|
| `vgs get notification-events -O <ORGANIZATION_ID> <INTEGRATION_ID>` | List configured events for a notification integration. |
|
|
162
|
+
| `vgs generate notification > notification.yaml` | Generate a notification integration template. |
|
|
162
163
|
| `vgs apply notification -O <ORGANIZATION_ID> -f notification.yaml` | Create or update a notification integration from a file. |
|
|
163
164
|
| `vgs apply notification -O <ORGANIZATION_ID> --enable <INTEGRATION_ID>` | Enable a notification integration. |
|
|
164
165
|
| `vgs apply notification -O <ORGANIZATION_ID> --disable <INTEGRATION_ID>` | Disable a notification integration. |
|
|
@@ -171,6 +172,8 @@ access. The CLI masks generated webhook secrets in its output.
|
|
|
171
172
|
|
|
172
173
|
| Command | Purpose |
|
|
173
174
|
| --- | --- |
|
|
175
|
+
| `vgs generate route --protocol http` | Generate an HTTP route template. |
|
|
176
|
+
| `vgs generate route --protocol sftp` | Generate an SFTP route template. |
|
|
174
177
|
| `vgs get routes -T <TENANT_ID>` | List tenant routes. |
|
|
175
178
|
| `vgs apply routes -T <TENANT_ID> -f <FILE>` | Apply tenant routes. |
|
|
176
179
|
| `vgs delete routes -T <TENANT_ID> <ROUTE_ID>` | Delete one tenant route. |
|
|
@@ -181,6 +184,7 @@ access. The CLI masks generated webhook secrets in its output.
|
|
|
181
184
|
| --- | --- |
|
|
182
185
|
| `vgs get forms -T <TENANT_ID>` | List Collect Forms. |
|
|
183
186
|
| `vgs get form -T <TENANT_ID> <FORM_ID>` | Get one Collect Form. |
|
|
187
|
+
| `vgs generate form > form.yaml` | Generate a Collect Form template. |
|
|
184
188
|
| `vgs apply form -T <TENANT_ID> -f <FILE>` | Apply a Collect Form from a file. |
|
|
185
189
|
| `vgs apply form -T <TENANT_ID> --json '<JSON>'` | Apply inline Collect Form JSON. |
|
|
186
190
|
| `vgs delete form -T <TENANT_ID> <FORM_ID>` | Delete one Collect Form. |
|
|
@@ -196,9 +200,16 @@ access. The CLI masks generated webhook secrets in its output.
|
|
|
196
200
|
|
|
197
201
|
### Service accounts
|
|
198
202
|
|
|
199
|
-
Generate a service-account resource
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
Generate a service-account resource and save the YAML so you can review it
|
|
204
|
+
before applying it. The general `vgs-cli` template accepts zero or more tenants;
|
|
205
|
+
when no tenant is supplied, the generated account has no tenant access.
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
vgs generate service-account --template vgs-cli -T <TENANT_ID> > service-account.yaml
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Payment-credential templates require exactly one tenant and a name containing
|
|
212
|
+
1–20 characters:
|
|
202
213
|
|
|
203
214
|
```bash
|
|
204
215
|
vgs generate service-account --template <TEMPLATE> -T <TENANT_ID> --var name=<NAME> > service-account.yaml
|
|
@@ -206,6 +217,7 @@ vgs generate service-account --template <TEMPLATE> -T <TENANT_ID> --var name=<NA
|
|
|
206
217
|
|
|
207
218
|
| Template | Purpose |
|
|
208
219
|
| --- | --- |
|
|
220
|
+
| `vgs-cli` | Automate common CLI organization, tenant, route, and access-log operations. |
|
|
209
221
|
| `public-credential-collect` | Collect payment credentials without read access. |
|
|
210
222
|
| `read-credentials-no-pci` | Read tokenized credentials without PCI data. |
|
|
211
223
|
| `read-credentials-with-pci` | Read credentials including PCI data. |
|
|
@@ -1,68 +1,82 @@
|
|
|
1
|
-
vgs_cli-1.
|
|
2
|
-
vgs_cli-1.
|
|
3
|
-
vgs_cli-1.
|
|
4
|
-
vgs_cli-1.
|
|
5
|
-
vgs_cli-1.
|
|
6
|
-
vgs_cli-1.
|
|
7
|
-
vgs_cli-1.
|
|
8
|
-
vgs_cli-1.
|
|
9
|
-
vgs_cli-1.
|
|
10
|
-
vgs_cli-1.
|
|
11
|
-
vgs_cli-1.
|
|
12
|
-
vgs_cli-1.
|
|
13
|
-
vgs_cli-1.
|
|
14
|
-
vgs_cli-1.
|
|
15
|
-
vgs_cli-1.
|
|
1
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/collect-form-api-schema.yaml,sha256=THuJbLUo7LOr0c1JUo3FPJEc9Jvde59K4JjdlkVF3hw,1246
|
|
2
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/collect-form-schema.yaml,sha256=vHAN6_Gsg14CeSL41sHEQgboYF-CHF2RaNw72aJ3W8o,1337
|
|
3
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/credentials-admin.yaml,sha256=acyLd54Cp7l2fpugfjVfYh07-MIE0BX-JVq4lHraE1s,869
|
|
4
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/form-template.yaml,sha256=VblOlsDLfwZP6wR6nIIX1WSrUAt4leqfMdbXr3xYvWg,934
|
|
5
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/http-route-template.yaml,sha256=vGHvBXA_6pwFtH1vVRWKiwxb4sahzuLvpqGAlavrStc,1085
|
|
6
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/notification-integration-schema.yaml,sha256=1qHzS5ZxlhTdrDab6-qJhszwu7cpith2HleX3uAO_4E,1837
|
|
7
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/notification-template.yaml,sha256=hr36msbrgiTjWligLHVDHMmO49QDzjTwBSLYoBw3WQE,1288
|
|
8
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/public-credential-collect.yaml,sha256=CiorC-6TMx7M0TI8DHmoRSfVKDpOom2wIr_ilwmHQNA,696
|
|
9
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/read-credentials-no-pci.yaml,sha256=_kWRne_ARh8v7A_jHG08gwgPG6NqZhrDRyq6L-ULs2M,769
|
|
10
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/read-credentials-with-pci.yaml,sha256=jWXgFdcqZYisakAt9COM6cjf2-x_Q4eidDLaUh8CZOk,796
|
|
11
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/service-account-schema.yaml,sha256=L1pjNXgnks15N1wNgf_1GmGcOvxn0nu49v7ersUjFno,1090
|
|
12
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/sftp-route-template.yaml,sha256=zkT6lIVDgVyzLKgZ8QnyJJooy2egZk1cQthdjan_JrM,853
|
|
13
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/tenant-schema.yaml,sha256=gBO7xVe2qXSymG0B_45hC11X5nm_jCCAH4Yjs-sbC8g,1457
|
|
14
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/tenant-template.yaml,sha256=F0wIBkC2dFJUNeJet-FzPX3qrLMHcGIaJvhsDzzAOCc,765
|
|
15
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/vault-resources.yaml,sha256=95CCxQher3MBQq96bvjZviNgo1rgv_NhCtI8X-oxIpA,26335
|
|
16
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/vault-schema.yaml,sha256=a-wW7X8RyHr-669wtOZrlxlIfeQVtx8EUfA-3vpYytk,637
|
|
17
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/vault-template.yaml,sha256=IlDisL3H5LXUDMkhUaouKMarRdu0-pJxpTz8ij_lp_M,383
|
|
18
|
+
vgs_cli-1.35.0.dev2.data/data/vgscli/vgs-cli.yaml,sha256=5gCjjloyepaKI6zZfDLeUEWxuRExI-dGJI9RO3omP2k,484
|
|
19
|
+
vgs_cli-1.35.0.dev2.dist-info/licenses/LICENSE,sha256=NwSyzgDYdzv6O2ns2C6UODGI8LN1VnVe_FPTnWS4eXY,1082
|
|
16
20
|
vgscli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
vgscli/_version.py,sha256=
|
|
21
|
+
vgscli/_version.py,sha256=0HHI66nZPGvwbIf40mXNC7yUBONlS3ZLuT9MVF9ALCM,1681
|
|
18
22
|
vgscli/access_logs.py,sha256=G0GjlLjWiC-N6OzK6-RCvWddcVGQlLCLAcyO9pLWIOM,1928
|
|
19
23
|
vgscli/audits_api.py,sha256=6FjpS1yTALio-DejgIS2eDw75ChjDp4GoAGXh4uZExU,3211
|
|
20
24
|
vgscli/auth.py,sha256=vdUZ12nqtefIuSHNmwCFvxoqwS3m6ZP5TqLZFNwKnSU,2104
|
|
21
25
|
vgscli/auth_server.py,sha256=e-xYoVebWM6cQNxuMr5rYzKuswNIrexnLSYo1ma48WY,4096
|
|
22
26
|
vgscli/auth_utils.py,sha256=aC1VI0dFdFeupLS9Okz4uDz-wHhhFabqiLUg2R5vO2s,600
|
|
23
27
|
vgscli/callback_server.py,sha256=oFFF5AGbbwhF7Hsc5fzS7jeGFzIMbebc9Qdq8uEl1PY,1055
|
|
28
|
+
vgscli/calm_api.py,sha256=5ZZhJUCuA2E5X670L-EkB_mL2kqHPrYy-ca6WtwTacg,1384
|
|
24
29
|
vgscli/cert_manager_api.py,sha256=ek25BcyGeUo0pBoqineMTYMgmQaYJfimFFHMljZh5yA,1646
|
|
30
|
+
vgscli/cli_progress.py,sha256=Kpc7iZo0zO6YX3WynteBELuWSYGVvqEjKLq2E5x4lnE,2520
|
|
25
31
|
vgscli/cli_utils.py,sha256=NzXK29_yIDrB-3T_XdLLB8NCWneQ-cpZFi9mazQL9tQ,3810
|
|
26
|
-
vgscli/click_extensions.py,sha256=
|
|
32
|
+
vgscli/click_extensions.py,sha256=m-RpaPaH69m4caYbuiu0j2blxeyy8c8hA0Tvygw1Mvc,7271
|
|
27
33
|
vgscli/collect_forms.py,sha256=HAg-tvpXxmVq5Zns4v8G0cP-tgYKuWmVFwzuNjieu-A,4619
|
|
28
34
|
vgscli/collect_forms_api.py,sha256=JHnnsOUyStD7yR92LfGqn8DOpnu0l0yqTUMQnWE_NGs,1246
|
|
29
35
|
vgscli/config_file.py,sha256=HB8lANU0qoO09Wnkf-QDzPh2qtrnFcqcetnCaQgtQ3U,1543
|
|
30
|
-
vgscli/errors.py,sha256=
|
|
36
|
+
vgscli/errors.py,sha256=9iWS8v6Zq9A3Iqt3G1-NJQEwT4d8DI_JoU7fdiqHg00,11946
|
|
31
37
|
vgscli/file_token_util.py,sha256=537b54paMGw0u5PL5VJgQqQ7awKa9lQP88n3tUc_lyw,771
|
|
32
38
|
vgscli/id_generator.py,sha256=3CbvSOUSyLON76p6M8wUhVQVig8j75_rnWdpxLhBifM,1510
|
|
33
39
|
vgscli/keyring_token_util.py,sha256=cnR72-0AInzujUsIwHoXwPbgprbkllgAXN-AAI3qsPM,4632
|
|
34
40
|
vgscli/notifications.py,sha256=6D8HFDEl3X4V0V9fYZT-9nWYe2KYVahfhRLMF0pbh4I,6252
|
|
35
41
|
vgscli/notifications_api.py,sha256=1EXmRb2fOJrU1QOAZ6gmq8yMjBLhNZGSVs3kRtD2Dfw,2342
|
|
42
|
+
vgscli/payment_accounts_api.py,sha256=wF6K3m7nlKtPmqO9RCpmGFSXYHWtwfhXqNfgI1IGqFI,1665
|
|
43
|
+
vgscli/tenant_configuration.py,sha256=iC33f2lBHDEL4oHPvdlWp_w--u2x_nWOb86jTHumDLg,5881
|
|
44
|
+
vgscli/tenant_creation.py,sha256=9O1i4JsHuEIQt_QkcWYEcenLi8kGJBivcln6LkoHl7U,22230
|
|
45
|
+
vgscli/tenant_provisioning_api.py,sha256=-mQcSECgWG23LKczu1B9J1d7Bb6ZA6lkpr9RegJiiLg,1203
|
|
36
46
|
vgscli/testing.py,sha256=MLrsvy3mEwvjtqyuG0UjwEX-rDkbWUo52aXvu2H2sTk,1437
|
|
37
47
|
vgscli/text.py,sha256=c2d1As7awq8PlEF9NiI6JrjsYYousj9YT0o1xOQ2MQM,172
|
|
38
48
|
vgscli/token_handler.py,sha256=MvtmlicqnGrcopNkTr8Q2RlKE7IDj_sJFxF_39Jd7W8,183
|
|
39
49
|
vgscli/vgs.py,sha256=BiQuHeOuH25zbTdwNOsW_O69YuKsZFTYA2jr9JFRZng,6262
|
|
40
|
-
vgscli/cli/__init__.py,sha256=
|
|
50
|
+
vgscli/cli/__init__.py,sha256=112ej_l1olouWMRIM8H4-s5C4qiG8-u6RziWT102wNk,2765
|
|
41
51
|
vgscli/cli/commands/__init__.py,sha256=8ptc9-Vzdx0HU3ZeMcKERYjmJyuB5IMjBSF3Igx5yQ4,206
|
|
42
|
-
vgscli/cli/commands/apply.py,sha256=
|
|
52
|
+
vgscli/cli/commands/apply.py,sha256=jLSllU1Hz8WX3ARL-lU8BtDv72bMzP3fXs0vGDtyoWc,26312
|
|
43
53
|
vgscli/cli/commands/certificate.py,sha256=xQV-G8ZWP9uPFqrczlCpCZkHUt2aJflBP2cc5hjobIw,22930
|
|
44
54
|
vgscli/cli/commands/delete.py,sha256=2nuYKhp0FhoGTcmJUECjRnlYrKLdAgIoIp-y25ViwDg,3873
|
|
45
|
-
vgscli/cli/commands/generate.py,sha256=
|
|
46
|
-
vgscli/cli/commands/get.py,sha256=
|
|
55
|
+
vgscli/cli/commands/generate.py,sha256=cVrU54_o3szgyi7tbMQtMAemx-37xYcFKrAcLcyMglw,5448
|
|
56
|
+
vgscli/cli/commands/get.py,sha256=Xm8bN11vOjnDA3o_uuAkBXM2wtJQZDrTdQY1ykug4LE,11315
|
|
47
57
|
vgscli/cli/types/__init__.py,sha256=a-P-SoGHpLzMg7CL1hhg5x_nf6sHq0qAuGm_AtIITmw,107
|
|
48
58
|
vgscli/cli/types/resource_id.py,sha256=7JILR-KjoVGQDHB40tXJfTcU53iR8wM9Zr24fY5le3o,1172
|
|
49
59
|
vgscli/cli/types/variable.py,sha256=IVcszPoWmTjeo_evDsLN06LuUZGTLL-wcZCVfBNBP8I,414
|
|
50
|
-
vgscli/resource-templates/
|
|
51
|
-
vgscli/resource-templates/
|
|
52
|
-
vgscli/resource-templates/
|
|
60
|
+
vgscli/resource-templates/form-template.yaml,sha256=VblOlsDLfwZP6wR6nIIX1WSrUAt4leqfMdbXr3xYvWg,934
|
|
61
|
+
vgscli/resource-templates/http-route-template.yaml,sha256=vGHvBXA_6pwFtH1vVRWKiwxb4sahzuLvpqGAlavrStc,1085
|
|
62
|
+
vgscli/resource-templates/notification-template.yaml,sha256=hr36msbrgiTjWligLHVDHMmO49QDzjTwBSLYoBw3WQE,1288
|
|
63
|
+
vgscli/resource-templates/sftp-route-template.yaml,sha256=zkT6lIVDgVyzLKgZ8QnyJJooy2egZk1cQthdjan_JrM,853
|
|
64
|
+
vgscli/resource-templates/tenant-template.yaml,sha256=F0wIBkC2dFJUNeJet-FzPX3qrLMHcGIaJvhsDzzAOCc,765
|
|
53
65
|
vgscli/resource-templates/vault-template.yaml,sha256=IlDisL3H5LXUDMkhUaouKMarRdu0-pJxpTz8ij_lp_M,383
|
|
54
66
|
vgscli/resource-templates/service-account/credentials-admin.yaml,sha256=acyLd54Cp7l2fpugfjVfYh07-MIE0BX-JVq4lHraE1s,869
|
|
55
67
|
vgscli/resource-templates/service-account/public-credential-collect.yaml,sha256=CiorC-6TMx7M0TI8DHmoRSfVKDpOom2wIr_ilwmHQNA,696
|
|
56
|
-
vgscli/resource-templates/service-account/read-credentials-no-pci.yaml,sha256=
|
|
68
|
+
vgscli/resource-templates/service-account/read-credentials-no-pci.yaml,sha256=_kWRne_ARh8v7A_jHG08gwgPG6NqZhrDRyq6L-ULs2M,769
|
|
57
69
|
vgscli/resource-templates/service-account/read-credentials-with-pci.yaml,sha256=jWXgFdcqZYisakAt9COM6cjf2-x_Q4eidDLaUh8CZOk,796
|
|
70
|
+
vgscli/resource-templates/service-account/vgs-cli.yaml,sha256=5gCjjloyepaKI6zZfDLeUEWxuRExI-dGJI9RO3omP2k,484
|
|
58
71
|
vgscli/validation-schemas/collect-form-api-schema.yaml,sha256=THuJbLUo7LOr0c1JUo3FPJEc9Jvde59K4JjdlkVF3hw,1246
|
|
59
72
|
vgscli/validation-schemas/collect-form-schema.yaml,sha256=vHAN6_Gsg14CeSL41sHEQgboYF-CHF2RaNw72aJ3W8o,1337
|
|
60
73
|
vgscli/validation-schemas/notification-integration-schema.yaml,sha256=1qHzS5ZxlhTdrDab6-qJhszwu7cpith2HleX3uAO_4E,1837
|
|
61
74
|
vgscli/validation-schemas/service-account-schema.yaml,sha256=L1pjNXgnks15N1wNgf_1GmGcOvxn0nu49v7ersUjFno,1090
|
|
75
|
+
vgscli/validation-schemas/tenant-schema.yaml,sha256=gBO7xVe2qXSymG0B_45hC11X5nm_jCCAH4Yjs-sbC8g,1457
|
|
62
76
|
vgscli/validation-schemas/vault-resources.yaml,sha256=95CCxQher3MBQq96bvjZviNgo1rgv_NhCtI8X-oxIpA,26335
|
|
63
77
|
vgscli/validation-schemas/vault-schema.yaml,sha256=a-wW7X8RyHr-669wtOZrlxlIfeQVtx8EUfA-3vpYytk,637
|
|
64
|
-
vgs_cli-1.
|
|
65
|
-
vgs_cli-1.
|
|
66
|
-
vgs_cli-1.
|
|
67
|
-
vgs_cli-1.
|
|
68
|
-
vgs_cli-1.
|
|
78
|
+
vgs_cli-1.35.0.dev2.dist-info/METADATA,sha256=BgcCMIQRMIizLbofbdWzRQKrwq0V5iYsEfO_n22u24U,8984
|
|
79
|
+
vgs_cli-1.35.0.dev2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
80
|
+
vgs_cli-1.35.0.dev2.dist-info/entry_points.txt,sha256=wCWhRQiMX4Ja6kkqJlYr8LbuiywpmXyyRAZPsau-_RY,39
|
|
81
|
+
vgs_cli-1.35.0.dev2.dist-info/top_level.txt,sha256=gabTxCWMkl80q6ha_m-hs_1wQMfGntZcv5DEmkl8JEw,7
|
|
82
|
+
vgs_cli-1.35.0.dev2.dist-info/RECORD,,
|
vgscli/_version.py
CHANGED
vgscli/calm_api.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from simple_rest_client.api import API
|
|
2
|
+
from simple_rest_client.resource import Resource
|
|
3
|
+
|
|
4
|
+
from vgscli._version import __version__
|
|
5
|
+
|
|
6
|
+
CALM_URLS = {
|
|
7
|
+
"dev": {
|
|
8
|
+
"SANDBOX": "https://calm.dev.verygoodsecurity.app",
|
|
9
|
+
"LIVE": "https://calm.dev.verygoodsecurity.app",
|
|
10
|
+
},
|
|
11
|
+
"prod": {
|
|
12
|
+
"SANDBOX": "https://calm.sandbox.verygoodsecurity.app",
|
|
13
|
+
"LIVE": "https://calm.live.verygoodsecurity.app",
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class MerchantsResource(Resource):
|
|
19
|
+
actions = {
|
|
20
|
+
"create": {"method": "POST", "url": "merchants"},
|
|
21
|
+
"list": {"method": "GET", "url": "merchants"},
|
|
22
|
+
"update_preferences": {
|
|
23
|
+
"method": "PATCH",
|
|
24
|
+
"url": "merchants/{}/preferences",
|
|
25
|
+
},
|
|
26
|
+
"create_account_updater": {"method": "POST", "url": "merchants/au"},
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def create_api(environment, tenant_environment, tenant_id, token):
|
|
31
|
+
api = API(
|
|
32
|
+
api_root_url=CALM_URLS[environment][tenant_environment],
|
|
33
|
+
headers={
|
|
34
|
+
"Accept": "application/json",
|
|
35
|
+
"Authorization": f"Bearer {token}",
|
|
36
|
+
"Calm-Tenant": tenant_id,
|
|
37
|
+
"Content-Type": "application/json",
|
|
38
|
+
"User-Agent": f"VGS CLI {__version__}",
|
|
39
|
+
},
|
|
40
|
+
timeout=30,
|
|
41
|
+
append_slash=False,
|
|
42
|
+
json_encode_body=True,
|
|
43
|
+
)
|
|
44
|
+
api.add_resource(resource_name="merchants", resource_class=MerchantsResource)
|
|
45
|
+
return api
|
vgscli/cli/__init__.py
CHANGED
|
@@ -3,9 +3,14 @@ from vgs.sdk.account_mgmt import AccountMgmtAPI
|
|
|
3
3
|
from vgs.sdk.vault_mgmt import VaultMgmtAPI
|
|
4
4
|
|
|
5
5
|
from vgscli.auth import handshake, token_util
|
|
6
|
+
from vgscli.calm_api import create_api as create_calm_api_client
|
|
6
7
|
from vgscli.collect_forms_api import create_api as create_collect_forms_api_client
|
|
7
8
|
from vgscli.notifications import resolve_organization
|
|
8
9
|
from vgscli.notifications_api import create_api as create_notifications_api_client
|
|
10
|
+
from vgscli.payment_accounts_api import create_api as create_payment_accounts_api_client
|
|
11
|
+
from vgscli.tenant_provisioning_api import (
|
|
12
|
+
create_api as create_tenant_provisioning_api_client,
|
|
13
|
+
)
|
|
9
14
|
|
|
10
15
|
|
|
11
16
|
def create_account_mgmt_api(ctx: click.Context) -> AccountMgmtAPI:
|
|
@@ -35,6 +40,39 @@ def create_collect_forms_api(ctx: click.Context, vault_id: str):
|
|
|
35
40
|
return create_collect_forms_api_client(vault_id, environment, access_token)
|
|
36
41
|
|
|
37
42
|
|
|
43
|
+
def create_tenant_provisioning_api(ctx: click.Context):
|
|
44
|
+
environment = ctx.obj.env
|
|
45
|
+
|
|
46
|
+
handshake(ctx, environment)
|
|
47
|
+
access_token = token_util.get_access_token()
|
|
48
|
+
|
|
49
|
+
return create_tenant_provisioning_api_client(environment, access_token)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def create_payment_accounts_api(
|
|
53
|
+
ctx: click.Context, tenant_environment: str, tenant_id: str
|
|
54
|
+
):
|
|
55
|
+
environment = ctx.obj.env
|
|
56
|
+
|
|
57
|
+
handshake(ctx, environment)
|
|
58
|
+
access_token = token_util.get_access_token()
|
|
59
|
+
|
|
60
|
+
return create_payment_accounts_api_client(
|
|
61
|
+
environment, tenant_environment, tenant_id, access_token
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def create_calm_api(ctx: click.Context, tenant_environment: str, tenant_id: str):
|
|
66
|
+
environment = ctx.obj.env
|
|
67
|
+
|
|
68
|
+
handshake(ctx, environment)
|
|
69
|
+
access_token = token_util.get_access_token()
|
|
70
|
+
|
|
71
|
+
return create_calm_api_client(
|
|
72
|
+
environment, tenant_environment, tenant_id, access_token
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
38
76
|
def create_notifications_api(ctx: click.Context, organization_id: str = None):
|
|
39
77
|
environment = ctx.obj.env
|
|
40
78
|
|