@itentialopensource/adapter-utils 4.44.9

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.
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@itentialopensource/adapter-utils",
3
+ "version": "4.44.9",
4
+ "description": "Itential Adapter Utility Libraries",
5
+ "scripts": {
6
+ "preinstall": "node utils/setup.js",
7
+ "lint": "eslint . --ext .json --ext .js",
8
+ "lint:errors": "eslint --quiet . --ext .json --ext .js",
9
+ "test:unit": "mocha test/unit/lib/requestHandlerTest.js --LOG=error && mocha test/unit/lib/restHandlerTest.js --LOG=error && mocha test/unit/lib/propertyUtilTest.js --LOG=error && mocha test/unit/lib/translatorUtilTest.js --LOG=error && mocha test/unit/lib/dbUtilTest.js --LOG=error",
10
+ "test:integration": "mocha test/integration/lib/requestHandlerTest.js --LOG=error && mocha test/integration/lib/restHandlerTest.js --LOG=error",
11
+ "test:cover": "nyc --reporter html --reporter text mocha --recursive --reporter dot test/*",
12
+ "test": "npm run test:unit && npm run test:integration",
13
+ "deploy": "npm publish --registry=http://registry.npmjs.org --access=public",
14
+ "build": "npm run deploy"
15
+ },
16
+ "license": "Apache-2.0",
17
+ "engines": {
18
+ "node": ">= 8.0.0",
19
+ "npm": ">= 6.0.0"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git@gitlab.com:itentialopensource/adapter-utils.git"
24
+ },
25
+ "author": "Itential",
26
+ "homepage": "https://gitlab.com/itentialopensource/adapter-utils#readme",
27
+ "dependencies": {
28
+ "ajv": "^6.12.0",
29
+ "async-lock": "1.2.0",
30
+ "cookie": "^0.4.0",
31
+ "crypto-js": "^3.1.9-1",
32
+ "ejs": "^2.7.1",
33
+ "form-data": "^2.5.1",
34
+ "fs-extra": "^8.1.0",
35
+ "https-proxy-agent": "^2.2.1",
36
+ "json-query": "^2.2.2",
37
+ "jsontoxml": "^1.0.1",
38
+ "jsonwebtoken": "^8.5.1",
39
+ "mongodb": "^3.3.3",
40
+ "querystring": "^0.2.0",
41
+ "readline-sync": "^1.4.10",
42
+ "socks-proxy-agent": "^4.0.2",
43
+ "uuid": "^8.3.2",
44
+ "xml2js": "^0.4.23"
45
+ },
46
+ "devDependencies": {
47
+ "chai": "^4.3.4",
48
+ "eslint": "^7.29.0",
49
+ "eslint-config-airbnb-base": "^14.2.1",
50
+ "eslint-plugin-import": "^2.23.4",
51
+ "eslint-plugin-json": "^3.0.0",
52
+ "mocha": "^9.0.1",
53
+ "nyc": "^15.1.0",
54
+ "strip-ansi": "^7.0.0",
55
+ "strip-ansi-cli": "^3.0.1",
56
+ "testdouble": "^3.16.1",
57
+ "winston": "^3.3.3"
58
+ },
59
+ "peerDependencies": {},
60
+ "private": false
61
+ }
@@ -0,0 +1,840 @@
1
+ {
2
+ "$id": "adapter-systemx",
3
+ "type": "object",
4
+ "$schema": "http://json-schema.org/draft-07/schema#",
5
+ "properties": {
6
+ "host": {
7
+ "type": "string",
8
+ "description": "hostname of the server",
9
+ "default": "",
10
+ "examples": [
11
+ "systemx.customer.com"
12
+ ]
13
+ },
14
+ "port": {
15
+ "type": "integer",
16
+ "description": "port on which to connect to the server",
17
+ "default": 443,
18
+ "minimum": 1,
19
+ "maximum": 65535
20
+ },
21
+ "base_path": {
22
+ "type": "string",
23
+ "description": "a base path that is consistent across api calls",
24
+ "default": "",
25
+ "examples": [
26
+ "/system/api"
27
+ ]
28
+ },
29
+ "version": {
30
+ "type": "string",
31
+ "description": "api version this adapter integrates with",
32
+ "default": "",
33
+ "examples": [
34
+ "v1",
35
+ "v2.6",
36
+ "4.5.1"
37
+ ]
38
+ },
39
+ "cache_location": {
40
+ "type": "string",
41
+ "description": "Where cache of information should be located redis or local memory",
42
+ "default": "none",
43
+ "enum": [
44
+ "redis",
45
+ "local",
46
+ "none"
47
+ ]
48
+ },
49
+ "encode_pathvars": {
50
+ "type": "boolean",
51
+ "description": "When true the path variables are encoded in the url",
52
+ "default": true
53
+ },
54
+ "save_metric": {
55
+ "type": [
56
+ "boolean",
57
+ "string"
58
+ ],
59
+ "description": "When true the metrics collected by the adapter will be stored in mongo or in the adapter. If a full path is provided, metrics will be saved in the path provided.",
60
+ "default": false
61
+ },
62
+ "stub": {
63
+ "type": "boolean",
64
+ "description": "When true will not connect to the remote server, but will use a static object for all responses",
65
+ "default": false
66
+ },
67
+ "protocol": {
68
+ "type": "string",
69
+ "description": "the protocol to use to connect to server",
70
+ "default": "http",
71
+ "enum": [
72
+ "http",
73
+ "https"
74
+ ]
75
+ },
76
+ "authentication": {
77
+ "$ref": "#/definitions/authentication"
78
+ },
79
+ "healthcheck": {
80
+ "$ref": "#/definitions/healthcheck"
81
+ },
82
+ "throttle": {
83
+ "$ref": "#/definitions/throttle"
84
+ },
85
+ "request": {
86
+ "$ref": "#/definitions/request"
87
+ },
88
+ "proxy": {
89
+ "$ref": "#/definitions/proxy"
90
+ },
91
+ "ssl": {
92
+ "$ref": "#/definitions/ssl"
93
+ },
94
+ "mongo": {
95
+ "$ref": "#/definitions/mongo"
96
+ }
97
+ },
98
+ "required": [
99
+ "host",
100
+ "port",
101
+ "authentication",
102
+ "healthcheck"
103
+ ],
104
+ "definitions": {
105
+ "authentication": {
106
+ "type": "object",
107
+ "properties": {
108
+ "auth_method": {
109
+ "type": "string",
110
+ "description": "The authentication method for requests",
111
+ "default": "basic user_password",
112
+ "enum": [
113
+ "basic user_password",
114
+ "static_token",
115
+ "jwt_token",
116
+ "request_token",
117
+ "no_authentication"
118
+ ]
119
+ },
120
+ "username": {
121
+ "type": "string",
122
+ "description": "The username used for requests",
123
+ "default": "",
124
+ "examples": [
125
+ "username"
126
+ ]
127
+ },
128
+ "password": {
129
+ "type": "string",
130
+ "description": "The password used for requests. If it was retrieved through the encrypt password call, use the exact return including the {code} or {crypt}",
131
+ "default": "",
132
+ "examples": [
133
+ "password",
134
+ "{code}password",
135
+ "{crypt}password"
136
+ ]
137
+ },
138
+ "token": {
139
+ "type": "string",
140
+ "description": "The token used for requests",
141
+ "default": "",
142
+ "examples": [
143
+ "sdadafdsf_dummytoken_adfkdhfkajd"
144
+ ]
145
+ },
146
+ "token_user_field": {
147
+ "type": "string",
148
+ "description": "The field to send the user credential when getting a token",
149
+ "default": "username",
150
+ "examples": [
151
+ "username"
152
+ ]
153
+ },
154
+ "token_password_field": {
155
+ "type": "string",
156
+ "description": "The field to send the password credential when getting a token",
157
+ "default": "password",
158
+ "examples": [
159
+ "password"
160
+ ]
161
+ },
162
+ "token_result_field": {
163
+ "type": "string",
164
+ "description": "The field to pull the result from when getting a token",
165
+ "default": "token",
166
+ "examples": [
167
+ "token"
168
+ ]
169
+ },
170
+ "token_URI_path": {
171
+ "type": "string",
172
+ "description": "The path used to retrieve a token",
173
+ "default": "",
174
+ "examples": [
175
+ "/api/version/authenticate"
176
+ ]
177
+ },
178
+ "invalid_token_error": {
179
+ "type": "integer",
180
+ "description": "http error status number which defines an invalid token",
181
+ "default": 401,
182
+ "minimum": 0,
183
+ "maximum": 1000
184
+ },
185
+ "token_timeout": {
186
+ "type": "integer",
187
+ "description": "How long a token is valid (in milliseconds), -1 (always get token), 0 use expiration returned with token",
188
+ "default": -1,
189
+ "minimum": -1,
190
+ "maximum": 3600000
191
+ },
192
+ "token_cache": {
193
+ "type": "string",
194
+ "description": "Whether tokens should be stored in redis or local memory",
195
+ "default": "local",
196
+ "enum": [
197
+ "redis",
198
+ "local"
199
+ ]
200
+ },
201
+ "auth_field": {
202
+ "type": [
203
+ "string",
204
+ "array"
205
+ ],
206
+ "description": "The field in which to pass the token",
207
+ "default": "header.headers.X-AUTH-TOKEN",
208
+ "examples": [
209
+ "header.headers.X-AUTH-TOKEN",
210
+ "header.headers.Authorization",
211
+ "header.auth",
212
+ "body.token",
213
+ "url"
214
+ ]
215
+ },
216
+ "auth_field_format": {
217
+ "type": [
218
+ "string",
219
+ "array"
220
+ ],
221
+ "description": "The format used to pass the authentication -- variables {token}, {username}, {password} will be replaced with the proper values. {b64}...{/b64} will base64 encode everything between the start and end tag.",
222
+ "default": "{token}",
223
+ "examples": [
224
+ "{token}",
225
+ "Token {token}",
226
+ "{username}:{password}",
227
+ "Basic {b64}{username}:{password}{/b64}",
228
+ "token={token}"
229
+ ]
230
+ },
231
+ "auth_logging": {
232
+ "type": "boolean",
233
+ "description": "This property turns on logging of Authentication Information and should only be true when debugging authentication and connectivity",
234
+ "default": false
235
+ },
236
+ "client_id": {
237
+ "type": "string",
238
+ "description": "The client id for OAuth requests - can also use username depending on schema",
239
+ "default": ""
240
+ },
241
+ "client_secret": {
242
+ "type": "string",
243
+ "description": "The client secret for OAuth requests - can also use password depending on schema",
244
+ "default": ""
245
+ },
246
+ "grant_type": {
247
+ "type": "string",
248
+ "description": "The grant type for OAuth requests - can also provide in schema",
249
+ "default": ""
250
+ }
251
+ },
252
+ "required": [
253
+ "auth_method"
254
+ ],
255
+ "allOf": [
256
+ {
257
+ "if": {
258
+ "properties": {
259
+ "auth_method": {
260
+ "enum": [
261
+ "basic user_password"
262
+ ]
263
+ }
264
+ }
265
+ },
266
+ "then": {
267
+ "required": [
268
+ "username",
269
+ "password",
270
+ "auth_field",
271
+ "auth_field_format"
272
+ ]
273
+ }
274
+ },
275
+ {
276
+ "if": {
277
+ "properties": {
278
+ "auth_method": {
279
+ "enum": [
280
+ "request_token"
281
+ ]
282
+ }
283
+ }
284
+ },
285
+ "then": {
286
+ "required": [
287
+ "username",
288
+ "password",
289
+ "auth_field",
290
+ "auth_field_format"
291
+ ]
292
+ }
293
+ },
294
+ {
295
+ "if": {
296
+ "properties": {
297
+ "auth_method": {
298
+ "enum": [
299
+ "static_token"
300
+ ]
301
+ }
302
+ }
303
+ },
304
+ "then": {
305
+ "required": [
306
+ "token",
307
+ "auth_field",
308
+ "auth_field_format"
309
+ ]
310
+ }
311
+ }
312
+ ]
313
+ },
314
+ "healthcheck": {
315
+ "type": "object",
316
+ "properties": {
317
+ "type": {
318
+ "type": "string",
319
+ "description": "The type of healthcheck to run",
320
+ "default": "intermittent",
321
+ "enum": [
322
+ "none",
323
+ "startup",
324
+ "intermittent"
325
+ ]
326
+ },
327
+ "frequency": {
328
+ "type": "integer",
329
+ "description": "How often the healthcheck should run (in milliseconds).",
330
+ "default": 300000,
331
+ "minimum": 60000,
332
+ "maximum": 3600000
333
+ },
334
+ "protocol": {
335
+ "type": "string",
336
+ "description": "The protocol used to check the health of the system",
337
+ "default": "REST",
338
+ "enum": [
339
+ "REST"
340
+ ]
341
+ },
342
+ "URI_Path": {
343
+ "type": "string",
344
+ "description": "The path used to check the health of the system",
345
+ "default": "",
346
+ "examples": [
347
+ "/api/version/ping"
348
+ ]
349
+ },
350
+ "query_object": {
351
+ "type": "object",
352
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
353
+ }
354
+ },
355
+ "required": [
356
+ "type"
357
+ ],
358
+ "allOf": [
359
+ {
360
+ "if": {
361
+ "properties": {
362
+ "type": {
363
+ "enum": [
364
+ "intermittent"
365
+ ]
366
+ }
367
+ }
368
+ },
369
+ "then": {
370
+ "required": [
371
+ "frequency"
372
+ ]
373
+ }
374
+ }
375
+ ]
376
+ },
377
+ "throttle": {
378
+ "type": "object",
379
+ "properties": {
380
+ "throttle_enabled": {
381
+ "type": "boolean",
382
+ "description": "Whether to use throttling",
383
+ "default": false
384
+ },
385
+ "number_pronghorns": {
386
+ "type": "integer",
387
+ "description": "whether the throttling is being done in a single Pronghorn instance or whether requests are being throttled across multiple pronghorns",
388
+ "default": 1,
389
+ "minimum": 1,
390
+ "maximum": 20
391
+ },
392
+ "sync_async": {
393
+ "type": "string",
394
+ "description": "should the queue handle request synchronously or asynchronously",
395
+ "default": "sync",
396
+ "examples": [
397
+ "async",
398
+ "sync"
399
+ ]
400
+ },
401
+ "max_in_queue": {
402
+ "type": "integer",
403
+ "description": "the maximum number of requests that Pronghorn should allow into the queue before rejecting requests",
404
+ "default": 1000,
405
+ "minimum": 1,
406
+ "maximum": 5000
407
+ },
408
+ "concurrent_max": {
409
+ "type": "integer",
410
+ "description": "defines the number of request that Pronghorn can send to System at one time",
411
+ "default": 1,
412
+ "minimum": 0,
413
+ "maximum": 1000
414
+ },
415
+ "expire_timeout": {
416
+ "type": "integer",
417
+ "description": "After the request has completed, Pronghorn will wait the additional expire timeout time (in milliseconds) prior to sending in the next request.",
418
+ "default": 0,
419
+ "minimum": 0,
420
+ "maximum": 60000
421
+ },
422
+ "avg_runtime": {
423
+ "type": "integer",
424
+ "description": "an approximate average of how long it takes System to handle each request",
425
+ "default": 200,
426
+ "minimum": 50,
427
+ "maximum": 60000
428
+ },
429
+ "priorities": {
430
+ "type": "array",
431
+ "description": "define your priorities here",
432
+ "items": {
433
+ "type": "object",
434
+ "properties": {
435
+ "value": {
436
+ "type": "number",
437
+ "description": "Defines a priority - this number is what is passed in on a priority request"
438
+ },
439
+ "percent": {
440
+ "type": "number",
441
+ "description": "this is the percent of the queue that comes before the priority request (0 is front of queue, 100 is last in queue)"
442
+ }
443
+ }
444
+ }
445
+ }
446
+ },
447
+ "required": [
448
+ "throttle_enabled"
449
+ ],
450
+ "allOf": [
451
+ {
452
+ "if": {
453
+ "properties": {
454
+ "throttle_enabled": {
455
+ "enum": [
456
+ true
457
+ ]
458
+ }
459
+ }
460
+ },
461
+ "then": {
462
+ "required": [
463
+ "number_pronghorns",
464
+ "sync_async",
465
+ "max_in_queue",
466
+ "concurrent_max",
467
+ "expire_timeout",
468
+ "avg_runtime"
469
+ ]
470
+ }
471
+ }
472
+ ]
473
+ },
474
+ "request": {
475
+ "type": "object",
476
+ "properties": {
477
+ "number_redirects": {
478
+ "type": "integer",
479
+ "description": "how many redirects before it gives up on the request",
480
+ "default": 0,
481
+ "minimum": 0,
482
+ "maximum": 20
483
+ },
484
+ "number_retries": {
485
+ "type": "integer",
486
+ "description": "how many attempt to make before it gives up on the request",
487
+ "default": 3,
488
+ "minimum": 0,
489
+ "maximum": 20
490
+ },
491
+ "limit_retry_error": {
492
+ "type": [
493
+ "integer",
494
+ "array"
495
+ ],
496
+ "description": "http error status number which defines that no capacity was available and thus after waiting a short interval the adapter can retry the request. Supports an array of numbers or strings including a range provided as '###-###'",
497
+ "default": 0
498
+ },
499
+ "failover_codes": {
500
+ "type": "array",
501
+ "description": "An array of codes where it is ok to try another method",
502
+ "items": {
503
+ "type": "integer"
504
+ }
505
+ },
506
+ "attempt_timeout": {
507
+ "type": "integer",
508
+ "description": "how long Pronghorn should wait before aborting the attempt",
509
+ "default": 5000,
510
+ "minimum": 1000,
511
+ "maximum": 3600000
512
+ },
513
+ "global_request": {
514
+ "type": "object",
515
+ "description": "Global Request data that is overriden by the request object",
516
+ "properties": {
517
+ "payload": {
518
+ "type": "object",
519
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
520
+ },
521
+ "uriOptions": {
522
+ "type": "object",
523
+ "description": "options that will be appended to all GET calls"
524
+ },
525
+ "addlHeaders": {
526
+ "type": "object",
527
+ "description": "headers that will be appended to the headers for the call"
528
+ },
529
+ "authData": {
530
+ "type": "object",
531
+ "description": "authentication data that will be appended to the payload for authentication calls"
532
+ }
533
+ }
534
+ },
535
+ "healthcheck_on_timeout": {
536
+ "type": "boolean",
537
+ "description": "Should the system run a healthcheck on timeout",
538
+ "default": false
539
+ },
540
+ "return_raw": {
541
+ "type": "boolean",
542
+ "description": "Will include the raw response with the data that is returned",
543
+ "default": false
544
+ },
545
+ "archiving": {
546
+ "type": "boolean",
547
+ "description": "Archives each request/response and corresponding metrics",
548
+ "default": false
549
+ },
550
+ "return_request": {
551
+ "type": "boolean",
552
+ "description": "This property turns on returning the response information - need to be carefull in case credentials are in the path",
553
+ "default": false
554
+ }
555
+ },
556
+ "required": [
557
+ "number_retries",
558
+ "limit_retry_error",
559
+ "attempt_timeout",
560
+ "healthcheck_on_timeout"
561
+ ]
562
+ },
563
+ "proxy": {
564
+ "type": "object",
565
+ "properties": {
566
+ "enabled": {
567
+ "type": "boolean",
568
+ "description": "Whether or not there is a proxy for the Server",
569
+ "default": false
570
+ },
571
+ "host": {
572
+ "type": "string",
573
+ "description": "hostname of the proxy for the server",
574
+ "default": "",
575
+ "examples": [
576
+ "proxy.customer.com"
577
+ ]
578
+ },
579
+ "port": {
580
+ "type": "integer",
581
+ "description": "port on which to connect to the proxy for the server",
582
+ "default": 443,
583
+ "minimum": 1,
584
+ "maximum": 65535
585
+ },
586
+ "protocol": {
587
+ "type": "string",
588
+ "description": "the protocol to use to connect to the proxy",
589
+ "default": "http",
590
+ "enum": [
591
+ "http",
592
+ "https",
593
+ "socks4",
594
+ "socks5",
595
+ "tls"
596
+ ]
597
+ },
598
+ "username": {
599
+ "type": "string",
600
+ "description": "username for proxy authentication",
601
+ "default": ""
602
+ },
603
+ "password": {
604
+ "type": "string",
605
+ "description": "password for proxy authentication",
606
+ "default": ""
607
+ }
608
+ },
609
+ "required": [
610
+ "enabled"
611
+ ],
612
+ "allOf": [
613
+ {
614
+ "if": {
615
+ "properties": {
616
+ "enabled": {
617
+ "enum": [
618
+ true
619
+ ]
620
+ }
621
+ }
622
+ },
623
+ "then": {
624
+ "required": [
625
+ "host",
626
+ "port"
627
+ ]
628
+ }
629
+ }
630
+ ]
631
+ },
632
+ "ssl": {
633
+ "type": "object",
634
+ "properties": {
635
+ "ecdhCurve": {
636
+ "type": "string",
637
+ "description": "Do we need to set the autoCurve on this request",
638
+ "default": "",
639
+ "examples": [
640
+ "auto"
641
+ ]
642
+ },
643
+ "enabled": {
644
+ "type": "boolean",
645
+ "description": "Whether or not ssl is enabled on Server",
646
+ "default": false
647
+ },
648
+ "accept_invalid_cert": {
649
+ "type": "boolean",
650
+ "description": "Whether the adapter should accept invalid certificates",
651
+ "default": false
652
+ },
653
+ "ca_file": {
654
+ "type": "string",
655
+ "description": "The fully qualified path name to the CA file used for SSL",
656
+ "default": "",
657
+ "examples": [
658
+ "security/ca.pem"
659
+ ]
660
+ },
661
+ "key_file": {
662
+ "type": "string",
663
+ "description": "The fully qualified path name to the key file used for SSL",
664
+ "default": "",
665
+ "examples": [
666
+ "security/key.pem"
667
+ ]
668
+ },
669
+ "cert_file": {
670
+ "type": "string",
671
+ "description": "The fully qualified path name to the Cert file used for SSL",
672
+ "default": "",
673
+ "examples": [
674
+ "security/cert.pem"
675
+ ]
676
+ },
677
+ "secure_protocol": {
678
+ "type": "string",
679
+ "description": "What protocol to set on the ssl request",
680
+ "default": "",
681
+ "examples": [
682
+ "SSLv2_method",
683
+ "SSLv3_method"
684
+ ]
685
+ },
686
+ "ciphers": {
687
+ "type": "string",
688
+ "description": "Hyphen separated list of acceptable ciphers",
689
+ "default": "",
690
+ "examples": [
691
+ "DHE-RSA-AES256-SHA"
692
+ ]
693
+ }
694
+ },
695
+ "required": [
696
+ "enabled"
697
+ ],
698
+ "allOf": [
699
+ {
700
+ "if": {
701
+ "properties": {
702
+ "enabled": {
703
+ "enum": [
704
+ true
705
+ ]
706
+ }
707
+ }
708
+ },
709
+ "then": {
710
+ "required": [
711
+ "accept_invalid_cert",
712
+ "ciphers"
713
+ ]
714
+ }
715
+ },
716
+ {
717
+ "if": {
718
+ "allOf": [
719
+ {
720
+ "properties": {
721
+ "enabled": {
722
+ "enum": [
723
+ true
724
+ ]
725
+ }
726
+ }
727
+ },
728
+ {
729
+ "properties": {
730
+ "accept_invalid_cert": {
731
+ "enum": [
732
+ false
733
+ ]
734
+ }
735
+ }
736
+ }
737
+ ]
738
+ },
739
+ "then": {
740
+ "required": [
741
+ "ca_file"
742
+ ]
743
+ }
744
+ }
745
+ ]
746
+ },
747
+ "mongo": {
748
+ "type": "object",
749
+ "properties": {
750
+ "host": {
751
+ "type": "string",
752
+ "description": "host where mongo database can be found",
753
+ "default": "",
754
+ "examples": [
755
+ "localhost"
756
+ ]
757
+ },
758
+ "port": {
759
+ "type": "integer",
760
+ "description": "port on which to connect to the mongo database",
761
+ "default": 443,
762
+ "minimum": 0,
763
+ "maximum": 65535
764
+ },
765
+ "database": {
766
+ "type": "string",
767
+ "description": "The name of the database to store adapter information in",
768
+ "default": "",
769
+ "examples": [
770
+ "adapter-xyz"
771
+ ]
772
+ },
773
+ "username": {
774
+ "type": "string",
775
+ "description": "The user to connect to the database with",
776
+ "default": "",
777
+ "examples": [
778
+ "username"
779
+ ]
780
+ },
781
+ "password": {
782
+ "type": "string",
783
+ "description": "The password to connect to the database with",
784
+ "default": "",
785
+ "examples": [
786
+ "password"
787
+ ]
788
+ },
789
+ "replSet": {
790
+ "type": "string",
791
+ "description": "The replica set for the database",
792
+ "default": "",
793
+ "examples": [
794
+ "my_repolica_set"
795
+ ]
796
+ },
797
+ "db_ssl": {
798
+ "type": "object",
799
+ "description": "SSL for mongo database connection",
800
+ "properties": {
801
+ "enabled": {
802
+ "type": "boolean",
803
+ "description": "Whether or not ssl is enabled on Database Server",
804
+ "default": false
805
+ },
806
+ "accept_invalid_cert": {
807
+ "type": "boolean",
808
+ "description": "Whether the adapter should accept invalid certificates",
809
+ "default": false
810
+ },
811
+ "ca_file": {
812
+ "type": "string",
813
+ "description": "The fully qualified path name to the CA file used for Database SSL",
814
+ "default": "",
815
+ "examples": [
816
+ "security/ca.pem"
817
+ ]
818
+ },
819
+ "key_file": {
820
+ "type": "string",
821
+ "description": "The fully qualified path name to the key file used for Database SSL",
822
+ "default": "",
823
+ "examples": [
824
+ "security/key.pem"
825
+ ]
826
+ },
827
+ "cert_file": {
828
+ "type": "string",
829
+ "description": "The fully qualified path name to the Cert file used for Database SSL",
830
+ "default": "",
831
+ "examples": [
832
+ "security/cert.pem"
833
+ ]
834
+ }
835
+ }
836
+ }
837
+ }
838
+ }
839
+ }
840
+ }