@3sixty/api-auth-service 0.20.0-next.0 → 0.20.0-next.1

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.
Files changed (73) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/entities/authenticationAuditEntry.js +121 -0
  4. package/dist/es/entities/authenticationAuditEntry.js.map +1 -0
  5. package/dist/es/entities/authenticationRateEntry.js +37 -0
  6. package/dist/es/entities/authenticationRateEntry.js.map +1 -0
  7. package/dist/es/index.js +17 -0
  8. package/dist/es/index.js.map +1 -0
  9. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js +4 -0
  10. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js.map +1 -0
  11. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js +2 -0
  12. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js.map +1 -0
  13. package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js +2 -0
  14. package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js.map +1 -0
  15. package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js +2 -0
  16. package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js.map +1 -0
  17. package/dist/es/models/ITenantOverrideProcessorConfig.js +4 -0
  18. package/dist/es/models/ITenantOverrideProcessorConfig.js.map +1 -0
  19. package/dist/es/models/ITenantOverrideProcessorConstructorOptions.js +2 -0
  20. package/dist/es/models/ITenantOverrideProcessorConstructorOptions.js.map +1 -0
  21. package/dist/es/processors/tenantOverrideProcessor.js +144 -0
  22. package/dist/es/processors/tenantOverrideProcessor.js.map +1 -0
  23. package/dist/es/restEntryPoints.js +13 -0
  24. package/dist/es/restEntryPoints.js.map +1 -0
  25. package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js +355 -0
  26. package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js.map +1 -0
  27. package/dist/es/schema.js +13 -0
  28. package/dist/es/schema.js.map +1 -0
  29. package/dist/es/services/entityStorageAuthenticationAuditService.js +240 -0
  30. package/dist/es/services/entityStorageAuthenticationAuditService.js.map +1 -0
  31. package/dist/es/services/entityStorageAuthenticationRateService.js +213 -0
  32. package/dist/es/services/entityStorageAuthenticationRateService.js.map +1 -0
  33. package/dist/types/entities/authenticationAuditEntry.d.ts +49 -0
  34. package/dist/types/entities/authenticationRateEntry.d.ts +17 -0
  35. package/dist/types/index.d.ts +14 -0
  36. package/dist/types/models/IEntityStorageAuthenticationAuditServiceConfig.d.ts +9 -0
  37. package/dist/types/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.d.ts +15 -0
  38. package/dist/types/models/IEntityStorageAuthenticationRateServiceConfig.d.ts +10 -0
  39. package/dist/types/models/IEntityStorageAuthenticationRateServiceConstructorOptions.d.ts +25 -0
  40. package/dist/types/models/ITenantOverrideProcessorConfig.d.ts +19 -0
  41. package/dist/types/models/ITenantOverrideProcessorConstructorOptions.d.ts +20 -0
  42. package/dist/types/processors/tenantOverrideProcessor.d.ts +48 -0
  43. package/dist/types/restEntryPoints.d.ts +5 -0
  44. package/dist/types/routes/entityStorageAuthenticationAuditRoutes.d.ts +54 -0
  45. package/dist/types/schema.d.ts +4 -0
  46. package/dist/types/services/entityStorageAuthenticationAuditService.d.ts +72 -0
  47. package/dist/types/services/entityStorageAuthenticationRateService.d.ts +60 -0
  48. package/docs/changelog.md +1633 -0
  49. package/docs/examples.md +137 -0
  50. package/docs/open-api/spec.json +911 -0
  51. package/docs/reference/classes/AuthenticationAuditEntry.md +101 -0
  52. package/docs/reference/classes/AuthenticationRateEntry.md +37 -0
  53. package/docs/reference/classes/EntityStorageAuthenticationAuditService.md +241 -0
  54. package/docs/reference/classes/EntityStorageAuthenticationRateService.md +227 -0
  55. package/docs/reference/classes/TenantOverrideProcessor.md +129 -0
  56. package/docs/reference/functions/authenticationAuditCreate.md +37 -0
  57. package/docs/reference/functions/authenticationAuditGet.md +31 -0
  58. package/docs/reference/functions/authenticationAuditQuery.md +31 -0
  59. package/docs/reference/functions/authenticationAuditRemove.md +31 -0
  60. package/docs/reference/functions/authenticationAuditUpdate.md +31 -0
  61. package/docs/reference/functions/generateRestRoutesAuthenticationAudit.md +25 -0
  62. package/docs/reference/functions/initSchema.md +9 -0
  63. package/docs/reference/index.md +33 -0
  64. package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConfig.md +11 -0
  65. package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConstructorOptions.md +25 -0
  66. package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConfig.md +17 -0
  67. package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConstructorOptions.md +53 -0
  68. package/docs/reference/interfaces/ITenantOverrideProcessorConfig.md +39 -0
  69. package/docs/reference/interfaces/ITenantOverrideProcessorConstructorOptions.md +39 -0
  70. package/docs/reference/variables/restEntryPoints.md +5 -0
  71. package/docs/reference/variables/tagsAuthenticationAudit.md +5 -0
  72. package/locales/en.json +22 -0
  73. package/package.json +63 -6
@@ -0,0 +1,911 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "3Sixty - Test Endpoints",
5
+ "description": "REST API for 3Sixty - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "Authentication Audit",
20
+ "description": "Authentication audit endpoints for the REST server."
21
+ }
22
+ ],
23
+ "paths": {
24
+ "/authentication/audit": {
25
+ "post": {
26
+ "operationId": "authenticationAuditCreate",
27
+ "summary": "Create an authentication audit entry",
28
+ "tags": [
29
+ "Authentication Audit"
30
+ ],
31
+ "security": [
32
+ {
33
+ "jwtBearerAuthScheme": []
34
+ }
35
+ ],
36
+ "requestBody": {
37
+ "description": "Create an authentication audit entry.",
38
+ "required": true,
39
+ "content": {
40
+ "application/json": {
41
+ "schema": {
42
+ "$ref": "#/components/schemas/AuditCreateRequest"
43
+ },
44
+ "examples": {
45
+ "authenticationAuditCreateRequestExample": {
46
+ "summary": "The request to create an authentication audit entry.",
47
+ "value": {
48
+ "actorId": "user@example.com",
49
+ "event": "login-success",
50
+ "data": {
51
+ "organizationIdentity": "did:example:org1"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ },
59
+ "responses": {
60
+ "201": {
61
+ "description": "The rest request ended in created response.",
62
+ "headers": {
63
+ "location": {
64
+ "schema": {
65
+ "type": "string"
66
+ },
67
+ "description": "e.g. 018f0b53d5d5704fa3a06d6ed2478575"
68
+ }
69
+ }
70
+ },
71
+ "400": {
72
+ "description": "The server cannot process the request, see the content for more details.",
73
+ "content": {
74
+ "application/json": {
75
+ "schema": {
76
+ "$ref": "#/components/schemas/Error"
77
+ },
78
+ "examples": {
79
+ "exampleResponse": {
80
+ "value": {
81
+ "name": "GeneralError",
82
+ "message": "errorMessage",
83
+ "properties": {
84
+ "foo": "bar"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ },
92
+ "401": {
93
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
94
+ "content": {
95
+ "application/json": {
96
+ "schema": {
97
+ "$ref": "#/components/schemas/Error"
98
+ },
99
+ "examples": {
100
+ "exampleResponse": {
101
+ "value": {
102
+ "name": "UnauthorizedError",
103
+ "message": "errorMessage"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "500": {
111
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
112
+ "content": {
113
+ "application/json": {
114
+ "schema": {
115
+ "$ref": "#/components/schemas/Error"
116
+ },
117
+ "examples": {
118
+ "exampleResponse": {
119
+ "value": {
120
+ "name": "InternalServerError",
121
+ "message": "errorMessage"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "get": {
131
+ "operationId": "authenticationAuditQuery",
132
+ "summary": "Query authentication audit entries",
133
+ "tags": [
134
+ "Authentication Audit"
135
+ ],
136
+ "parameters": [
137
+ {
138
+ "name": "actorId",
139
+ "description": "The actor identifier to filter by.",
140
+ "in": "query",
141
+ "required": false,
142
+ "schema": {
143
+ "type": "string"
144
+ },
145
+ "example": "user@example.com"
146
+ },
147
+ {
148
+ "name": "organizationId",
149
+ "description": "The organisation identifier to filter by.",
150
+ "in": "query",
151
+ "required": false,
152
+ "schema": {
153
+ "type": "string"
154
+ }
155
+ },
156
+ {
157
+ "name": "tenantId",
158
+ "description": "The tenant identifier to filter by.",
159
+ "in": "query",
160
+ "required": false,
161
+ "schema": {
162
+ "type": "string"
163
+ }
164
+ },
165
+ {
166
+ "name": "nodeId",
167
+ "description": "The node identifier to filter by.",
168
+ "in": "query",
169
+ "required": false,
170
+ "schema": {
171
+ "type": "string"
172
+ }
173
+ },
174
+ {
175
+ "name": "event",
176
+ "description": "The event to filter by.",
177
+ "in": "query",
178
+ "required": false,
179
+ "schema": {
180
+ "anyOf": [
181
+ {
182
+ "$ref": "#/components/schemas/AuthAuditEvent"
183
+ },
184
+ {
185
+ "type": "string"
186
+ }
187
+ ]
188
+ },
189
+ "example": "login-success"
190
+ },
191
+ {
192
+ "name": "startDate",
193
+ "description": "The inclusive start date for filtering, in ISO 8601 format.",
194
+ "in": "query",
195
+ "required": false,
196
+ "schema": {
197
+ "type": "string"
198
+ },
199
+ "example": "2026-01-01T00:00:00.000Z"
200
+ },
201
+ {
202
+ "name": "endDate",
203
+ "description": "The inclusive end date for filtering, in ISO 8601 format.",
204
+ "in": "query",
205
+ "required": false,
206
+ "schema": {
207
+ "type": "string"
208
+ },
209
+ "example": "2026-01-31T23:59:59.999Z"
210
+ },
211
+ {
212
+ "name": "cursor",
213
+ "description": "The pagination cursor.",
214
+ "in": "query",
215
+ "required": false,
216
+ "schema": {
217
+ "type": "string"
218
+ }
219
+ },
220
+ {
221
+ "name": "limit",
222
+ "description": "The maximum number of results to return.",
223
+ "in": "query",
224
+ "required": false,
225
+ "schema": {
226
+ "type": "string"
227
+ },
228
+ "example": "50"
229
+ }
230
+ ],
231
+ "security": [
232
+ {
233
+ "jwtBearerAuthScheme": []
234
+ }
235
+ ],
236
+ "responses": {
237
+ "200": {
238
+ "description": "Response from querying authentication audit entries.",
239
+ "content": {
240
+ "application/json": {
241
+ "schema": {
242
+ "$ref": "#/components/schemas/AuditQueryResponse"
243
+ },
244
+ "examples": {
245
+ "authenticationAuditQueryResponseExample": {
246
+ "summary": "The response for querying authentication audit entries.",
247
+ "value": {
248
+ "entries": [
249
+ {
250
+ "id": "018f0b53d5d5704fa3a06d6ed2478575",
251
+ "actorId": "user@example.com",
252
+ "dateCreated": "2026-01-12T09:05:23.123Z",
253
+ "event": "login-success",
254
+ "data": {
255
+ "organizationIdentity": "did:example:org1"
256
+ }
257
+ }
258
+ ],
259
+ "cursor": "next-cursor"
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ },
266
+ "400": {
267
+ "description": "The server cannot process the request, see the content for more details.",
268
+ "content": {
269
+ "application/json": {
270
+ "schema": {
271
+ "$ref": "#/components/schemas/Error"
272
+ },
273
+ "examples": {
274
+ "exampleResponse": {
275
+ "value": {
276
+ "name": "GeneralError",
277
+ "message": "errorMessage",
278
+ "properties": {
279
+ "foo": "bar"
280
+ }
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+ },
287
+ "401": {
288
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
289
+ "content": {
290
+ "application/json": {
291
+ "schema": {
292
+ "$ref": "#/components/schemas/Error"
293
+ },
294
+ "examples": {
295
+ "exampleResponse": {
296
+ "value": {
297
+ "name": "UnauthorizedError",
298
+ "message": "errorMessage"
299
+ }
300
+ }
301
+ }
302
+ }
303
+ }
304
+ },
305
+ "500": {
306
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
307
+ "content": {
308
+ "application/json": {
309
+ "schema": {
310
+ "$ref": "#/components/schemas/Error"
311
+ },
312
+ "examples": {
313
+ "exampleResponse": {
314
+ "value": {
315
+ "name": "InternalServerError",
316
+ "message": "errorMessage"
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ },
326
+ "/authentication/audit/{id}": {
327
+ "get": {
328
+ "operationId": "authenticationAuditGet",
329
+ "summary": "Get an authentication audit entry",
330
+ "tags": [
331
+ "Authentication Audit"
332
+ ],
333
+ "parameters": [
334
+ {
335
+ "name": "id",
336
+ "description": "The audit entry id.",
337
+ "in": "path",
338
+ "required": true,
339
+ "schema": {
340
+ "type": "string"
341
+ },
342
+ "style": "simple",
343
+ "example": "018f0b53d5d5704fa3a06d6ed2478575"
344
+ }
345
+ ],
346
+ "security": [
347
+ {
348
+ "jwtBearerAuthScheme": []
349
+ }
350
+ ],
351
+ "responses": {
352
+ "200": {
353
+ "description": "Response from getting an authentication audit entry.",
354
+ "content": {
355
+ "application/json": {
356
+ "schema": {
357
+ "$ref": "#/components/schemas/AuthenticationAuditEntry"
358
+ },
359
+ "examples": {
360
+ "authenticationAuditGetResponseExample": {
361
+ "summary": "The response for getting an authentication audit entry.",
362
+ "value": {
363
+ "id": "018f0b53d5d5704fa3a06d6ed2478575",
364
+ "actorId": "user@example.com",
365
+ "dateCreated": "2026-01-12T09:05:23.123Z",
366
+ "event": "login-success",
367
+ "data": {
368
+ "organizationIdentity": "did:example:org1"
369
+ }
370
+ }
371
+ }
372
+ }
373
+ }
374
+ }
375
+ },
376
+ "400": {
377
+ "description": "The server cannot process the request, see the content for more details.",
378
+ "content": {
379
+ "application/json": {
380
+ "schema": {
381
+ "$ref": "#/components/schemas/Error"
382
+ },
383
+ "examples": {
384
+ "exampleResponse": {
385
+ "value": {
386
+ "name": "GeneralError",
387
+ "message": "errorMessage",
388
+ "properties": {
389
+ "foo": "bar"
390
+ }
391
+ }
392
+ }
393
+ }
394
+ }
395
+ }
396
+ },
397
+ "401": {
398
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
399
+ "content": {
400
+ "application/json": {
401
+ "schema": {
402
+ "$ref": "#/components/schemas/Error"
403
+ },
404
+ "examples": {
405
+ "exampleResponse": {
406
+ "value": {
407
+ "name": "UnauthorizedError",
408
+ "message": "errorMessage"
409
+ }
410
+ }
411
+ }
412
+ }
413
+ }
414
+ },
415
+ "500": {
416
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
417
+ "content": {
418
+ "application/json": {
419
+ "schema": {
420
+ "$ref": "#/components/schemas/Error"
421
+ },
422
+ "examples": {
423
+ "exampleResponse": {
424
+ "value": {
425
+ "name": "InternalServerError",
426
+ "message": "errorMessage"
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
433
+ }
434
+ },
435
+ "put": {
436
+ "operationId": "authenticationAuditUpdate",
437
+ "summary": "Update an authentication audit entry",
438
+ "tags": [
439
+ "Authentication Audit"
440
+ ],
441
+ "parameters": [
442
+ {
443
+ "name": "id",
444
+ "description": "The audit entry id.",
445
+ "in": "path",
446
+ "required": true,
447
+ "schema": {
448
+ "type": "string"
449
+ },
450
+ "style": "simple",
451
+ "example": "018f0b53d5d5704fa3a06d6ed2478575"
452
+ }
453
+ ],
454
+ "security": [
455
+ {
456
+ "jwtBearerAuthScheme": []
457
+ }
458
+ ],
459
+ "requestBody": {
460
+ "description": "Update an authentication audit entry.",
461
+ "required": true,
462
+ "content": {
463
+ "application/json": {
464
+ "schema": {
465
+ "$ref": "#/components/schemas/AuditUpdateRequest"
466
+ },
467
+ "examples": {
468
+ "authenticationAuditUpdateRequestExample": {
469
+ "summary": "The request to update an authentication audit entry.",
470
+ "value": {
471
+ "data": {
472
+ "organizationIdentity": "did:example:org1"
473
+ }
474
+ }
475
+ }
476
+ }
477
+ }
478
+ }
479
+ },
480
+ "responses": {
481
+ "204": {
482
+ "description": "The rest request ended in success with no data."
483
+ },
484
+ "400": {
485
+ "description": "The server cannot process the request, see the content for more details.",
486
+ "content": {
487
+ "application/json": {
488
+ "schema": {
489
+ "$ref": "#/components/schemas/Error"
490
+ },
491
+ "examples": {
492
+ "exampleResponse": {
493
+ "value": {
494
+ "name": "GeneralError",
495
+ "message": "errorMessage",
496
+ "properties": {
497
+ "foo": "bar"
498
+ }
499
+ }
500
+ }
501
+ }
502
+ }
503
+ }
504
+ },
505
+ "401": {
506
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
507
+ "content": {
508
+ "application/json": {
509
+ "schema": {
510
+ "$ref": "#/components/schemas/Error"
511
+ },
512
+ "examples": {
513
+ "exampleResponse": {
514
+ "value": {
515
+ "name": "UnauthorizedError",
516
+ "message": "errorMessage"
517
+ }
518
+ }
519
+ }
520
+ }
521
+ }
522
+ },
523
+ "500": {
524
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
525
+ "content": {
526
+ "application/json": {
527
+ "schema": {
528
+ "$ref": "#/components/schemas/Error"
529
+ },
530
+ "examples": {
531
+ "exampleResponse": {
532
+ "value": {
533
+ "name": "InternalServerError",
534
+ "message": "errorMessage"
535
+ }
536
+ }
537
+ }
538
+ }
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "delete": {
544
+ "operationId": "authenticationAuditRemove",
545
+ "summary": "Remove an authentication audit entry",
546
+ "tags": [
547
+ "Authentication Audit"
548
+ ],
549
+ "parameters": [
550
+ {
551
+ "name": "id",
552
+ "description": "The audit entry id.",
553
+ "in": "path",
554
+ "required": true,
555
+ "schema": {
556
+ "type": "string"
557
+ },
558
+ "style": "simple",
559
+ "example": "018f0b53d5d5704fa3a06d6ed2478575"
560
+ }
561
+ ],
562
+ "security": [
563
+ {
564
+ "jwtBearerAuthScheme": []
565
+ }
566
+ ],
567
+ "responses": {
568
+ "204": {
569
+ "description": "The rest request ended in success with no data."
570
+ },
571
+ "400": {
572
+ "description": "The server cannot process the request, see the content for more details.",
573
+ "content": {
574
+ "application/json": {
575
+ "schema": {
576
+ "$ref": "#/components/schemas/Error"
577
+ },
578
+ "examples": {
579
+ "exampleResponse": {
580
+ "value": {
581
+ "name": "GeneralError",
582
+ "message": "errorMessage",
583
+ "properties": {
584
+ "foo": "bar"
585
+ }
586
+ }
587
+ }
588
+ }
589
+ }
590
+ }
591
+ },
592
+ "401": {
593
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
594
+ "content": {
595
+ "application/json": {
596
+ "schema": {
597
+ "$ref": "#/components/schemas/Error"
598
+ },
599
+ "examples": {
600
+ "exampleResponse": {
601
+ "value": {
602
+ "name": "UnauthorizedError",
603
+ "message": "errorMessage"
604
+ }
605
+ }
606
+ }
607
+ }
608
+ }
609
+ },
610
+ "500": {
611
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
612
+ "content": {
613
+ "application/json": {
614
+ "schema": {
615
+ "$ref": "#/components/schemas/Error"
616
+ },
617
+ "examples": {
618
+ "exampleResponse": {
619
+ "value": {
620
+ "name": "InternalServerError",
621
+ "message": "errorMessage"
622
+ }
623
+ }
624
+ }
625
+ }
626
+ }
627
+ }
628
+ }
629
+ }
630
+ }
631
+ },
632
+ "components": {
633
+ "schemas": {
634
+ "AuditCreateRequest": {
635
+ "description": "The body of the request.",
636
+ "type": "object",
637
+ "properties": {
638
+ "event": {
639
+ "anyOf": [
640
+ {
641
+ "$ref": "#/components/schemas/AuthAuditEvent"
642
+ },
643
+ {
644
+ "type": "string"
645
+ }
646
+ ],
647
+ "description": "The audit event that occurred."
648
+ },
649
+ "actorId": {
650
+ "type": "string",
651
+ "description": "The actor identifier, could be e-mail, username, or other unique identifier."
652
+ },
653
+ "nodeId": {
654
+ "type": "string",
655
+ "description": "The node identifier associated with the audit entry, if applicable."
656
+ },
657
+ "organizationId": {
658
+ "type": "string",
659
+ "description": "The organization identifier associated with the audit entry, if applicable."
660
+ },
661
+ "tenantId": {
662
+ "type": "string",
663
+ "description": "The tenant identifier associated with the audit entry, if applicable."
664
+ },
665
+ "ipAddressHashes": {
666
+ "type": "array",
667
+ "items": {
668
+ "type": "string"
669
+ },
670
+ "description": "The hashed IP addresses of the client."
671
+ },
672
+ "userAgent": {
673
+ "type": "string",
674
+ "description": "The user agent string of the client."
675
+ },
676
+ "correlationId": {
677
+ "type": "string",
678
+ "description": "The correlation ID for request tracing."
679
+ },
680
+ "data": {
681
+ "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
682
+ }
683
+ },
684
+ "required": [
685
+ "event"
686
+ ]
687
+ },
688
+ "AuditQueryResponse": {
689
+ "type": "object",
690
+ "properties": {
691
+ "entries": {
692
+ "type": "array",
693
+ "items": {
694
+ "$ref": "#/components/schemas/AuthenticationAuditEntry"
695
+ },
696
+ "description": "The returned audit entries."
697
+ },
698
+ "cursor": {
699
+ "type": "string",
700
+ "description": "The cursor to retrieve the next page, if any."
701
+ }
702
+ },
703
+ "required": [
704
+ "entries"
705
+ ],
706
+ "description": "The response body."
707
+ },
708
+ "AuditUpdateRequest": {
709
+ "description": "The body of the request.",
710
+ "type": "object",
711
+ "properties": {
712
+ "event": {
713
+ "anyOf": [
714
+ {
715
+ "$ref": "#/components/schemas/AuthAuditEvent"
716
+ },
717
+ {
718
+ "type": "string"
719
+ }
720
+ ],
721
+ "description": "The audit event that occurred."
722
+ },
723
+ "actorId": {
724
+ "type": "string",
725
+ "description": "The actor identifier, could be e-mail, username, or other unique identifier."
726
+ },
727
+ "nodeId": {
728
+ "type": "string",
729
+ "description": "The node identifier associated with the audit entry, if applicable."
730
+ },
731
+ "organizationId": {
732
+ "type": "string",
733
+ "description": "The organization identifier associated with the audit entry, if applicable."
734
+ },
735
+ "tenantId": {
736
+ "type": "string",
737
+ "description": "The tenant identifier associated with the audit entry, if applicable."
738
+ },
739
+ "ipAddressHashes": {
740
+ "type": "array",
741
+ "items": {
742
+ "type": "string"
743
+ },
744
+ "description": "The hashed IP addresses of the client."
745
+ },
746
+ "userAgent": {
747
+ "type": "string",
748
+ "description": "The user agent string of the client."
749
+ },
750
+ "correlationId": {
751
+ "type": "string",
752
+ "description": "The correlation ID for request tracing."
753
+ },
754
+ "data": {
755
+ "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
756
+ }
757
+ }
758
+ },
759
+ "AuthAuditEvent": {
760
+ "description": "Supported authentication audit event values.",
761
+ "anyOf": [
762
+ {
763
+ "const": "login-success",
764
+ "description": "Login success."
765
+ },
766
+ {
767
+ "const": "login-failure",
768
+ "description": "Login failure."
769
+ },
770
+ {
771
+ "const": "logout",
772
+ "description": "Logout."
773
+ },
774
+ {
775
+ "const": "token-refreshed",
776
+ "description": "Token refreshed."
777
+ },
778
+ {
779
+ "const": "account-created",
780
+ "description": "Account created."
781
+ },
782
+ {
783
+ "const": "account-deleted",
784
+ "description": "Account deleted."
785
+ },
786
+ {
787
+ "const": "account-updated",
788
+ "description": "Account updated."
789
+ },
790
+ {
791
+ "const": "account-locked",
792
+ "description": "Account locked."
793
+ },
794
+ {
795
+ "const": "account-unlocked",
796
+ "description": "Account unlocked."
797
+ },
798
+ {
799
+ "const": "password-changed",
800
+ "description": "Password changed."
801
+ }
802
+ ]
803
+ },
804
+ "AuthenticationAuditEntry": {
805
+ "description": "Contract definition for authentication audit entry.",
806
+ "type": "object",
807
+ "properties": {
808
+ "id": {
809
+ "type": "string",
810
+ "description": "The unique identifier for the audit entry."
811
+ },
812
+ "event": {
813
+ "anyOf": [
814
+ {
815
+ "$ref": "#/components/schemas/AuthAuditEvent"
816
+ },
817
+ {
818
+ "type": "string"
819
+ }
820
+ ],
821
+ "description": "The audit event that occurred."
822
+ },
823
+ "dateCreated": {
824
+ "type": "string",
825
+ "description": "The timestamp of the audit entry in ISO 8601 format."
826
+ },
827
+ "actorId": {
828
+ "type": "string",
829
+ "description": "The actor identifier, could be e-mail, username, or other unique identifier."
830
+ },
831
+ "nodeId": {
832
+ "type": "string",
833
+ "description": "The node identifier associated with the audit entry, if applicable."
834
+ },
835
+ "organizationId": {
836
+ "type": "string",
837
+ "description": "The organization identifier associated with the audit entry, if applicable."
838
+ },
839
+ "tenantId": {
840
+ "type": "string",
841
+ "description": "The tenant identifier associated with the audit entry, if applicable."
842
+ },
843
+ "ipAddressHashes": {
844
+ "type": "array",
845
+ "items": {
846
+ "type": "string"
847
+ },
848
+ "description": "The hashed IP addresses of the client."
849
+ },
850
+ "userAgent": {
851
+ "type": "string",
852
+ "description": "The user agent string of the client."
853
+ },
854
+ "correlationId": {
855
+ "type": "string",
856
+ "description": "The correlation ID for request tracing."
857
+ },
858
+ "data": {
859
+ "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
860
+ }
861
+ },
862
+ "required": [
863
+ "id",
864
+ "event",
865
+ "dateCreated"
866
+ ]
867
+ },
868
+ "Error": {
869
+ "description": "Model to describe serialized error.",
870
+ "type": "object",
871
+ "properties": {
872
+ "name": {
873
+ "type": "string",
874
+ "description": "The name for the error."
875
+ },
876
+ "message": {
877
+ "type": "string",
878
+ "description": "The message for the error as an i18n key."
879
+ },
880
+ "source": {
881
+ "type": "string",
882
+ "description": "The source of the error."
883
+ },
884
+ "properties": {
885
+ "type": "object",
886
+ "additionalProperties": {},
887
+ "description": "Any additional information for the error."
888
+ },
889
+ "stack": {
890
+ "type": "string",
891
+ "description": "The stack trace for the error."
892
+ },
893
+ "cause": {
894
+ "$ref": "#/components/schemas/Error"
895
+ }
896
+ },
897
+ "required": [
898
+ "name",
899
+ "message"
900
+ ]
901
+ }
902
+ },
903
+ "securitySchemes": {
904
+ "jwtBearerAuthScheme": {
905
+ "type": "http",
906
+ "scheme": "bearer",
907
+ "bearerFormat": "JWT"
908
+ }
909
+ }
910
+ }
911
+ }