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