@open-mercato/enterprise 0.6.8-develop.7031.1.005201cd70 → 0.6.8-develop.7037.1.ea0277b01e
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/.turbo/turbo-build.log +1 -1
- package/dist/modules/security/data/entities.js +18 -0
- package/dist/modules/security/data/entities.js.map +2 -2
- package/dist/modules/security/migrations/Migration20260811143757_security.js +13 -0
- package/dist/modules/security/migrations/Migration20260811143757_security.js.map +7 -0
- package/dist/modules/security/services/SudoChallengeService.js +110 -38
- package/dist/modules/security/services/SudoChallengeService.js.map +2 -2
- package/package.json +5 -5
- package/src/modules/security/data/entities.ts +18 -0
- package/src/modules/security/migrations/.snapshot-open-mercato.json +848 -275
- package/src/modules/security/migrations/Migration20260811143757_security.ts +13 -0
- package/src/modules/security/services/SudoChallengeService.ts +145 -47
|
@@ -1,47 +1,97 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "public",
|
|
2
3
|
"namespaces": [
|
|
3
4
|
"public"
|
|
4
5
|
],
|
|
5
|
-
"name": "public",
|
|
6
6
|
"tables": [
|
|
7
7
|
{
|
|
8
|
+
"name": "mfa_challenges",
|
|
9
|
+
"schema": "public",
|
|
8
10
|
"columns": {
|
|
9
|
-
"
|
|
10
|
-
"name": "
|
|
11
|
-
"type": "
|
|
11
|
+
"attempts": {
|
|
12
|
+
"name": "attempts",
|
|
13
|
+
"type": "int",
|
|
12
14
|
"unsigned": false,
|
|
13
15
|
"autoincrement": false,
|
|
14
16
|
"primary": false,
|
|
15
17
|
"nullable": false,
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
+
"unique": false,
|
|
19
|
+
"length": null,
|
|
20
|
+
"precision": null,
|
|
21
|
+
"scale": null,
|
|
22
|
+
"default": "0",
|
|
23
|
+
"comment": null,
|
|
24
|
+
"collation": null,
|
|
25
|
+
"enumItems": [],
|
|
26
|
+
"mappedType": "integer"
|
|
18
27
|
},
|
|
19
|
-
"
|
|
20
|
-
"name": "
|
|
21
|
-
"type": "
|
|
28
|
+
"created_at": {
|
|
29
|
+
"name": "created_at",
|
|
30
|
+
"type": "timestamptz(6)",
|
|
22
31
|
"unsigned": false,
|
|
23
32
|
"autoincrement": false,
|
|
24
33
|
"primary": false,
|
|
25
34
|
"nullable": false,
|
|
26
|
-
"
|
|
35
|
+
"unique": false,
|
|
36
|
+
"length": 6,
|
|
37
|
+
"precision": null,
|
|
38
|
+
"scale": null,
|
|
39
|
+
"default": null,
|
|
40
|
+
"comment": null,
|
|
41
|
+
"collation": null,
|
|
42
|
+
"enumItems": [],
|
|
43
|
+
"mappedType": "datetime"
|
|
27
44
|
},
|
|
28
|
-
"
|
|
29
|
-
"name": "
|
|
30
|
-
"type": "
|
|
45
|
+
"expires_at": {
|
|
46
|
+
"name": "expires_at",
|
|
47
|
+
"type": "timestamptz(6)",
|
|
31
48
|
"unsigned": false,
|
|
32
49
|
"autoincrement": false,
|
|
33
50
|
"primary": false,
|
|
34
51
|
"nullable": false,
|
|
52
|
+
"unique": false,
|
|
53
|
+
"length": 6,
|
|
54
|
+
"precision": null,
|
|
55
|
+
"scale": null,
|
|
56
|
+
"default": null,
|
|
57
|
+
"comment": null,
|
|
58
|
+
"collation": null,
|
|
59
|
+
"enumItems": [],
|
|
60
|
+
"mappedType": "datetime"
|
|
61
|
+
},
|
|
62
|
+
"id": {
|
|
63
|
+
"name": "id",
|
|
64
|
+
"type": "uuid",
|
|
65
|
+
"unsigned": false,
|
|
66
|
+
"autoincrement": false,
|
|
67
|
+
"primary": true,
|
|
68
|
+
"nullable": false,
|
|
69
|
+
"unique": false,
|
|
70
|
+
"length": null,
|
|
71
|
+
"precision": null,
|
|
72
|
+
"scale": null,
|
|
73
|
+
"default": "gen_random_uuid()",
|
|
74
|
+
"comment": null,
|
|
75
|
+
"collation": null,
|
|
76
|
+
"enumItems": [],
|
|
35
77
|
"mappedType": "uuid"
|
|
36
78
|
},
|
|
37
|
-
"
|
|
38
|
-
"name": "
|
|
39
|
-
"type": "
|
|
79
|
+
"method_id": {
|
|
80
|
+
"name": "method_id",
|
|
81
|
+
"type": "uuid",
|
|
40
82
|
"unsigned": false,
|
|
41
83
|
"autoincrement": false,
|
|
42
84
|
"primary": false,
|
|
43
85
|
"nullable": true,
|
|
44
|
-
"
|
|
86
|
+
"unique": false,
|
|
87
|
+
"length": null,
|
|
88
|
+
"precision": null,
|
|
89
|
+
"scale": null,
|
|
90
|
+
"default": null,
|
|
91
|
+
"comment": null,
|
|
92
|
+
"collation": null,
|
|
93
|
+
"enumItems": [],
|
|
94
|
+
"mappedType": "uuid"
|
|
45
95
|
},
|
|
46
96
|
"method_type": {
|
|
47
97
|
"name": "method_type",
|
|
@@ -50,16 +100,32 @@
|
|
|
50
100
|
"autoincrement": false,
|
|
51
101
|
"primary": false,
|
|
52
102
|
"nullable": true,
|
|
103
|
+
"unique": false,
|
|
104
|
+
"length": null,
|
|
105
|
+
"precision": null,
|
|
106
|
+
"scale": null,
|
|
107
|
+
"default": null,
|
|
108
|
+
"comment": null,
|
|
109
|
+
"collation": null,
|
|
110
|
+
"enumItems": [],
|
|
53
111
|
"mappedType": "text"
|
|
54
112
|
},
|
|
55
|
-
"
|
|
56
|
-
"name": "
|
|
57
|
-
"type": "
|
|
113
|
+
"otp_code_hash": {
|
|
114
|
+
"name": "otp_code_hash",
|
|
115
|
+
"type": "text",
|
|
58
116
|
"unsigned": false,
|
|
59
117
|
"autoincrement": false,
|
|
60
118
|
"primary": false,
|
|
61
119
|
"nullable": true,
|
|
62
|
-
"
|
|
120
|
+
"unique": false,
|
|
121
|
+
"length": null,
|
|
122
|
+
"precision": null,
|
|
123
|
+
"scale": null,
|
|
124
|
+
"default": null,
|
|
125
|
+
"comment": null,
|
|
126
|
+
"collation": null,
|
|
127
|
+
"enumItems": [],
|
|
128
|
+
"mappedType": "text"
|
|
63
129
|
},
|
|
64
130
|
"provider_challenge": {
|
|
65
131
|
"name": "provider_challenge",
|
|
@@ -68,115 +134,200 @@
|
|
|
68
134
|
"autoincrement": false,
|
|
69
135
|
"primary": false,
|
|
70
136
|
"nullable": true,
|
|
137
|
+
"unique": false,
|
|
138
|
+
"length": null,
|
|
139
|
+
"precision": null,
|
|
140
|
+
"scale": null,
|
|
141
|
+
"default": null,
|
|
142
|
+
"comment": null,
|
|
143
|
+
"collation": null,
|
|
144
|
+
"enumItems": [],
|
|
71
145
|
"mappedType": "json"
|
|
72
146
|
},
|
|
73
|
-
"
|
|
74
|
-
"name": "
|
|
75
|
-
"type": "
|
|
147
|
+
"tenant_id": {
|
|
148
|
+
"name": "tenant_id",
|
|
149
|
+
"type": "uuid",
|
|
76
150
|
"unsigned": false,
|
|
77
151
|
"autoincrement": false,
|
|
78
152
|
"primary": false,
|
|
79
153
|
"nullable": false,
|
|
80
|
-
"
|
|
81
|
-
"
|
|
154
|
+
"unique": false,
|
|
155
|
+
"length": null,
|
|
156
|
+
"precision": null,
|
|
157
|
+
"scale": null,
|
|
158
|
+
"default": null,
|
|
159
|
+
"comment": null,
|
|
160
|
+
"collation": null,
|
|
161
|
+
"enumItems": [],
|
|
162
|
+
"mappedType": "uuid"
|
|
82
163
|
},
|
|
83
|
-
"
|
|
84
|
-
"name": "
|
|
85
|
-
"type": "
|
|
164
|
+
"user_id": {
|
|
165
|
+
"name": "user_id",
|
|
166
|
+
"type": "uuid",
|
|
86
167
|
"unsigned": false,
|
|
87
168
|
"autoincrement": false,
|
|
88
169
|
"primary": false,
|
|
89
170
|
"nullable": false,
|
|
90
|
-
"
|
|
91
|
-
"
|
|
171
|
+
"unique": false,
|
|
172
|
+
"length": null,
|
|
173
|
+
"precision": null,
|
|
174
|
+
"scale": null,
|
|
175
|
+
"default": null,
|
|
176
|
+
"comment": null,
|
|
177
|
+
"collation": null,
|
|
178
|
+
"enumItems": [],
|
|
179
|
+
"mappedType": "uuid"
|
|
92
180
|
},
|
|
93
181
|
"verified_at": {
|
|
94
182
|
"name": "verified_at",
|
|
95
|
-
"type": "timestamptz",
|
|
183
|
+
"type": "timestamptz(6)",
|
|
96
184
|
"unsigned": false,
|
|
97
185
|
"autoincrement": false,
|
|
98
186
|
"primary": false,
|
|
99
187
|
"nullable": true,
|
|
188
|
+
"unique": false,
|
|
100
189
|
"length": 6,
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"autoincrement": false,
|
|
108
|
-
"primary": false,
|
|
109
|
-
"nullable": false,
|
|
110
|
-
"length": 6,
|
|
190
|
+
"precision": null,
|
|
191
|
+
"scale": null,
|
|
192
|
+
"default": null,
|
|
193
|
+
"comment": null,
|
|
194
|
+
"collation": null,
|
|
195
|
+
"enumItems": [],
|
|
111
196
|
"mappedType": "datetime"
|
|
112
197
|
}
|
|
113
198
|
},
|
|
114
|
-
"name": "mfa_challenges",
|
|
115
|
-
"schema": "public",
|
|
116
199
|
"indexes": [
|
|
117
200
|
{
|
|
118
|
-
"keyName": "idx_mfa_challenges_lookup",
|
|
119
201
|
"columnNames": [
|
|
120
202
|
"id",
|
|
121
203
|
"expires_at"
|
|
122
204
|
],
|
|
123
205
|
"composite": true,
|
|
124
206
|
"constraint": false,
|
|
207
|
+
"keyName": "idx_mfa_challenges_lookup",
|
|
125
208
|
"primary": false,
|
|
126
209
|
"unique": false
|
|
127
210
|
},
|
|
128
211
|
{
|
|
129
|
-
"keyName": "mfa_challenges_pkey",
|
|
130
212
|
"columnNames": [
|
|
131
213
|
"id"
|
|
132
214
|
],
|
|
133
215
|
"composite": false,
|
|
134
216
|
"constraint": true,
|
|
217
|
+
"keyName": "mfa_challenges_pkey",
|
|
135
218
|
"primary": true,
|
|
136
219
|
"unique": true
|
|
137
220
|
}
|
|
138
221
|
],
|
|
139
222
|
"checks": [],
|
|
223
|
+
"triggers": [],
|
|
140
224
|
"foreignKeys": {},
|
|
141
|
-
"
|
|
225
|
+
"comment": null
|
|
142
226
|
},
|
|
143
227
|
{
|
|
228
|
+
"name": "mfa_enforcement_policies",
|
|
229
|
+
"schema": "public",
|
|
144
230
|
"columns": {
|
|
145
|
-
"
|
|
146
|
-
"name": "
|
|
147
|
-
"type": "
|
|
231
|
+
"allowed_methods": {
|
|
232
|
+
"name": "allowed_methods",
|
|
233
|
+
"type": "jsonb",
|
|
148
234
|
"unsigned": false,
|
|
149
235
|
"autoincrement": false,
|
|
150
236
|
"primary": false,
|
|
151
|
-
"nullable":
|
|
152
|
-
"
|
|
153
|
-
"
|
|
237
|
+
"nullable": true,
|
|
238
|
+
"unique": false,
|
|
239
|
+
"length": null,
|
|
240
|
+
"precision": null,
|
|
241
|
+
"scale": null,
|
|
242
|
+
"default": null,
|
|
243
|
+
"comment": null,
|
|
244
|
+
"collation": null,
|
|
245
|
+
"enumItems": [],
|
|
246
|
+
"mappedType": "json"
|
|
154
247
|
},
|
|
155
|
-
"
|
|
156
|
-
"name": "
|
|
157
|
-
"type": "
|
|
248
|
+
"created_at": {
|
|
249
|
+
"name": "created_at",
|
|
250
|
+
"type": "timestamptz(6)",
|
|
158
251
|
"unsigned": false,
|
|
159
252
|
"autoincrement": false,
|
|
160
253
|
"primary": false,
|
|
161
254
|
"nullable": false,
|
|
162
|
-
"
|
|
255
|
+
"unique": false,
|
|
256
|
+
"length": 6,
|
|
257
|
+
"precision": null,
|
|
258
|
+
"scale": null,
|
|
259
|
+
"default": null,
|
|
260
|
+
"comment": null,
|
|
261
|
+
"collation": null,
|
|
262
|
+
"enumItems": [],
|
|
263
|
+
"mappedType": "datetime"
|
|
163
264
|
},
|
|
164
|
-
"
|
|
165
|
-
"name": "
|
|
166
|
-
"type": "
|
|
265
|
+
"deleted_at": {
|
|
266
|
+
"name": "deleted_at",
|
|
267
|
+
"type": "timestamptz(6)",
|
|
167
268
|
"unsigned": false,
|
|
168
269
|
"autoincrement": false,
|
|
169
270
|
"primary": false,
|
|
170
271
|
"nullable": true,
|
|
171
|
-
"
|
|
272
|
+
"unique": false,
|
|
273
|
+
"length": 6,
|
|
274
|
+
"precision": null,
|
|
275
|
+
"scale": null,
|
|
276
|
+
"default": null,
|
|
277
|
+
"comment": null,
|
|
278
|
+
"collation": null,
|
|
279
|
+
"enumItems": [],
|
|
280
|
+
"mappedType": "datetime"
|
|
172
281
|
},
|
|
173
|
-
"
|
|
174
|
-
"name": "
|
|
282
|
+
"enforced_by": {
|
|
283
|
+
"name": "enforced_by",
|
|
175
284
|
"type": "uuid",
|
|
176
285
|
"unsigned": false,
|
|
177
286
|
"autoincrement": false,
|
|
178
287
|
"primary": false,
|
|
288
|
+
"nullable": false,
|
|
289
|
+
"unique": false,
|
|
290
|
+
"length": null,
|
|
291
|
+
"precision": null,
|
|
292
|
+
"scale": null,
|
|
293
|
+
"default": null,
|
|
294
|
+
"comment": null,
|
|
295
|
+
"collation": null,
|
|
296
|
+
"enumItems": [],
|
|
297
|
+
"mappedType": "uuid"
|
|
298
|
+
},
|
|
299
|
+
"enforcement_deadline": {
|
|
300
|
+
"name": "enforcement_deadline",
|
|
301
|
+
"type": "timestamptz(6)",
|
|
302
|
+
"unsigned": false,
|
|
303
|
+
"autoincrement": false,
|
|
304
|
+
"primary": false,
|
|
179
305
|
"nullable": true,
|
|
306
|
+
"unique": false,
|
|
307
|
+
"length": 6,
|
|
308
|
+
"precision": null,
|
|
309
|
+
"scale": null,
|
|
310
|
+
"default": null,
|
|
311
|
+
"comment": null,
|
|
312
|
+
"collation": null,
|
|
313
|
+
"enumItems": [],
|
|
314
|
+
"mappedType": "datetime"
|
|
315
|
+
},
|
|
316
|
+
"id": {
|
|
317
|
+
"name": "id",
|
|
318
|
+
"type": "uuid",
|
|
319
|
+
"unsigned": false,
|
|
320
|
+
"autoincrement": false,
|
|
321
|
+
"primary": true,
|
|
322
|
+
"nullable": false,
|
|
323
|
+
"unique": false,
|
|
324
|
+
"length": null,
|
|
325
|
+
"precision": null,
|
|
326
|
+
"scale": null,
|
|
327
|
+
"default": "gen_random_uuid()",
|
|
328
|
+
"comment": null,
|
|
329
|
+
"collation": null,
|
|
330
|
+
"enumItems": [],
|
|
180
331
|
"mappedType": "uuid"
|
|
181
332
|
},
|
|
182
333
|
"is_enforced": {
|
|
@@ -186,136 +337,168 @@
|
|
|
186
337
|
"autoincrement": false,
|
|
187
338
|
"primary": false,
|
|
188
339
|
"nullable": false,
|
|
340
|
+
"unique": false,
|
|
341
|
+
"length": null,
|
|
342
|
+
"precision": null,
|
|
343
|
+
"scale": null,
|
|
189
344
|
"default": "true",
|
|
345
|
+
"comment": null,
|
|
346
|
+
"collation": null,
|
|
347
|
+
"enumItems": [],
|
|
190
348
|
"mappedType": "boolean"
|
|
191
349
|
},
|
|
192
|
-
"
|
|
193
|
-
"name": "
|
|
194
|
-
"type": "
|
|
350
|
+
"organization_id": {
|
|
351
|
+
"name": "organization_id",
|
|
352
|
+
"type": "uuid",
|
|
195
353
|
"unsigned": false,
|
|
196
354
|
"autoincrement": false,
|
|
197
355
|
"primary": false,
|
|
198
356
|
"nullable": true,
|
|
199
|
-
"
|
|
357
|
+
"unique": false,
|
|
358
|
+
"length": null,
|
|
359
|
+
"precision": null,
|
|
360
|
+
"scale": null,
|
|
361
|
+
"default": null,
|
|
362
|
+
"comment": null,
|
|
363
|
+
"collation": null,
|
|
364
|
+
"enumItems": [],
|
|
365
|
+
"mappedType": "uuid"
|
|
200
366
|
},
|
|
201
|
-
"
|
|
202
|
-
"name": "
|
|
203
|
-
"type": "
|
|
367
|
+
"scope": {
|
|
368
|
+
"name": "scope",
|
|
369
|
+
"type": "text",
|
|
204
370
|
"unsigned": false,
|
|
205
371
|
"autoincrement": false,
|
|
206
372
|
"primary": false,
|
|
207
|
-
"nullable":
|
|
208
|
-
"
|
|
209
|
-
"
|
|
373
|
+
"nullable": false,
|
|
374
|
+
"unique": false,
|
|
375
|
+
"length": null,
|
|
376
|
+
"precision": null,
|
|
377
|
+
"scale": null,
|
|
378
|
+
"default": null,
|
|
379
|
+
"comment": null,
|
|
380
|
+
"collation": null,
|
|
381
|
+
"enumItems": [],
|
|
382
|
+
"mappedType": "text"
|
|
210
383
|
},
|
|
211
|
-
"
|
|
212
|
-
"name": "
|
|
384
|
+
"tenant_id": {
|
|
385
|
+
"name": "tenant_id",
|
|
213
386
|
"type": "uuid",
|
|
214
387
|
"unsigned": false,
|
|
215
388
|
"autoincrement": false,
|
|
216
389
|
"primary": false,
|
|
217
|
-
"nullable":
|
|
390
|
+
"nullable": true,
|
|
391
|
+
"unique": false,
|
|
392
|
+
"length": null,
|
|
393
|
+
"precision": null,
|
|
394
|
+
"scale": null,
|
|
395
|
+
"default": null,
|
|
396
|
+
"comment": null,
|
|
397
|
+
"collation": null,
|
|
398
|
+
"enumItems": [],
|
|
218
399
|
"mappedType": "uuid"
|
|
219
400
|
},
|
|
220
|
-
"created_at": {
|
|
221
|
-
"name": "created_at",
|
|
222
|
-
"type": "timestamptz",
|
|
223
|
-
"unsigned": false,
|
|
224
|
-
"autoincrement": false,
|
|
225
|
-
"primary": false,
|
|
226
|
-
"nullable": false,
|
|
227
|
-
"length": 6,
|
|
228
|
-
"mappedType": "datetime"
|
|
229
|
-
},
|
|
230
401
|
"updated_at": {
|
|
231
402
|
"name": "updated_at",
|
|
232
|
-
"type": "timestamptz",
|
|
403
|
+
"type": "timestamptz(6)",
|
|
233
404
|
"unsigned": false,
|
|
234
405
|
"autoincrement": false,
|
|
235
406
|
"primary": false,
|
|
236
407
|
"nullable": false,
|
|
408
|
+
"unique": false,
|
|
237
409
|
"length": 6,
|
|
238
|
-
"
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
"autoincrement": false,
|
|
245
|
-
"primary": false,
|
|
246
|
-
"nullable": true,
|
|
247
|
-
"length": 6,
|
|
410
|
+
"precision": null,
|
|
411
|
+
"scale": null,
|
|
412
|
+
"default": null,
|
|
413
|
+
"comment": null,
|
|
414
|
+
"collation": null,
|
|
415
|
+
"enumItems": [],
|
|
248
416
|
"mappedType": "datetime"
|
|
249
417
|
}
|
|
250
418
|
},
|
|
251
|
-
"name": "mfa_enforcement_policies",
|
|
252
|
-
"schema": "public",
|
|
253
419
|
"indexes": [
|
|
254
420
|
{
|
|
255
|
-
"keyName": "idx_mfa_enforcement_scope",
|
|
256
421
|
"columnNames": [
|
|
257
422
|
"scope",
|
|
258
423
|
"tenant_id"
|
|
259
424
|
],
|
|
260
425
|
"composite": true,
|
|
261
426
|
"constraint": false,
|
|
427
|
+
"keyName": "idx_mfa_enforcement_scope",
|
|
262
428
|
"primary": false,
|
|
263
429
|
"unique": false
|
|
264
430
|
},
|
|
265
431
|
{
|
|
266
|
-
"keyName": "mfa_enforcement_policies_pkey",
|
|
267
432
|
"columnNames": [
|
|
268
433
|
"id"
|
|
269
434
|
],
|
|
270
435
|
"composite": false,
|
|
271
436
|
"constraint": true,
|
|
437
|
+
"keyName": "mfa_enforcement_policies_pkey",
|
|
272
438
|
"primary": true,
|
|
273
439
|
"unique": true
|
|
274
440
|
}
|
|
275
441
|
],
|
|
276
442
|
"checks": [],
|
|
443
|
+
"triggers": [],
|
|
277
444
|
"foreignKeys": {},
|
|
278
|
-
"
|
|
445
|
+
"comment": null
|
|
279
446
|
},
|
|
280
447
|
{
|
|
448
|
+
"name": "mfa_recovery_codes",
|
|
449
|
+
"schema": "public",
|
|
281
450
|
"columns": {
|
|
282
|
-
"
|
|
283
|
-
"name": "
|
|
284
|
-
"type": "
|
|
451
|
+
"code_hash": {
|
|
452
|
+
"name": "code_hash",
|
|
453
|
+
"type": "text",
|
|
285
454
|
"unsigned": false,
|
|
286
455
|
"autoincrement": false,
|
|
287
456
|
"primary": false,
|
|
288
457
|
"nullable": false,
|
|
289
|
-
"
|
|
290
|
-
"
|
|
458
|
+
"unique": false,
|
|
459
|
+
"length": null,
|
|
460
|
+
"precision": null,
|
|
461
|
+
"scale": null,
|
|
462
|
+
"default": null,
|
|
463
|
+
"comment": null,
|
|
464
|
+
"collation": null,
|
|
465
|
+
"enumItems": [],
|
|
466
|
+
"mappedType": "text"
|
|
291
467
|
},
|
|
292
|
-
"
|
|
293
|
-
"name": "
|
|
294
|
-
"type": "
|
|
468
|
+
"created_at": {
|
|
469
|
+
"name": "created_at",
|
|
470
|
+
"type": "timestamptz(6)",
|
|
295
471
|
"unsigned": false,
|
|
296
472
|
"autoincrement": false,
|
|
297
473
|
"primary": false,
|
|
298
474
|
"nullable": false,
|
|
299
|
-
"
|
|
475
|
+
"unique": false,
|
|
476
|
+
"length": 6,
|
|
477
|
+
"precision": null,
|
|
478
|
+
"scale": null,
|
|
479
|
+
"default": null,
|
|
480
|
+
"comment": null,
|
|
481
|
+
"collation": null,
|
|
482
|
+
"enumItems": [],
|
|
483
|
+
"mappedType": "datetime"
|
|
300
484
|
},
|
|
301
|
-
"
|
|
302
|
-
"name": "
|
|
485
|
+
"id": {
|
|
486
|
+
"name": "id",
|
|
303
487
|
"type": "uuid",
|
|
304
488
|
"unsigned": false,
|
|
305
489
|
"autoincrement": false,
|
|
306
|
-
"primary":
|
|
490
|
+
"primary": true,
|
|
307
491
|
"nullable": false,
|
|
492
|
+
"unique": false,
|
|
493
|
+
"length": null,
|
|
494
|
+
"precision": null,
|
|
495
|
+
"scale": null,
|
|
496
|
+
"default": "gen_random_uuid()",
|
|
497
|
+
"comment": null,
|
|
498
|
+
"collation": null,
|
|
499
|
+
"enumItems": [],
|
|
308
500
|
"mappedType": "uuid"
|
|
309
501
|
},
|
|
310
|
-
"code_hash": {
|
|
311
|
-
"name": "code_hash",
|
|
312
|
-
"type": "text",
|
|
313
|
-
"unsigned": false,
|
|
314
|
-
"autoincrement": false,
|
|
315
|
-
"primary": false,
|
|
316
|
-
"nullable": false,
|
|
317
|
-
"mappedType": "text"
|
|
318
|
-
},
|
|
319
502
|
"is_used": {
|
|
320
503
|
"name": "is_used",
|
|
321
504
|
"type": "boolean",
|
|
@@ -323,106 +506,201 @@
|
|
|
323
506
|
"autoincrement": false,
|
|
324
507
|
"primary": false,
|
|
325
508
|
"nullable": false,
|
|
509
|
+
"unique": false,
|
|
510
|
+
"length": null,
|
|
511
|
+
"precision": null,
|
|
512
|
+
"scale": null,
|
|
326
513
|
"default": "false",
|
|
514
|
+
"comment": null,
|
|
515
|
+
"collation": null,
|
|
516
|
+
"enumItems": [],
|
|
327
517
|
"mappedType": "boolean"
|
|
328
518
|
},
|
|
519
|
+
"tenant_id": {
|
|
520
|
+
"name": "tenant_id",
|
|
521
|
+
"type": "uuid",
|
|
522
|
+
"unsigned": false,
|
|
523
|
+
"autoincrement": false,
|
|
524
|
+
"primary": false,
|
|
525
|
+
"nullable": false,
|
|
526
|
+
"unique": false,
|
|
527
|
+
"length": null,
|
|
528
|
+
"precision": null,
|
|
529
|
+
"scale": null,
|
|
530
|
+
"default": null,
|
|
531
|
+
"comment": null,
|
|
532
|
+
"collation": null,
|
|
533
|
+
"enumItems": [],
|
|
534
|
+
"mappedType": "uuid"
|
|
535
|
+
},
|
|
329
536
|
"used_at": {
|
|
330
537
|
"name": "used_at",
|
|
331
|
-
"type": "timestamptz",
|
|
538
|
+
"type": "timestamptz(6)",
|
|
332
539
|
"unsigned": false,
|
|
333
540
|
"autoincrement": false,
|
|
334
541
|
"primary": false,
|
|
335
542
|
"nullable": true,
|
|
543
|
+
"unique": false,
|
|
336
544
|
"length": 6,
|
|
545
|
+
"precision": null,
|
|
546
|
+
"scale": null,
|
|
547
|
+
"default": null,
|
|
548
|
+
"comment": null,
|
|
549
|
+
"collation": null,
|
|
550
|
+
"enumItems": [],
|
|
337
551
|
"mappedType": "datetime"
|
|
338
552
|
},
|
|
339
|
-
"
|
|
340
|
-
"name": "
|
|
341
|
-
"type": "
|
|
553
|
+
"user_id": {
|
|
554
|
+
"name": "user_id",
|
|
555
|
+
"type": "uuid",
|
|
342
556
|
"unsigned": false,
|
|
343
557
|
"autoincrement": false,
|
|
344
558
|
"primary": false,
|
|
345
559
|
"nullable": false,
|
|
346
|
-
"
|
|
347
|
-
"
|
|
560
|
+
"unique": false,
|
|
561
|
+
"length": null,
|
|
562
|
+
"precision": null,
|
|
563
|
+
"scale": null,
|
|
564
|
+
"default": null,
|
|
565
|
+
"comment": null,
|
|
566
|
+
"collation": null,
|
|
567
|
+
"enumItems": [],
|
|
568
|
+
"mappedType": "uuid"
|
|
348
569
|
}
|
|
349
570
|
},
|
|
350
|
-
"name": "mfa_recovery_codes",
|
|
351
|
-
"schema": "public",
|
|
352
571
|
"indexes": [
|
|
353
572
|
{
|
|
354
|
-
"keyName": "idx_mfa_recovery_codes_user",
|
|
355
573
|
"columnNames": [
|
|
356
574
|
"user_id",
|
|
357
575
|
"is_used"
|
|
358
576
|
],
|
|
359
577
|
"composite": true,
|
|
360
578
|
"constraint": false,
|
|
579
|
+
"keyName": "idx_mfa_recovery_codes_user",
|
|
361
580
|
"primary": false,
|
|
362
581
|
"unique": false
|
|
363
582
|
},
|
|
364
583
|
{
|
|
365
|
-
"keyName": "mfa_recovery_codes_pkey",
|
|
366
584
|
"columnNames": [
|
|
367
585
|
"id"
|
|
368
586
|
],
|
|
369
587
|
"composite": false,
|
|
370
588
|
"constraint": true,
|
|
589
|
+
"keyName": "mfa_recovery_codes_pkey",
|
|
371
590
|
"primary": true,
|
|
372
591
|
"unique": true
|
|
373
592
|
}
|
|
374
593
|
],
|
|
375
594
|
"checks": [],
|
|
595
|
+
"triggers": [],
|
|
376
596
|
"foreignKeys": {},
|
|
377
|
-
"
|
|
597
|
+
"comment": null
|
|
378
598
|
},
|
|
379
599
|
{
|
|
600
|
+
"name": "sudo_challenge_configs",
|
|
601
|
+
"schema": "public",
|
|
380
602
|
"columns": {
|
|
381
|
-
"
|
|
382
|
-
"name": "
|
|
383
|
-
"type": "
|
|
603
|
+
"challenge_method": {
|
|
604
|
+
"name": "challenge_method",
|
|
605
|
+
"type": "text",
|
|
384
606
|
"unsigned": false,
|
|
385
607
|
"autoincrement": false,
|
|
386
608
|
"primary": false,
|
|
387
609
|
"nullable": false,
|
|
388
|
-
"
|
|
389
|
-
"
|
|
610
|
+
"unique": false,
|
|
611
|
+
"length": null,
|
|
612
|
+
"precision": null,
|
|
613
|
+
"scale": null,
|
|
614
|
+
"default": "'auto'",
|
|
615
|
+
"comment": null,
|
|
616
|
+
"collation": null,
|
|
617
|
+
"enumItems": [],
|
|
618
|
+
"mappedType": "text"
|
|
390
619
|
},
|
|
391
|
-
"
|
|
392
|
-
"name": "
|
|
620
|
+
"configured_by": {
|
|
621
|
+
"name": "configured_by",
|
|
393
622
|
"type": "uuid",
|
|
394
623
|
"unsigned": false,
|
|
395
624
|
"autoincrement": false,
|
|
396
625
|
"primary": false,
|
|
397
626
|
"nullable": true,
|
|
627
|
+
"unique": false,
|
|
628
|
+
"length": null,
|
|
629
|
+
"precision": null,
|
|
630
|
+
"scale": null,
|
|
631
|
+
"default": null,
|
|
632
|
+
"comment": null,
|
|
633
|
+
"collation": null,
|
|
634
|
+
"enumItems": [],
|
|
398
635
|
"mappedType": "uuid"
|
|
399
636
|
},
|
|
400
|
-
"
|
|
401
|
-
"name": "
|
|
402
|
-
"type": "
|
|
637
|
+
"created_at": {
|
|
638
|
+
"name": "created_at",
|
|
639
|
+
"type": "timestamptz(6)",
|
|
403
640
|
"unsigned": false,
|
|
404
641
|
"autoincrement": false,
|
|
405
642
|
"primary": false,
|
|
406
|
-
"nullable":
|
|
407
|
-
"
|
|
643
|
+
"nullable": false,
|
|
644
|
+
"unique": false,
|
|
645
|
+
"length": 6,
|
|
646
|
+
"precision": null,
|
|
647
|
+
"scale": null,
|
|
648
|
+
"default": null,
|
|
649
|
+
"comment": null,
|
|
650
|
+
"collation": null,
|
|
651
|
+
"enumItems": [],
|
|
652
|
+
"mappedType": "datetime"
|
|
408
653
|
},
|
|
409
|
-
"
|
|
410
|
-
"name": "
|
|
411
|
-
"type": "
|
|
654
|
+
"deleted_at": {
|
|
655
|
+
"name": "deleted_at",
|
|
656
|
+
"type": "timestamptz(6)",
|
|
412
657
|
"unsigned": false,
|
|
413
658
|
"autoincrement": false,
|
|
414
659
|
"primary": false,
|
|
415
660
|
"nullable": true,
|
|
416
|
-
"
|
|
661
|
+
"unique": false,
|
|
662
|
+
"length": 6,
|
|
663
|
+
"precision": null,
|
|
664
|
+
"scale": null,
|
|
665
|
+
"default": null,
|
|
666
|
+
"comment": null,
|
|
667
|
+
"collation": null,
|
|
668
|
+
"enumItems": [],
|
|
669
|
+
"mappedType": "datetime"
|
|
417
670
|
},
|
|
418
|
-
"
|
|
419
|
-
"name": "
|
|
420
|
-
"type": "
|
|
671
|
+
"id": {
|
|
672
|
+
"name": "id",
|
|
673
|
+
"type": "uuid",
|
|
674
|
+
"unsigned": false,
|
|
675
|
+
"autoincrement": false,
|
|
676
|
+
"primary": true,
|
|
677
|
+
"nullable": false,
|
|
678
|
+
"unique": false,
|
|
679
|
+
"length": null,
|
|
680
|
+
"precision": null,
|
|
681
|
+
"scale": null,
|
|
682
|
+
"default": "gen_random_uuid()",
|
|
683
|
+
"comment": null,
|
|
684
|
+
"collation": null,
|
|
685
|
+
"enumItems": [],
|
|
686
|
+
"mappedType": "uuid"
|
|
687
|
+
},
|
|
688
|
+
"is_developer_default": {
|
|
689
|
+
"name": "is_developer_default",
|
|
690
|
+
"type": "boolean",
|
|
421
691
|
"unsigned": false,
|
|
422
692
|
"autoincrement": false,
|
|
423
693
|
"primary": false,
|
|
424
694
|
"nullable": false,
|
|
425
|
-
"
|
|
695
|
+
"unique": false,
|
|
696
|
+
"length": null,
|
|
697
|
+
"precision": null,
|
|
698
|
+
"scale": null,
|
|
699
|
+
"default": "false",
|
|
700
|
+
"comment": null,
|
|
701
|
+
"collation": null,
|
|
702
|
+
"enumItems": [],
|
|
703
|
+
"mappedType": "boolean"
|
|
426
704
|
},
|
|
427
705
|
"is_enabled": {
|
|
428
706
|
"name": "is_enabled",
|
|
@@ -431,135 +709,250 @@
|
|
|
431
709
|
"autoincrement": false,
|
|
432
710
|
"primary": false,
|
|
433
711
|
"nullable": false,
|
|
712
|
+
"unique": false,
|
|
713
|
+
"length": null,
|
|
714
|
+
"precision": null,
|
|
715
|
+
"scale": null,
|
|
434
716
|
"default": "true",
|
|
717
|
+
"comment": null,
|
|
718
|
+
"collation": null,
|
|
719
|
+
"enumItems": [],
|
|
435
720
|
"mappedType": "boolean"
|
|
436
721
|
},
|
|
437
|
-
"
|
|
438
|
-
"name": "
|
|
439
|
-
"type": "
|
|
722
|
+
"label": {
|
|
723
|
+
"name": "label",
|
|
724
|
+
"type": "text",
|
|
440
725
|
"unsigned": false,
|
|
441
726
|
"autoincrement": false,
|
|
442
727
|
"primary": false,
|
|
443
|
-
"nullable":
|
|
444
|
-
"
|
|
445
|
-
"
|
|
728
|
+
"nullable": true,
|
|
729
|
+
"unique": false,
|
|
730
|
+
"length": null,
|
|
731
|
+
"precision": null,
|
|
732
|
+
"scale": null,
|
|
733
|
+
"default": null,
|
|
734
|
+
"comment": null,
|
|
735
|
+
"collation": null,
|
|
736
|
+
"enumItems": [],
|
|
737
|
+
"mappedType": "text"
|
|
446
738
|
},
|
|
447
|
-
"
|
|
448
|
-
"name": "
|
|
449
|
-
"type": "
|
|
739
|
+
"organization_id": {
|
|
740
|
+
"name": "organization_id",
|
|
741
|
+
"type": "uuid",
|
|
450
742
|
"unsigned": false,
|
|
451
743
|
"autoincrement": false,
|
|
452
744
|
"primary": false,
|
|
453
|
-
"nullable":
|
|
454
|
-
"
|
|
455
|
-
"
|
|
745
|
+
"nullable": true,
|
|
746
|
+
"unique": false,
|
|
747
|
+
"length": null,
|
|
748
|
+
"precision": null,
|
|
749
|
+
"scale": null,
|
|
750
|
+
"default": null,
|
|
751
|
+
"comment": null,
|
|
752
|
+
"collation": null,
|
|
753
|
+
"enumItems": [],
|
|
754
|
+
"mappedType": "uuid"
|
|
456
755
|
},
|
|
457
|
-
"
|
|
458
|
-
"name": "
|
|
756
|
+
"target_identifier": {
|
|
757
|
+
"name": "target_identifier",
|
|
459
758
|
"type": "text",
|
|
460
759
|
"unsigned": false,
|
|
461
760
|
"autoincrement": false,
|
|
462
761
|
"primary": false,
|
|
463
762
|
"nullable": false,
|
|
464
|
-
"
|
|
763
|
+
"unique": false,
|
|
764
|
+
"length": null,
|
|
765
|
+
"precision": null,
|
|
766
|
+
"scale": null,
|
|
767
|
+
"default": null,
|
|
768
|
+
"comment": null,
|
|
769
|
+
"collation": null,
|
|
770
|
+
"enumItems": [],
|
|
465
771
|
"mappedType": "text"
|
|
466
772
|
},
|
|
467
|
-
"
|
|
468
|
-
"name": "
|
|
773
|
+
"tenant_id": {
|
|
774
|
+
"name": "tenant_id",
|
|
469
775
|
"type": "uuid",
|
|
470
776
|
"unsigned": false,
|
|
471
777
|
"autoincrement": false,
|
|
472
778
|
"primary": false,
|
|
473
779
|
"nullable": true,
|
|
780
|
+
"unique": false,
|
|
781
|
+
"length": null,
|
|
782
|
+
"precision": null,
|
|
783
|
+
"scale": null,
|
|
784
|
+
"default": null,
|
|
785
|
+
"comment": null,
|
|
786
|
+
"collation": null,
|
|
787
|
+
"enumItems": [],
|
|
474
788
|
"mappedType": "uuid"
|
|
475
789
|
},
|
|
476
|
-
"
|
|
477
|
-
"name": "
|
|
478
|
-
"type": "
|
|
790
|
+
"ttl_seconds": {
|
|
791
|
+
"name": "ttl_seconds",
|
|
792
|
+
"type": "int",
|
|
479
793
|
"unsigned": false,
|
|
480
794
|
"autoincrement": false,
|
|
481
795
|
"primary": false,
|
|
482
796
|
"nullable": false,
|
|
483
|
-
"
|
|
484
|
-
"
|
|
797
|
+
"unique": false,
|
|
798
|
+
"length": null,
|
|
799
|
+
"precision": null,
|
|
800
|
+
"scale": null,
|
|
801
|
+
"default": "300",
|
|
802
|
+
"comment": null,
|
|
803
|
+
"collation": null,
|
|
804
|
+
"enumItems": [],
|
|
805
|
+
"mappedType": "integer"
|
|
485
806
|
},
|
|
486
807
|
"updated_at": {
|
|
487
808
|
"name": "updated_at",
|
|
488
|
-
"type": "timestamptz",
|
|
809
|
+
"type": "timestamptz(6)",
|
|
489
810
|
"unsigned": false,
|
|
490
811
|
"autoincrement": false,
|
|
491
812
|
"primary": false,
|
|
492
813
|
"nullable": false,
|
|
814
|
+
"unique": false,
|
|
493
815
|
"length": 6,
|
|
494
|
-
"
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
"
|
|
498
|
-
"
|
|
499
|
-
"
|
|
500
|
-
"autoincrement": false,
|
|
501
|
-
"primary": false,
|
|
502
|
-
"nullable": true,
|
|
503
|
-
"length": 6,
|
|
816
|
+
"precision": null,
|
|
817
|
+
"scale": null,
|
|
818
|
+
"default": null,
|
|
819
|
+
"comment": null,
|
|
820
|
+
"collation": null,
|
|
821
|
+
"enumItems": [],
|
|
504
822
|
"mappedType": "datetime"
|
|
505
823
|
}
|
|
506
824
|
},
|
|
507
|
-
"name": "sudo_challenge_configs",
|
|
508
|
-
"schema": "public",
|
|
509
825
|
"indexes": [
|
|
510
826
|
{
|
|
511
|
-
"keyName": "idx_sudo_configs_target",
|
|
512
827
|
"columnNames": [
|
|
513
828
|
"target_identifier"
|
|
514
829
|
],
|
|
515
830
|
"composite": false,
|
|
516
831
|
"constraint": false,
|
|
832
|
+
"keyName": "idx_sudo_configs_target",
|
|
517
833
|
"primary": false,
|
|
518
834
|
"unique": false
|
|
519
835
|
},
|
|
520
836
|
{
|
|
521
|
-
"keyName": "sudo_challenge_configs_pkey",
|
|
522
837
|
"columnNames": [
|
|
523
838
|
"id"
|
|
524
839
|
],
|
|
525
840
|
"composite": false,
|
|
526
841
|
"constraint": true,
|
|
842
|
+
"keyName": "sudo_challenge_configs_pkey",
|
|
527
843
|
"primary": true,
|
|
528
844
|
"unique": true
|
|
529
845
|
}
|
|
530
846
|
],
|
|
531
847
|
"checks": [],
|
|
848
|
+
"triggers": [],
|
|
532
849
|
"foreignKeys": {},
|
|
533
|
-
"
|
|
850
|
+
"comment": null
|
|
534
851
|
},
|
|
535
852
|
{
|
|
853
|
+
"name": "sudo_sessions",
|
|
854
|
+
"schema": "public",
|
|
536
855
|
"columns": {
|
|
856
|
+
"challenge_method": {
|
|
857
|
+
"name": "challenge_method",
|
|
858
|
+
"type": "text",
|
|
859
|
+
"unsigned": false,
|
|
860
|
+
"autoincrement": false,
|
|
861
|
+
"primary": false,
|
|
862
|
+
"nullable": false,
|
|
863
|
+
"unique": false,
|
|
864
|
+
"length": null,
|
|
865
|
+
"precision": null,
|
|
866
|
+
"scale": null,
|
|
867
|
+
"default": null,
|
|
868
|
+
"comment": null,
|
|
869
|
+
"collation": null,
|
|
870
|
+
"enumItems": [],
|
|
871
|
+
"mappedType": "text"
|
|
872
|
+
},
|
|
873
|
+
"created_at": {
|
|
874
|
+
"name": "created_at",
|
|
875
|
+
"type": "timestamptz(6)",
|
|
876
|
+
"unsigned": false,
|
|
877
|
+
"autoincrement": false,
|
|
878
|
+
"primary": false,
|
|
879
|
+
"nullable": false,
|
|
880
|
+
"unique": false,
|
|
881
|
+
"length": 6,
|
|
882
|
+
"precision": null,
|
|
883
|
+
"scale": null,
|
|
884
|
+
"default": null,
|
|
885
|
+
"comment": null,
|
|
886
|
+
"collation": null,
|
|
887
|
+
"enumItems": [],
|
|
888
|
+
"mappedType": "datetime"
|
|
889
|
+
},
|
|
890
|
+
"expires_at": {
|
|
891
|
+
"name": "expires_at",
|
|
892
|
+
"type": "timestamptz(6)",
|
|
893
|
+
"unsigned": false,
|
|
894
|
+
"autoincrement": false,
|
|
895
|
+
"primary": false,
|
|
896
|
+
"nullable": false,
|
|
897
|
+
"unique": false,
|
|
898
|
+
"length": 6,
|
|
899
|
+
"precision": null,
|
|
900
|
+
"scale": null,
|
|
901
|
+
"default": null,
|
|
902
|
+
"comment": null,
|
|
903
|
+
"collation": null,
|
|
904
|
+
"enumItems": [],
|
|
905
|
+
"mappedType": "datetime"
|
|
906
|
+
},
|
|
537
907
|
"id": {
|
|
538
908
|
"name": "id",
|
|
539
909
|
"type": "uuid",
|
|
540
910
|
"unsigned": false,
|
|
541
911
|
"autoincrement": false,
|
|
542
|
-
"primary":
|
|
912
|
+
"primary": true,
|
|
543
913
|
"nullable": false,
|
|
914
|
+
"unique": false,
|
|
915
|
+
"length": null,
|
|
916
|
+
"precision": null,
|
|
917
|
+
"scale": null,
|
|
544
918
|
"default": "gen_random_uuid()",
|
|
919
|
+
"comment": null,
|
|
920
|
+
"collation": null,
|
|
921
|
+
"enumItems": [],
|
|
545
922
|
"mappedType": "uuid"
|
|
546
923
|
},
|
|
547
|
-
"
|
|
548
|
-
"name": "
|
|
924
|
+
"scope_organization_id": {
|
|
925
|
+
"name": "scope_organization_id",
|
|
549
926
|
"type": "uuid",
|
|
550
927
|
"unsigned": false,
|
|
551
928
|
"autoincrement": false,
|
|
552
929
|
"primary": false,
|
|
553
|
-
"nullable":
|
|
930
|
+
"nullable": true,
|
|
931
|
+
"unique": false,
|
|
932
|
+
"length": null,
|
|
933
|
+
"precision": null,
|
|
934
|
+
"scale": null,
|
|
935
|
+
"default": null,
|
|
936
|
+
"comment": null,
|
|
937
|
+
"collation": null,
|
|
938
|
+
"enumItems": [],
|
|
554
939
|
"mappedType": "uuid"
|
|
555
940
|
},
|
|
556
|
-
"
|
|
557
|
-
"name": "
|
|
941
|
+
"scope_tenant_id": {
|
|
942
|
+
"name": "scope_tenant_id",
|
|
558
943
|
"type": "uuid",
|
|
559
944
|
"unsigned": false,
|
|
560
945
|
"autoincrement": false,
|
|
561
946
|
"primary": false,
|
|
562
|
-
"nullable":
|
|
947
|
+
"nullable": true,
|
|
948
|
+
"unique": false,
|
|
949
|
+
"length": null,
|
|
950
|
+
"precision": null,
|
|
951
|
+
"scale": null,
|
|
952
|
+
"default": null,
|
|
953
|
+
"comment": null,
|
|
954
|
+
"collation": null,
|
|
955
|
+
"enumItems": [],
|
|
563
956
|
"mappedType": "uuid"
|
|
564
957
|
},
|
|
565
958
|
"session_token": {
|
|
@@ -569,132 +962,269 @@
|
|
|
569
962
|
"autoincrement": false,
|
|
570
963
|
"primary": false,
|
|
571
964
|
"nullable": false,
|
|
965
|
+
"unique": false,
|
|
966
|
+
"length": null,
|
|
967
|
+
"precision": null,
|
|
968
|
+
"scale": null,
|
|
969
|
+
"default": null,
|
|
970
|
+
"comment": null,
|
|
971
|
+
"collation": null,
|
|
972
|
+
"enumItems": [],
|
|
572
973
|
"mappedType": "text"
|
|
573
974
|
},
|
|
574
|
-
"
|
|
575
|
-
"name": "
|
|
975
|
+
"sudo_config_id": {
|
|
976
|
+
"name": "sudo_config_id",
|
|
977
|
+
"type": "uuid",
|
|
978
|
+
"unsigned": false,
|
|
979
|
+
"autoincrement": false,
|
|
980
|
+
"primary": false,
|
|
981
|
+
"nullable": true,
|
|
982
|
+
"unique": false,
|
|
983
|
+
"length": null,
|
|
984
|
+
"precision": null,
|
|
985
|
+
"scale": null,
|
|
986
|
+
"default": null,
|
|
987
|
+
"comment": null,
|
|
988
|
+
"collation": null,
|
|
989
|
+
"enumItems": [],
|
|
990
|
+
"mappedType": "uuid"
|
|
991
|
+
},
|
|
992
|
+
"sudo_config_updated_at": {
|
|
993
|
+
"name": "sudo_config_updated_at",
|
|
994
|
+
"type": "timestamptz(6)",
|
|
995
|
+
"unsigned": false,
|
|
996
|
+
"autoincrement": false,
|
|
997
|
+
"primary": false,
|
|
998
|
+
"nullable": true,
|
|
999
|
+
"unique": false,
|
|
1000
|
+
"length": 6,
|
|
1001
|
+
"precision": null,
|
|
1002
|
+
"scale": null,
|
|
1003
|
+
"default": null,
|
|
1004
|
+
"comment": null,
|
|
1005
|
+
"collation": null,
|
|
1006
|
+
"enumItems": [],
|
|
1007
|
+
"mappedType": "datetime"
|
|
1008
|
+
},
|
|
1009
|
+
"target_identifier": {
|
|
1010
|
+
"name": "target_identifier",
|
|
576
1011
|
"type": "text",
|
|
577
1012
|
"unsigned": false,
|
|
578
1013
|
"autoincrement": false,
|
|
579
1014
|
"primary": false,
|
|
580
|
-
"nullable":
|
|
1015
|
+
"nullable": true,
|
|
1016
|
+
"unique": false,
|
|
1017
|
+
"length": null,
|
|
1018
|
+
"precision": null,
|
|
1019
|
+
"scale": null,
|
|
1020
|
+
"default": null,
|
|
1021
|
+
"comment": null,
|
|
1022
|
+
"collation": null,
|
|
1023
|
+
"enumItems": [],
|
|
581
1024
|
"mappedType": "text"
|
|
582
1025
|
},
|
|
583
|
-
"
|
|
584
|
-
"name": "
|
|
585
|
-
"type": "
|
|
1026
|
+
"tenant_id": {
|
|
1027
|
+
"name": "tenant_id",
|
|
1028
|
+
"type": "uuid",
|
|
586
1029
|
"unsigned": false,
|
|
587
1030
|
"autoincrement": false,
|
|
588
1031
|
"primary": false,
|
|
589
1032
|
"nullable": false,
|
|
590
|
-
"
|
|
591
|
-
"
|
|
1033
|
+
"unique": false,
|
|
1034
|
+
"length": null,
|
|
1035
|
+
"precision": null,
|
|
1036
|
+
"scale": null,
|
|
1037
|
+
"default": null,
|
|
1038
|
+
"comment": null,
|
|
1039
|
+
"collation": null,
|
|
1040
|
+
"enumItems": [],
|
|
1041
|
+
"mappedType": "uuid"
|
|
592
1042
|
},
|
|
593
|
-
"
|
|
594
|
-
"name": "
|
|
595
|
-
"type": "
|
|
1043
|
+
"user_id": {
|
|
1044
|
+
"name": "user_id",
|
|
1045
|
+
"type": "uuid",
|
|
596
1046
|
"unsigned": false,
|
|
597
1047
|
"autoincrement": false,
|
|
598
1048
|
"primary": false,
|
|
599
1049
|
"nullable": false,
|
|
1050
|
+
"unique": false,
|
|
1051
|
+
"length": null,
|
|
1052
|
+
"precision": null,
|
|
1053
|
+
"scale": null,
|
|
1054
|
+
"default": null,
|
|
1055
|
+
"comment": null,
|
|
1056
|
+
"collation": null,
|
|
1057
|
+
"enumItems": [],
|
|
1058
|
+
"mappedType": "uuid"
|
|
1059
|
+
},
|
|
1060
|
+
"verified_at": {
|
|
1061
|
+
"name": "verified_at",
|
|
1062
|
+
"type": "timestamptz(6)",
|
|
1063
|
+
"unsigned": false,
|
|
1064
|
+
"autoincrement": false,
|
|
1065
|
+
"primary": false,
|
|
1066
|
+
"nullable": true,
|
|
1067
|
+
"unique": false,
|
|
600
1068
|
"length": 6,
|
|
1069
|
+
"precision": null,
|
|
1070
|
+
"scale": null,
|
|
1071
|
+
"default": null,
|
|
1072
|
+
"comment": null,
|
|
1073
|
+
"collation": null,
|
|
1074
|
+
"enumItems": [],
|
|
601
1075
|
"mappedType": "datetime"
|
|
602
1076
|
}
|
|
603
1077
|
},
|
|
604
|
-
"name": "sudo_sessions",
|
|
605
|
-
"schema": "public",
|
|
606
1078
|
"indexes": [
|
|
607
1079
|
{
|
|
608
|
-
"keyName": "idx_sudo_sessions_token",
|
|
609
1080
|
"columnNames": [
|
|
610
1081
|
"session_token",
|
|
611
1082
|
"expires_at"
|
|
612
1083
|
],
|
|
613
1084
|
"composite": true,
|
|
614
1085
|
"constraint": false,
|
|
1086
|
+
"keyName": "idx_sudo_sessions_token",
|
|
615
1087
|
"primary": false,
|
|
616
1088
|
"unique": false
|
|
617
1089
|
},
|
|
618
1090
|
{
|
|
619
|
-
"keyName": "sudo_sessions_pkey",
|
|
620
1091
|
"columnNames": [
|
|
621
1092
|
"id"
|
|
622
1093
|
],
|
|
623
1094
|
"composite": false,
|
|
624
1095
|
"constraint": true,
|
|
1096
|
+
"keyName": "sudo_sessions_pkey",
|
|
625
1097
|
"primary": true,
|
|
626
1098
|
"unique": true
|
|
627
1099
|
}
|
|
628
1100
|
],
|
|
629
1101
|
"checks": [],
|
|
1102
|
+
"triggers": [],
|
|
630
1103
|
"foreignKeys": {},
|
|
631
|
-
"
|
|
1104
|
+
"comment": null
|
|
632
1105
|
},
|
|
633
1106
|
{
|
|
1107
|
+
"name": "user_mfa_methods",
|
|
1108
|
+
"schema": "public",
|
|
634
1109
|
"columns": {
|
|
635
|
-
"
|
|
636
|
-
"name": "
|
|
637
|
-
"type": "
|
|
1110
|
+
"created_at": {
|
|
1111
|
+
"name": "created_at",
|
|
1112
|
+
"type": "timestamptz(6)",
|
|
638
1113
|
"unsigned": false,
|
|
639
1114
|
"autoincrement": false,
|
|
640
1115
|
"primary": false,
|
|
641
1116
|
"nullable": false,
|
|
642
|
-
"
|
|
643
|
-
"
|
|
1117
|
+
"unique": false,
|
|
1118
|
+
"length": 6,
|
|
1119
|
+
"precision": null,
|
|
1120
|
+
"scale": null,
|
|
1121
|
+
"default": null,
|
|
1122
|
+
"comment": null,
|
|
1123
|
+
"collation": null,
|
|
1124
|
+
"enumItems": [],
|
|
1125
|
+
"mappedType": "datetime"
|
|
644
1126
|
},
|
|
645
|
-
"
|
|
646
|
-
"name": "
|
|
647
|
-
"type": "
|
|
1127
|
+
"deleted_at": {
|
|
1128
|
+
"name": "deleted_at",
|
|
1129
|
+
"type": "timestamptz(6)",
|
|
648
1130
|
"unsigned": false,
|
|
649
1131
|
"autoincrement": false,
|
|
650
1132
|
"primary": false,
|
|
651
|
-
"nullable":
|
|
652
|
-
"
|
|
1133
|
+
"nullable": true,
|
|
1134
|
+
"unique": false,
|
|
1135
|
+
"length": 6,
|
|
1136
|
+
"precision": null,
|
|
1137
|
+
"scale": null,
|
|
1138
|
+
"default": null,
|
|
1139
|
+
"comment": null,
|
|
1140
|
+
"collation": null,
|
|
1141
|
+
"enumItems": [],
|
|
1142
|
+
"mappedType": "datetime"
|
|
653
1143
|
},
|
|
654
|
-
"
|
|
655
|
-
"name": "
|
|
1144
|
+
"id": {
|
|
1145
|
+
"name": "id",
|
|
656
1146
|
"type": "uuid",
|
|
657
1147
|
"unsigned": false,
|
|
658
1148
|
"autoincrement": false,
|
|
659
|
-
"primary":
|
|
1149
|
+
"primary": true,
|
|
660
1150
|
"nullable": false,
|
|
1151
|
+
"unique": false,
|
|
1152
|
+
"length": null,
|
|
1153
|
+
"precision": null,
|
|
1154
|
+
"scale": null,
|
|
1155
|
+
"default": "gen_random_uuid()",
|
|
1156
|
+
"comment": null,
|
|
1157
|
+
"collation": null,
|
|
1158
|
+
"enumItems": [],
|
|
661
1159
|
"mappedType": "uuid"
|
|
662
1160
|
},
|
|
663
|
-
"
|
|
664
|
-
"name": "
|
|
665
|
-
"type": "
|
|
1161
|
+
"is_active": {
|
|
1162
|
+
"name": "is_active",
|
|
1163
|
+
"type": "boolean",
|
|
666
1164
|
"unsigned": false,
|
|
667
1165
|
"autoincrement": false,
|
|
668
1166
|
"primary": false,
|
|
669
|
-
"nullable":
|
|
670
|
-
"
|
|
1167
|
+
"nullable": false,
|
|
1168
|
+
"unique": false,
|
|
1169
|
+
"length": null,
|
|
1170
|
+
"precision": null,
|
|
1171
|
+
"scale": null,
|
|
1172
|
+
"default": "true",
|
|
1173
|
+
"comment": null,
|
|
1174
|
+
"collation": null,
|
|
1175
|
+
"enumItems": [],
|
|
1176
|
+
"mappedType": "boolean"
|
|
671
1177
|
},
|
|
672
|
-
"
|
|
673
|
-
"name": "
|
|
1178
|
+
"label": {
|
|
1179
|
+
"name": "label",
|
|
674
1180
|
"type": "text",
|
|
675
1181
|
"unsigned": false,
|
|
676
1182
|
"autoincrement": false,
|
|
677
1183
|
"primary": false,
|
|
678
|
-
"nullable":
|
|
1184
|
+
"nullable": true,
|
|
1185
|
+
"unique": false,
|
|
1186
|
+
"length": null,
|
|
1187
|
+
"precision": null,
|
|
1188
|
+
"scale": null,
|
|
1189
|
+
"default": null,
|
|
1190
|
+
"comment": null,
|
|
1191
|
+
"collation": null,
|
|
1192
|
+
"enumItems": [],
|
|
679
1193
|
"mappedType": "text"
|
|
680
1194
|
},
|
|
681
|
-
"
|
|
682
|
-
"name": "
|
|
683
|
-
"type": "
|
|
1195
|
+
"last_used_at": {
|
|
1196
|
+
"name": "last_used_at",
|
|
1197
|
+
"type": "timestamptz(6)",
|
|
684
1198
|
"unsigned": false,
|
|
685
1199
|
"autoincrement": false,
|
|
686
1200
|
"primary": false,
|
|
687
1201
|
"nullable": true,
|
|
688
|
-
"
|
|
1202
|
+
"unique": false,
|
|
1203
|
+
"length": 6,
|
|
1204
|
+
"precision": null,
|
|
1205
|
+
"scale": null,
|
|
1206
|
+
"default": null,
|
|
1207
|
+
"comment": null,
|
|
1208
|
+
"collation": null,
|
|
1209
|
+
"enumItems": [],
|
|
1210
|
+
"mappedType": "datetime"
|
|
689
1211
|
},
|
|
690
|
-
"
|
|
691
|
-
"name": "
|
|
692
|
-
"type": "
|
|
1212
|
+
"organization_id": {
|
|
1213
|
+
"name": "organization_id",
|
|
1214
|
+
"type": "uuid",
|
|
693
1215
|
"unsigned": false,
|
|
694
1216
|
"autoincrement": false,
|
|
695
1217
|
"primary": false,
|
|
696
1218
|
"nullable": true,
|
|
697
|
-
"
|
|
1219
|
+
"unique": false,
|
|
1220
|
+
"length": null,
|
|
1221
|
+
"precision": null,
|
|
1222
|
+
"scale": null,
|
|
1223
|
+
"default": null,
|
|
1224
|
+
"comment": null,
|
|
1225
|
+
"collation": null,
|
|
1226
|
+
"enumItems": [],
|
|
1227
|
+
"mappedType": "uuid"
|
|
698
1228
|
},
|
|
699
1229
|
"provider_metadata": {
|
|
700
1230
|
"name": "provider_metadata",
|
|
@@ -703,74 +1233,114 @@
|
|
|
703
1233
|
"autoincrement": false,
|
|
704
1234
|
"primary": false,
|
|
705
1235
|
"nullable": true,
|
|
1236
|
+
"unique": false,
|
|
1237
|
+
"length": null,
|
|
1238
|
+
"precision": null,
|
|
1239
|
+
"scale": null,
|
|
1240
|
+
"default": null,
|
|
1241
|
+
"comment": null,
|
|
1242
|
+
"collation": null,
|
|
1243
|
+
"enumItems": [],
|
|
706
1244
|
"mappedType": "json"
|
|
707
1245
|
},
|
|
708
|
-
"
|
|
709
|
-
"name": "
|
|
710
|
-
"type": "
|
|
1246
|
+
"secret": {
|
|
1247
|
+
"name": "secret",
|
|
1248
|
+
"type": "text",
|
|
711
1249
|
"unsigned": false,
|
|
712
1250
|
"autoincrement": false,
|
|
713
1251
|
"primary": false,
|
|
714
|
-
"nullable":
|
|
715
|
-
"
|
|
716
|
-
"
|
|
1252
|
+
"nullable": true,
|
|
1253
|
+
"unique": false,
|
|
1254
|
+
"length": null,
|
|
1255
|
+
"precision": null,
|
|
1256
|
+
"scale": null,
|
|
1257
|
+
"default": null,
|
|
1258
|
+
"comment": null,
|
|
1259
|
+
"collation": null,
|
|
1260
|
+
"enumItems": [],
|
|
1261
|
+
"mappedType": "text"
|
|
717
1262
|
},
|
|
718
|
-
"
|
|
719
|
-
"name": "
|
|
720
|
-
"type": "
|
|
1263
|
+
"tenant_id": {
|
|
1264
|
+
"name": "tenant_id",
|
|
1265
|
+
"type": "uuid",
|
|
721
1266
|
"unsigned": false,
|
|
722
1267
|
"autoincrement": false,
|
|
723
1268
|
"primary": false,
|
|
724
|
-
"nullable":
|
|
725
|
-
"
|
|
726
|
-
"
|
|
1269
|
+
"nullable": false,
|
|
1270
|
+
"unique": false,
|
|
1271
|
+
"length": null,
|
|
1272
|
+
"precision": null,
|
|
1273
|
+
"scale": null,
|
|
1274
|
+
"default": null,
|
|
1275
|
+
"comment": null,
|
|
1276
|
+
"collation": null,
|
|
1277
|
+
"enumItems": [],
|
|
1278
|
+
"mappedType": "uuid"
|
|
727
1279
|
},
|
|
728
|
-
"
|
|
729
|
-
"name": "
|
|
730
|
-
"type": "
|
|
1280
|
+
"type": {
|
|
1281
|
+
"name": "type",
|
|
1282
|
+
"type": "text",
|
|
731
1283
|
"unsigned": false,
|
|
732
1284
|
"autoincrement": false,
|
|
733
1285
|
"primary": false,
|
|
734
1286
|
"nullable": false,
|
|
735
|
-
"
|
|
736
|
-
"
|
|
1287
|
+
"unique": false,
|
|
1288
|
+
"length": null,
|
|
1289
|
+
"precision": null,
|
|
1290
|
+
"scale": null,
|
|
1291
|
+
"default": null,
|
|
1292
|
+
"comment": null,
|
|
1293
|
+
"collation": null,
|
|
1294
|
+
"enumItems": [],
|
|
1295
|
+
"mappedType": "text"
|
|
737
1296
|
},
|
|
738
1297
|
"updated_at": {
|
|
739
1298
|
"name": "updated_at",
|
|
740
|
-
"type": "timestamptz",
|
|
1299
|
+
"type": "timestamptz(6)",
|
|
741
1300
|
"unsigned": false,
|
|
742
1301
|
"autoincrement": false,
|
|
743
1302
|
"primary": false,
|
|
744
1303
|
"nullable": false,
|
|
1304
|
+
"unique": false,
|
|
745
1305
|
"length": 6,
|
|
1306
|
+
"precision": null,
|
|
1307
|
+
"scale": null,
|
|
1308
|
+
"default": null,
|
|
1309
|
+
"comment": null,
|
|
1310
|
+
"collation": null,
|
|
1311
|
+
"enumItems": [],
|
|
746
1312
|
"mappedType": "datetime"
|
|
747
1313
|
},
|
|
748
|
-
"
|
|
749
|
-
"name": "
|
|
750
|
-
"type": "
|
|
1314
|
+
"user_id": {
|
|
1315
|
+
"name": "user_id",
|
|
1316
|
+
"type": "uuid",
|
|
751
1317
|
"unsigned": false,
|
|
752
1318
|
"autoincrement": false,
|
|
753
1319
|
"primary": false,
|
|
754
|
-
"nullable":
|
|
755
|
-
"
|
|
756
|
-
"
|
|
1320
|
+
"nullable": false,
|
|
1321
|
+
"unique": false,
|
|
1322
|
+
"length": null,
|
|
1323
|
+
"precision": null,
|
|
1324
|
+
"scale": null,
|
|
1325
|
+
"default": null,
|
|
1326
|
+
"comment": null,
|
|
1327
|
+
"collation": null,
|
|
1328
|
+
"enumItems": [],
|
|
1329
|
+
"mappedType": "uuid"
|
|
757
1330
|
}
|
|
758
1331
|
},
|
|
759
|
-
"name": "user_mfa_methods",
|
|
760
|
-
"schema": "public",
|
|
761
1332
|
"indexes": [
|
|
762
1333
|
{
|
|
763
|
-
"keyName": "idx_user_mfa_methods_tenant",
|
|
764
1334
|
"columnNames": [
|
|
765
1335
|
"tenant_id"
|
|
766
1336
|
],
|
|
767
1337
|
"composite": false,
|
|
768
1338
|
"constraint": false,
|
|
1339
|
+
"keyName": "idx_user_mfa_methods_tenant",
|
|
769
1340
|
"primary": false,
|
|
770
1341
|
"unique": false
|
|
771
1342
|
},
|
|
772
1343
|
{
|
|
773
|
-
"keyName": "idx_user_mfa_methods_user_type",
|
|
774
1344
|
"columnNames": [
|
|
775
1345
|
"user_id",
|
|
776
1346
|
"type",
|
|
@@ -778,24 +1348,27 @@
|
|
|
778
1348
|
],
|
|
779
1349
|
"composite": true,
|
|
780
1350
|
"constraint": false,
|
|
1351
|
+
"keyName": "idx_user_mfa_methods_user_type",
|
|
781
1352
|
"primary": false,
|
|
782
1353
|
"unique": false
|
|
783
1354
|
},
|
|
784
1355
|
{
|
|
785
|
-
"keyName": "user_mfa_methods_pkey",
|
|
786
1356
|
"columnNames": [
|
|
787
1357
|
"id"
|
|
788
1358
|
],
|
|
789
1359
|
"composite": false,
|
|
790
1360
|
"constraint": true,
|
|
1361
|
+
"keyName": "user_mfa_methods_pkey",
|
|
791
1362
|
"primary": true,
|
|
792
1363
|
"unique": true
|
|
793
1364
|
}
|
|
794
1365
|
],
|
|
795
1366
|
"checks": [],
|
|
1367
|
+
"triggers": [],
|
|
796
1368
|
"foreignKeys": {},
|
|
797
|
-
"
|
|
1369
|
+
"comment": null
|
|
798
1370
|
}
|
|
799
1371
|
],
|
|
1372
|
+
"views": [],
|
|
800
1373
|
"nativeEnums": {}
|
|
801
|
-
}
|
|
1374
|
+
}
|