vgs_api_client 0.0.1.alpha202311162359 → 0.0.1.dev202204182306

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +70 -0
  3. data/docker-compose.yaml +5 -19
  4. data/lib/vgs.rb +82 -0
  5. data/lib/{openapi_client → vgs_api_client}/api/aliases_api.rb +10 -100
  6. data/lib/{openapi_client → vgs_api_client}/api_client.rb +2 -2
  7. data/lib/vgs_api_client/api_error.rb +57 -0
  8. data/lib/{openapi_client → vgs_api_client}/configuration.rb +1 -1
  9. data/lib/vgs_api_client/models/alias_format.rb +44 -0
  10. data/lib/vgs_api_client/models/api_error.rb +249 -0
  11. data/lib/{openapi_client → vgs_api_client}/models/create_aliases_request.rb +2 -2
  12. data/lib/{openapi_client → vgs_api_client}/models/create_aliases_request_new.rb +6 -2
  13. data/lib/{openapi_client → vgs_api_client}/models/create_aliases_request_reference.rb +6 -2
  14. data/lib/{openapi_client → vgs_api_client}/models/inline_response200.rb +1 -1
  15. data/lib/{openapi_client → vgs_api_client}/models/inline_response2001.rb +1 -1
  16. data/lib/{openapi_client → vgs_api_client}/models/inline_response201.rb +1 -1
  17. data/lib/{openapi_client → vgs_api_client}/models/inline_response_default.rb +1 -1
  18. data/lib/{openapi_client/models/alias_dto.rb → vgs_api_client/models/model_alias.rb} +4 -5
  19. data/lib/{openapi_client → vgs_api_client}/models/revealed_data.rb +2 -3
  20. data/lib/{openapi_client → vgs_api_client}/models/update_alias_request.rb +1 -1
  21. data/lib/{openapi_client → vgs_api_client}/models/update_alias_request_data.rb +1 -1
  22. data/lib/vgs_api_client/version.rb +15 -0
  23. data/lib/vgs_api_client.rb +48 -106
  24. data/scripts/assemble/Dockerfile +1 -4
  25. data/scripts/assemble/run.sh +3 -3
  26. data/scripts/publish/Dockerfile +1 -4
  27. data/scripts/publish/run.sh +2 -3
  28. data/scripts/publish.sh +2 -3
  29. data/scripts/run-test-e2e.sh +13 -0
  30. data/scripts/run-test-local.sh +4 -0
  31. data/scripts/test/Dockerfile +5 -9
  32. data/scripts/test/run.sh +26 -9
  33. data/spec/api_client_spec.rb +1 -1
  34. data/spec/configuration_spec.rb +1 -1
  35. data/spec/spec_helper.rb +2 -2
  36. data/spec/test_api_spec.rb +97 -0
  37. data/vgs_api_client-0.0.1.dev202204181658.gem +0 -0
  38. data/vgs_api_client.gemspec +21 -15
  39. metadata +34 -46
  40. data/README.md +0 -39
  41. data/VERSION +0 -1
  42. data/api.yaml +0 -625
  43. data/lib/openapi_client/api_error.rb +0 -57
  44. data/lib/openapi_client/models/alias_format.rb +0 -50
  45. data/lib/openapi_client/models/api_error.rb +0 -0
  46. data/lib/openapi_client/models/batch_aliases_request.rb +0 -264
  47. data/lib/openapi_client/version.rb +0 -15
  48. data/lib/openapi_client.rb +0 -54
  49. data/lib/version.rb +0 -3
  50. data/scripts/lint/Dockerfile +0 -9
  51. data/scripts/lint/run.sh +0 -5
  52. data/scripts/lint.sh +0 -6
  53. data/scripts/run-tests-e2e.sh +0 -8
  54. data/scripts/run-tests.sh +0 -6
  55. data/scripts/test-e2e/Dockerfile +0 -14
  56. data/scripts/test-e2e/run.sh +0 -28
  57. data/spec/test_aliases_api_spec.rb +0 -123
data/api.yaml DELETED
@@ -1,625 +0,0 @@
1
- openapi: '3.0.0'
2
- info:
3
- title: Vault HTTP API
4
- description: |
5
- The VGS Vault HTTP API is used for storing, retrieving, and managing sensitive data (aka Tokenization) within a VGS Vault.
6
-
7
- 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.
8
-
9
- ## What is VGS
10
-
11
- 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.
12
-
13
- 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.
14
-
15
- **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).
16
-
17
- **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).
18
-
19
- 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).
20
-
21
- ## Learn about Tokenization
22
-
23
- - [Create an Account for Free Tokenization](https://dashboard.verygoodsecurity.com/tokenization)
24
- - [Try a Tokenization Demo](https://www.verygoodsecurity.com/docs/tokenization/getting-started)
25
- - [Install a Tokenization SDK](https://www.verygoodsecurity.com/docs/tokenization/client-libraries)
26
-
27
- ## Introduction
28
-
29
- ### Alias-Formats
30
- | Format | Description |
31
- |---------------------------------|-------------------------------------------------------------------------------------------|
32
- | UUID | Generic - VGS Alias (Default) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx |
33
- | NUM_LENGTH_PRESERVING | Generic - Numeric Length Preserving - xxxxxxxxxxxxxxxx |
34
- | FPE_SIX_T_FOUR | Payment Card - Format Preserving, Luhn Valid (6T4) - <first_six>xxxxxx<last_four> |
35
- | FPE_T_FOUR | Payment Card - Format Preserving, Luhn Valid (T4) - xxxxxxxxxxxx<last_four> |
36
- | PFPT | Payment Card - Prefixed, Luhn Valid, 19 Digits Fixed Length - xxxxxxxxxxxxxxxxxxx |
37
- | NON_LUHN_FPE_ALPHANUMERIC | Payment Card - Format Preserving - Non Luhn Valid - xxxxxxxxxxxxxxxx |
38
- | FPE_SSN_T_FOUR | SSN - Format Preserving (A4) - xxx-xx-<last_four> |
39
- | FPE_ACC_NUM_T_FOUR | Account Number - Numeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> |
40
- | FPE_ALPHANUMERIC_ACC_NUM_T_FOUR | Account Number - Alphanumeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> |
41
- | GENERIC_T_FOUR | Generic - VGS Alias Last Four (T4) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx_<last_four> |
42
- | RAW_UUID | Generic - UUID - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
43
- | ALPHANUMERIC_SIX_T_FOUR | Numeric - Include Alphanumeric, 19 symbols length (6T4) - <first_six>xxxxxxxxx<last_four> |
44
- | VGS_FIXED_LEN_GENERIC | Generic - VGS Alphanumeric Fixed Length, 29 characters - vgsxxxxxxxxxxxxxxxxxxxxxxxxxx |
45
-
46
- ## Authentication
47
-
48
- 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)
49
-
50
- Credentials to access the API can be generated on the
51
- [dashboard](https://dashboard.verygoodsecurity.com) by going to the Settings
52
- section of the vault of your choosing.
53
-
54
- [Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials)
55
-
56
- ## Resource Limits
57
-
58
- ### Data Limits
59
-
60
- This API allows storing data up to 32MB in size.
61
-
62
- ### Rate Limiting
63
-
64
- The API allows up to 3,000 requests per minute. Requests are associated with
65
- the vault, regardless of the access credentials used to authenticate the
66
- request.
67
-
68
- Your current rate limit is included as HTTP headers in every API response:
69
-
70
- | Header Name | Description |
71
- |-------------------------|----------------------------------------------------------|
72
- | `x-ratelimit-remaining` | The number of requests remaining in the 1-minute window. |
73
-
74
- If you exceed the rate limit, the API will reject the request with HTTP
75
- [429 Too Many Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429).
76
-
77
- ### Errors
78
-
79
- The API uses standard HTTP status codes to indicate whether the request
80
- succeeded or not.
81
-
82
- In case of failure, the response body will be JSON in a predefined format.
83
- For example, trying to create too many aliases at once results in the
84
- following response:
85
-
86
- ```json
87
- {
88
- "errors": [
89
- {
90
- "status": 400,
91
- "title": "Bad request",
92
- "detail": "Too many values (limit: 20)",
93
- "href": "https://api.sandbox.verygoodvault.com/aliases"
94
- }
95
- ]
96
- }
97
- ```
98
- version: '1.0.0'
99
- contact:
100
- email: support@verygoodsecurity.com
101
- x-logo:
102
- url: images/vgs-logo.png
103
- href: https://www.verygoodsecurity.com
104
- altText: VGS Logo
105
-
106
- externalDocs:
107
- description: Find out more about VGS
108
- url: https://www.verygoodsecurity.com/
109
-
110
- servers:
111
- - url: https://api.sandbox.verygoodvault.com
112
- description: Sandbox
113
-
114
- - url: https://api.live.verygoodvault.com
115
- description: Live
116
-
117
- - url: https://api.live-eu-1.verygoodvault.com
118
- description: Live EU
119
-
120
- tags:
121
- - name: aliases
122
- x-displayName: Aliases
123
- description: |
124
- Unique IDs that retain all the essential information about the data
125
- without compromising its security.
126
-
127
- x-tagGroups:
128
- - name: Data Management
129
- tags:
130
- - aliases
131
-
132
- security:
133
- - basicAuth: []
134
-
135
- paths:
136
- /aliases:
137
- post:
138
- operationId: createAliases
139
- tags:
140
- - aliases
141
- summary: Create aliases
142
- description: |
143
- Stores multiple values at once & returns their aliases.
144
-
145
- Alternatively, this endpoint may be used to associate additional (i.e.
146
- secondary) aliases with the same underlying data as the reference
147
- alias specified in the request body.
148
-
149
- **NOTE:** You cannot reference the same alias more than once in a
150
- single request.
151
- requestBody:
152
- content:
153
- application/json:
154
- schema:
155
- $ref: '#/components/schemas/CreateAliasesRequest'
156
- examples:
157
- A:
158
- summary: Create a new alias
159
- value:
160
- data:
161
- - value: 122105155
162
- classifiers:
163
- - bank-account
164
- format: UUID
165
- storage: PERSISTENT
166
- B:
167
- summary: Reference an existing alias
168
- value:
169
- data:
170
- - alias: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
171
- format: RAW_UUID
172
- storage: PERSISTENT
173
- responses:
174
- '201':
175
- description: Created
176
- content:
177
- application/json:
178
- schema:
179
- type: object
180
- properties:
181
- data:
182
- type: array
183
- items:
184
- $ref: '#/components/schemas/RevealedData'
185
- description: List of stored values along with their aliases.
186
- default:
187
- $ref: '#/components/responses/ApiErrorsResponse'
188
- x-codeSamples:
189
- - lang: Shell
190
- label: cURL
191
- source: |
192
- curl https://api.sandbox.verygoodvault.com/aliases \
193
- -X POST \
194
- -u "$USERNAME:$PASSWORD" \
195
- -H 'Content-Type: application/json' \
196
- -d '{
197
- "data": [
198
- {
199
- "value": "test@example.com",
200
- "classifiers": [
201
- "email_address"
202
- ],
203
- "format": "UUID",
204
- "storage": "VOLATILE"
205
- }
206
- ]
207
- }'
208
-
209
- get:
210
- operationId: revealMultipleAliases
211
- tags:
212
- - aliases
213
- summary: Reveal multiple aliases
214
- description: |
215
- Given a list of aliases, retrieves all associated values stored in the
216
- vault.
217
-
218
- **NOTE:** This endpoint may expose sensitive data. Therefore, it is
219
- disabled by default. To enable it, please contact your VGS account
220
- manager or drop us a line at
221
- [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
222
- parameters:
223
- - name: aliases
224
- in: query
225
- required: true
226
- description: Comma-separated list of aliases to reveal.
227
- example:
228
- - "tok_sandbox_5UpnbMvaihRuRwz5QXwBFw,tok_sandbox_9ToiJHedw1nE1Jfx1qYYgz"
229
- schema:
230
- type: string
231
- - name: storage
232
- in: query
233
- required: false
234
- description: PERSISTENT or VOLATILE storage
235
- example:
236
- - "PERSISTENT"
237
- schema:
238
- type: string
239
- responses:
240
- '200':
241
- description: OK
242
- content:
243
- application/json:
244
- schema:
245
- type: object
246
- properties:
247
- data:
248
- type: object
249
- additionalProperties:
250
- x-additionalPropertiesName: alias
251
- $ref: '#/components/schemas/RevealedData'
252
- example:
253
- tok_sandbox_5UpnbMvaihRuRwz5QXwBFw:
254
- value: "476673481"
255
- classifiers:
256
- - bank-account
257
- aliases:
258
- - value: tok_sandbox_5UpnbMvaihRuRwz5QXwBFw
259
- format: UUID
260
- created_at: "2019-08-10T11:45:30Z"
261
- storage: VOLATILE
262
- tok_sandbox_9ToiJHedw1nE1Jfx1qYYgz:
263
- value: "750360025"
264
- classifiers:
265
- - bank-account
266
- aliases:
267
- - value: tok_sandbox_9ToiJHedw1nE1Jfx1qYYgz
268
- format: UUID
269
- created_at: "2019-08-10T11:45:30Z"
270
- storage: VOLATILE
271
- default:
272
- $ref: '#/components/responses/ApiErrorsResponse'
273
- x-codeSamples:
274
- - lang: Shell
275
- label: cURL
276
- source: |
277
- curl https://api.sandbox.verygoodvault.com/aliases?aliases={{alias1}},{{alias2}}?storage=PERSISTENT \
278
- -u "$USERNAME:$PASSWORD"
279
-
280
- /aliases/delete:
281
- post:
282
- summary: "Batch Delete Aliases"
283
- operationId: "deleteAliases"
284
- tags:
285
- - aliases
286
- description: |
287
- Deletes multiple aliases.
288
- requestBody:
289
- content:
290
- application/json:
291
- schema:
292
- $ref: "#/components/schemas/BatchAliasesRequest"
293
- required: true
294
- responses:
295
- "204":
296
- description: "No Content"
297
- "404":
298
- description: "Not Found"
299
- x-codeSamples:
300
- - lang: Shell
301
- label: cURL
302
- source: |
303
- curl -v https://api.sandbox.verygoodvault.com/aliases/delete -d \
304
- '{"storage":"VOLATILE","data":["tok_whjuj6F8r3f2KeCpY7RPCE"]}' \
305
- -H 'Content-Type: application/json' \
306
- -u "$USERNAME:$PASSWORD"
307
-
308
- /aliases/{alias}:
309
- parameters:
310
- - $ref: '#/components/parameters/alias'
311
- - $ref: '#/components/parameters/storage'
312
- get:
313
- operationId: revealAlias
314
- tags:
315
- - aliases
316
- summary: Reveal single alias
317
- description: |
318
- Retrieves a stored value along with its aliases.
319
-
320
- **NOTE:** This endpoint may expose sensitive data. Therefore, it is
321
- disabled by default. To enable it, please contact your VGS account
322
- manager or drop us a line at
323
- [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
324
- parameters:
325
- - $ref: '#/components/parameters/alias'
326
- - $ref: '#/components/parameters/storage'
327
- responses:
328
- '200':
329
- description: OK
330
- content:
331
- application/json:
332
- schema:
333
- type: object
334
- properties:
335
- data:
336
- type: array
337
- items:
338
- $ref: '#/components/schemas/RevealedData'
339
- description: The retrieved value.
340
- minItems: 1
341
- maxItems: 1
342
- default:
343
- $ref: '#/components/responses/ApiErrorsResponse'
344
- x-codeSamples:
345
- - lang: Shell
346
- label: cURL
347
- source: |
348
- curl https://api.sandbox.verygoodvault.com/aliases/{{alias}}?storage=PERSISTENT \
349
- -u "$USERNAME:$PASSWORD"
350
- put:
351
- operationId: updateAlias
352
- tags:
353
- - aliases
354
- summary: Update data classifiers
355
- description: |
356
- Apply new classifiers to the value that the specified alias is
357
- associated with.
358
- requestBody:
359
- content:
360
- application/json:
361
- schema:
362
- $ref: '#/components/schemas/UpdateAliasRequest'
363
- responses:
364
- '204':
365
- description: No Content
366
- default:
367
- $ref: '#/components/responses/ApiErrorsResponse'
368
- x-codeSamples:
369
- - lang: Shell
370
- label: cURL
371
- source: |
372
- curl https://api.sandbox.verygoodvault.com/aliases/{{alias}} \
373
- -X PUT \
374
- -u "$USERNAME:$PASSWORD" \
375
- -H 'Content-Type: application/json' \
376
- -d '{
377
- "data": {
378
- "classifiers": [
379
- "credit-cards", "PII"
380
- ]
381
- }
382
- }'
383
- delete:
384
- operationId: deleteAlias
385
- tags:
386
- - aliases
387
- summary: Delete alias
388
- description: |
389
- Removes a single alias.
390
- parameters:
391
- - $ref: '#/components/parameters/alias'
392
- - $ref: '#/components/parameters/storage'
393
- responses:
394
- '204':
395
- description: No Content
396
- default:
397
- $ref: '#/components/responses/ApiErrorsResponse'
398
- x-codeSamples:
399
- - lang: Shell
400
- label: cURL
401
- source: |
402
- curl https://api.sandbox.verygoodvault.com/aliases/{{alias}}?storage=PERSISTENT \
403
- -X DELETE \
404
- -u "$USERNAME:$PASSWORD"
405
-
406
-
407
- components:
408
-
409
- # See the following links for details:
410
- # - https://swagger.io/docs/specification/authentication/basic-authentication/
411
- securitySchemes:
412
- basicAuth:
413
- type: http
414
- scheme: basic
415
- description: The default authentication schema.
416
-
417
- parameters:
418
- alias:
419
- name: alias
420
- in: path
421
- required: true
422
- description: Alias to operate on.
423
- schema:
424
- type: string
425
- example: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
426
- storage:
427
- name: "storage"
428
- in: "query"
429
- required: false
430
- schema:
431
- type: "string"
432
- enum:
433
- - "PERSISTENT"
434
- - "VOLATILE"
435
- default: "PERSISTENT"
436
-
437
- responses:
438
- ApiErrorsResponse:
439
- description: Something went wrong
440
- content:
441
- application/json:
442
- schema:
443
- type: object
444
- properties:
445
- errors:
446
- type: array
447
- items:
448
- $ref: '#/components/schemas/ApiError'
449
- description: List of errors that occurred while processing the request.
450
- minItems: 1
451
-
452
- schemas:
453
- ApiError:
454
- type: object
455
- properties:
456
- status:
457
- type: integer
458
- description: HTTP status code.
459
- title:
460
- type: string
461
- description: High-level reason of why the request failed.
462
- detail:
463
- type: string
464
- description: Explanation of what exactly went wrong.
465
- href:
466
- type: string
467
- description: Request URL.
468
-
469
- RevealedData:
470
- type: "object"
471
- properties:
472
- value:
473
- type: "string"
474
- description: Decrypted value stored in the vault.
475
- example: 122105155
476
- classifiers:
477
- type: "array"
478
- items:
479
- type: "string"
480
- example: bank-account
481
- description: List of tags the value is classified with.
482
- aliases:
483
- type: "array"
484
- items:
485
- $ref: '#/components/schemas/AliasDto'
486
- description: List of aliases associated with the value.
487
- created_at:
488
- type: "string"
489
- format: "date-time"
490
- description: Creation time, in UTC.
491
- example: "2019-05-15T12:30:45Z"
492
- nullable: true
493
- storage:
494
- type: string
495
- enum:
496
- - PERSISTENT
497
- - VOLATILE
498
- default: PERSISTENT
499
- description: |
500
- Storage medium to use.
501
-
502
- VOLATILE results in data being persisted into an in-memory data store for one hour which is required for PCI compliant storage of card security code data.
503
-
504
- AliasDto:
505
- type: "object"
506
- properties:
507
- alias:
508
- type: "string"
509
- example: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
510
- description: Opaque string used to substitute the raw value.
511
- format:
512
- $ref: '#/components/schemas/AliasFormat'
513
- nullable: true
514
-
515
- AliasFormat:
516
- type: string
517
- enum:
518
- - "ALPHANUMERIC_SIX_T_FOUR"
519
- - "CUSTOM"
520
- - "FPE_ACC_NUM_T_FOUR"
521
- - "FPE_ALPHANUMERIC_ACC_NUM_T_FOUR"
522
- - "FPE_SIX_T_FOUR"
523
- - "FPE_SSN_T_FOUR"
524
- - "FPE_T_FOUR"
525
- - "GENERIC_T_FOUR"
526
- - "JS"
527
- - "NON_LUHN_FPE_ALPHANUMERIC"
528
- - "NUM_LENGTH_PRESERVING"
529
- - "PFPT"
530
- - "RAW_UUID"
531
- - "UUID"
532
- - "VGS_FIXED_LEN_GENERIC"
533
- description: |
534
- Format of the generated alias string.
535
-
536
- See [Alias Formats](#section/Introduction/Alias-Formats) for details.
537
- example: UUID
538
- nullable: true
539
-
540
- BatchAliasesRequest:
541
- type: "object"
542
- properties:
543
- data:
544
- type: "array"
545
- items:
546
- type: "string"
547
- storage:
548
- type: "string"
549
- enum:
550
- - "PERSISTENT"
551
- - "VOLATILE"
552
- description: |
553
- Format for batch requests (limit 20)
554
- example: '{"data":["123-13123-1232"],"storage":"PERSISTENT"}'
555
-
556
- CreateAliasesRequest:
557
- type: object
558
- properties:
559
- data:
560
- type: array
561
- items:
562
- $ref: "#/components/schemas/CreateAliasesRequestNew"
563
- minItems: 1
564
- maxItems: 20
565
- required:
566
- - data
567
-
568
- CreateAliasesRequestNew:
569
- type: object
570
- properties:
571
- value:
572
- type: string
573
- description: Raw value to encrypt & store in the vault.
574
- example: 122105155
575
- classifiers:
576
- type: array
577
- items:
578
- type: string
579
- example: bank-account
580
- description: List of tags to classify the value with.
581
- format:
582
- $ref: '#/components/schemas/AliasFormat'
583
- storage:
584
- type: string
585
- enum:
586
- - PERSISTENT
587
- - VOLATILE
588
- default: PERSISTENT
589
- description: |
590
- Storage medium to use.
591
-
592
- VOLATILE results in data being persisted into an in-memory data store for one hour which is required for PCI compliant storage of card security code data.
593
- required:
594
- - value
595
- - format
596
-
597
- CreateAliasesRequestReference:
598
- type: object
599
- properties:
600
- alias:
601
- type: string
602
- description: Existing alias to use as a reference.
603
- example: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
604
- format:
605
- $ref: '#/components/schemas/AliasFormat'
606
- required:
607
- - alias
608
- - format
609
-
610
- UpdateAliasRequest:
611
- type: object
612
- properties:
613
- data:
614
- type: object
615
- properties:
616
- classifiers:
617
- type: array
618
- items:
619
- type: string
620
- example: bank-account
621
- description: List of tags to classify the value with.
622
- required:
623
- - classifiers
624
- required:
625
- - data
@@ -1,57 +0,0 @@
1
- =begin
2
- #Vault HTTP API
3
-
4
- #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\" } ] } ```
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- Contact: support@verygoodsecurity.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
10
-
11
- =end
12
-
13
- module VgsApiClient
14
- class ApiError < StandardError
15
- attr_reader :code, :response_headers, :response_body
16
-
17
- # Usage examples:
18
- # ApiError.new
19
- # ApiError.new("message")
20
- # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
21
- # ApiError.new(:code => 404, :message => "Not Found")
22
- def initialize(arg = nil)
23
- if arg.is_a? Hash
24
- if arg.key?(:message) || arg.key?('message')
25
- super(arg[:message] || arg['message'])
26
- else
27
- super arg
28
- end
29
-
30
- arg.each do |k, v|
31
- instance_variable_set "@#{k}", v
32
- end
33
- else
34
- super arg
35
- end
36
- end
37
-
38
- # Override to_s to display a friendly error message
39
- def to_s
40
- message
41
- end
42
-
43
- def message
44
- if @message.nil?
45
- msg = "Error message: the server returns an error"
46
- else
47
- msg = @message
48
- end
49
-
50
- msg += "\nHTTP status code: #{code}" if code
51
- msg += "\nResponse headers: #{response_headers}" if response_headers
52
- msg += "\nResponse body: #{response_body}" if response_body
53
-
54
- msg
55
- end
56
- end
57
- end