generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_schema.json
477 lines (477 loc) · 15.8 KB
/
config_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
{
"$defs": {
"S3Config": {
"additionalProperties": false,
"description": "S3-specific config params.\nInherit your config class from this class if you need\nto talk to an S3 service in the backend.\n\nArgs:\n s3_endpoint_url (str): The URL to the S3 endpoint.\n s3_access_key_id (str):\n Part of credentials for login into the S3 service. See:\n https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html\n s3_secret_access_key (str):\n Part of credentials for login into the S3 service. See:\n https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html\n s3_session_token (Optional[str]):\n Optional part of credentials for login into the S3 service. See:\n https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html\n aws_config_ini (Optional[Path]):\n Path to a config file for specifying more advanced S3 parameters.\n This should follow the format described here:\n https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#using-a-configuration-file\n Defaults to None.",
"properties": {
"s3_endpoint_url": {
"description": "URL to the S3 API.",
"examples": [
"http://localhost:4566"
],
"title": "S3 Endpoint Url",
"type": "string"
},
"s3_access_key_id": {
"description": "Part of credentials for login into the S3 service. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html",
"examples": [
"my-access-key-id"
],
"title": "S3 Access Key Id",
"type": "string"
},
"s3_secret_access_key": {
"description": "Part of credentials for login into the S3 service. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html",
"examples": [
"my-secret-access-key"
],
"format": "password",
"title": "S3 Secret Access Key",
"type": "string",
"writeOnly": true
},
"s3_session_token": {
"anyOf": [
{
"format": "password",
"type": "string",
"writeOnly": true
},
{
"type": "null"
}
],
"default": null,
"description": "Part of credentials for login into the S3 service. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html",
"examples": [
"my-session-token"
],
"title": "S3 Session Token"
},
"aws_config_ini": {
"anyOf": [
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Path to a config file for specifying more advanced S3 parameters. This should follow the format described here: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#using-a-configuration-file",
"examples": [
"~/.aws/config"
],
"title": "Aws Config Ini"
}
},
"required": [
"s3_endpoint_url",
"s3_access_key_id",
"s3_secret_access_key"
],
"title": "S3Config",
"type": "object"
},
"S3ObjectStorageNodeConfig": {
"additionalProperties": false,
"description": "Configuration for one specific object storage node and one bucket in it.\n\nThe bucket is the main bucket that the service is responsible for.",
"properties": {
"bucket": {
"title": "Bucket",
"type": "string"
},
"credentials": {
"$ref": "#/$defs/S3Config"
}
},
"required": [
"bucket",
"credentials"
],
"title": "S3ObjectStorageNodeConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Modifies the original Settings class provided by the user",
"properties": {
"file_upload_received_topic": {
"description": "The name of the topic use to publish FileUploadReceived events.",
"examples": [
"file-upload-received"
],
"title": "File Upload Received Topic",
"type": "string"
},
"file_upload_received_collection": {
"description": "The name of the collection used to store FileUploadReceived events. The value should use hyphens in place of underscores if needed.",
"examples": [
"fileUploads"
],
"title": "File Upload Received Collection",
"type": "string"
},
"file_deleted_event_topic": {
"description": "Name of the topic used for events indicating that a file has been deleted.",
"examples": [
"file-downloads"
],
"title": "File Deleted Event Topic",
"type": "string"
},
"file_deleted_event_type": {
"description": "The type used for events indicating that a file has been deleted.",
"examples": [
"file_deleted"
],
"title": "File Deleted Event Type",
"type": "string"
},
"files_to_delete_topic": {
"description": "The name of the topic for events informing about files to be deleted.",
"examples": [
"file_deletions"
],
"title": "Files To Delete Topic",
"type": "string"
},
"file_metadata_event_topic": {
"description": "Name of the topic to receive new or changed metadata on files that shall be registered for uploaded.",
"examples": [
"metadata"
],
"title": "File Metadata Event Topic",
"type": "string"
},
"file_metadata_event_type": {
"description": "The type used for events to receive new or changed metadata on files that are expected to be uploaded.",
"examples": [
"file_metadata_upserted"
],
"title": "File Metadata Event Type",
"type": "string"
},
"upload_accepted_event_topic": {
"description": "Name of the topic to receive event that indicate that an upload was by downstream services.",
"examples": [
"internal-file-registry"
],
"title": "Upload Accepted Event Topic",
"type": "string"
},
"upload_accepted_event_type": {
"description": "The type used for event that indicate that an upload was by downstream services.",
"examples": [
"file_registered"
],
"title": "Upload Accepted Event Type",
"type": "string"
},
"upload_rejected_event_topic": {
"description": "Name of the topic used for events informing about rejection of an upload by downstream services due to validation failure.",
"examples": [
"file-interrogation"
],
"title": "Upload Rejected Event Topic",
"type": "string"
},
"upload_rejected_event_type": {
"description": "The type used for events informing about the failure of a file validation.",
"examples": [
"file_validation_failed"
],
"title": "Upload Rejected Event Type",
"type": "string"
},
"log_level": {
"default": "INFO",
"description": "The minimum log level to capture.",
"enum": [
"CRITICAL",
"ERROR",
"WARNING",
"INFO",
"DEBUG",
"TRACE"
],
"title": "Log Level",
"type": "string"
},
"service_name": {
"default": "ucs",
"title": "Service Name",
"type": "string"
},
"service_instance_id": {
"description": "A string that uniquely identifies this instance across all instances of this service. A globally unique Kafka client ID will be created by concatenating the service_name and the service_instance_id.",
"examples": [
"germany-bw-instance-001"
],
"title": "Service Instance Id",
"type": "string"
},
"log_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If set, will replace JSON formatting with the specified string format. If not set, has no effect. In addition to the standard attributes, the following can also be specified: timestamp, service, instance, level, correlation_id, and details",
"examples": [
"%(timestamp)s - %(service)s - %(level)s - %(message)s",
"%(asctime)s - Severity: %(levelno)s - %(msg)s"
],
"title": "Log Format"
},
"log_traceback": {
"default": true,
"description": "Whether to include exception tracebacks in log messages.",
"title": "Log Traceback",
"type": "boolean"
},
"kafka_servers": {
"description": "A list of connection strings to connect to Kafka bootstrap servers.",
"examples": [
[
"localhost:9092"
]
],
"items": {
"type": "string"
},
"title": "Kafka Servers",
"type": "array"
},
"kafka_security_protocol": {
"default": "PLAINTEXT",
"description": "Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL.",
"enum": [
"PLAINTEXT",
"SSL"
],
"title": "Kafka Security Protocol",
"type": "string"
},
"kafka_ssl_cafile": {
"default": "",
"description": "Certificate Authority file path containing certificates used to sign broker certificates. If a CA is not specified, the default system CA will be used if found by OpenSSL.",
"title": "Kafka Ssl Cafile",
"type": "string"
},
"kafka_ssl_certfile": {
"default": "",
"description": "Optional filename of client certificate, as well as any CA certificates needed to establish the certificate's authenticity.",
"title": "Kafka Ssl Certfile",
"type": "string"
},
"kafka_ssl_keyfile": {
"default": "",
"description": "Optional filename containing the client private key.",
"title": "Kafka Ssl Keyfile",
"type": "string"
},
"kafka_ssl_password": {
"default": "",
"description": "Optional password to be used for the client private key.",
"format": "password",
"title": "Kafka Ssl Password",
"type": "string",
"writeOnly": true
},
"generate_correlation_id": {
"default": true,
"description": "A flag, which, if False, will result in an error when inbound requests don't possess a correlation ID. If True, requests without a correlation ID will be assigned a newly generated ID in the correlation ID middleware function.",
"examples": [
true,
false
],
"title": "Generate Correlation Id",
"type": "boolean"
},
"kafka_max_message_size": {
"default": 1048576,
"description": "The largest message size that can be transmitted, in bytes. Only services that have a need to send/receive larger messages should set this.",
"examples": [
1048576,
16777216
],
"exclusiveMinimum": 0,
"title": "Kafka Max Message Size",
"type": "integer"
},
"object_storages": {
"additionalProperties": {
"$ref": "#/$defs/S3ObjectStorageNodeConfig"
},
"title": "Object Storages",
"type": "object"
},
"db_connection_str": {
"description": "MongoDB connection string. Might include credentials. For more information see: https://naiveskill.com/mongodb-connection-string/",
"examples": [
"mongodb://localhost:27017"
],
"format": "password",
"title": "Db Connection Str",
"type": "string",
"writeOnly": true
},
"db_name": {
"description": "Name of the database located on the MongoDB server.",
"examples": [
"my-database"
],
"title": "Db Name",
"type": "string"
},
"host": {
"default": "127.0.0.1",
"description": "IP of the host.",
"title": "Host",
"type": "string"
},
"port": {
"default": 8080,
"description": "Port to expose the server on the specified host",
"title": "Port",
"type": "integer"
},
"auto_reload": {
"default": false,
"description": "A development feature. Set to `True` to automatically reload the server upon code changes",
"title": "Auto Reload",
"type": "boolean"
},
"workers": {
"default": 1,
"description": "Number of workers processes to run.",
"title": "Workers",
"type": "integer"
},
"api_root_path": {
"default": "",
"description": "Root path at which the API is reachable. This is relative to the specified host and port.",
"title": "Api Root Path",
"type": "string"
},
"openapi_url": {
"default": "/openapi.json",
"description": "Path to get the openapi specification in JSON format. This is relative to the specified host and port.",
"title": "Openapi Url",
"type": "string"
},
"docs_url": {
"default": "/docs",
"description": "Path to host the swagger documentation. This is relative to the specified host and port.",
"title": "Docs Url",
"type": "string"
},
"cors_allowed_origins": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of origins that should be permitted to make cross-origin requests. By default, cross-origin requests are not allowed. You can use ['*'] to allow any origin.",
"examples": [
[
"https://example.org",
"https://www.example.org"
]
],
"title": "Cors Allowed Origins"
},
"cors_allow_credentials": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate that cookies should be supported for cross-origin requests. Defaults to False. Also, cors_allowed_origins cannot be set to ['*'] for credentials to be allowed. The origins must be explicitly specified.",
"examples": [
[
"https://example.org",
"https://www.example.org"
]
],
"title": "Cors Allow Credentials"
},
"cors_allowed_methods": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of HTTP methods that should be allowed for cross-origin requests. Defaults to ['GET']. You can use ['*'] to allow all standard methods.",
"examples": [
[
"*"
]
],
"title": "Cors Allowed Methods"
},
"cors_allowed_headers": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of HTTP request headers that should be supported for cross-origin requests. Defaults to []. You can use ['*'] to allow all headers. The Accept, Accept-Language, Content-Language and Content-Type headers are always allowed for CORS requests.",
"examples": [
[]
],
"title": "Cors Allowed Headers"
}
},
"required": [
"file_upload_received_topic",
"file_upload_received_collection",
"file_deleted_event_topic",
"file_deleted_event_type",
"files_to_delete_topic",
"file_metadata_event_topic",
"file_metadata_event_type",
"upload_accepted_event_topic",
"upload_accepted_event_type",
"upload_rejected_event_topic",
"upload_rejected_event_type",
"service_instance_id",
"kafka_servers",
"object_storages",
"db_connection_str",
"db_name"
],
"title": "ModSettings",
"type": "object"
}