@open-mercato/enterprise 0.4.6-develop-15c18897fc → 0.4.6-develop-34aa847ce6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +2 -2
  3. package/dist/modules/sso/acl.js +11 -0
  4. package/dist/modules/sso/acl.js.map +7 -0
  5. package/dist/modules/sso/api/admin-context.js +27 -0
  6. package/dist/modules/sso/api/admin-context.js.map +7 -0
  7. package/dist/modules/sso/api/callback/oidc/route.js +103 -0
  8. package/dist/modules/sso/api/callback/oidc/route.js.map +7 -0
  9. package/dist/modules/sso/api/config/[id]/activate/route.js +49 -0
  10. package/dist/modules/sso/api/config/[id]/activate/route.js.map +7 -0
  11. package/dist/modules/sso/api/config/[id]/domains/route.js +96 -0
  12. package/dist/modules/sso/api/config/[id]/domains/route.js.map +7 -0
  13. package/dist/modules/sso/api/config/[id]/route.js +103 -0
  14. package/dist/modules/sso/api/config/[id]/route.js.map +7 -0
  15. package/dist/modules/sso/api/config/[id]/test/route.js +41 -0
  16. package/dist/modules/sso/api/config/[id]/test/route.js.map +7 -0
  17. package/dist/modules/sso/api/config/route.js +83 -0
  18. package/dist/modules/sso/api/config/route.js.map +7 -0
  19. package/dist/modules/sso/api/error-handler.js +28 -0
  20. package/dist/modules/sso/api/error-handler.js.map +7 -0
  21. package/dist/modules/sso/api/hrd/route.js +52 -0
  22. package/dist/modules/sso/api/hrd/route.js.map +7 -0
  23. package/dist/modules/sso/api/initiate/route.js +66 -0
  24. package/dist/modules/sso/api/initiate/route.js.map +7 -0
  25. package/dist/modules/sso/api/scim/context.js +68 -0
  26. package/dist/modules/sso/api/scim/context.js.map +7 -0
  27. package/dist/modules/sso/api/scim/logs/route.js +65 -0
  28. package/dist/modules/sso/api/scim/logs/route.js.map +7 -0
  29. package/dist/modules/sso/api/scim/tokens/[id]/route.js +42 -0
  30. package/dist/modules/sso/api/scim/tokens/[id]/route.js.map +7 -0
  31. package/dist/modules/sso/api/scim/tokens/route.js +83 -0
  32. package/dist/modules/sso/api/scim/tokens/route.js.map +7 -0
  33. package/dist/modules/sso/api/scim/v2/ServiceProviderConfig/route.js +42 -0
  34. package/dist/modules/sso/api/scim/v2/ServiceProviderConfig/route.js.map +7 -0
  35. package/dist/modules/sso/api/scim/v2/Users/[id]/route.js +94 -0
  36. package/dist/modules/sso/api/scim/v2/Users/[id]/route.js.map +7 -0
  37. package/dist/modules/sso/api/scim/v2/Users/route.js +86 -0
  38. package/dist/modules/sso/api/scim/v2/Users/route.js.map +7 -0
  39. package/dist/modules/sso/backend/page.js +173 -0
  40. package/dist/modules/sso/backend/page.js.map +7 -0
  41. package/dist/modules/sso/backend/page.meta.js +31 -0
  42. package/dist/modules/sso/backend/page.meta.js.map +7 -0
  43. package/dist/modules/sso/backend/sso/config/[id]/page.js +749 -0
  44. package/dist/modules/sso/backend/sso/config/[id]/page.js.map +7 -0
  45. package/dist/modules/sso/backend/sso/config/[id]/page.meta.js +19 -0
  46. package/dist/modules/sso/backend/sso/config/[id]/page.meta.js.map +7 -0
  47. package/dist/modules/sso/backend/sso/config/new/page.js +381 -0
  48. package/dist/modules/sso/backend/sso/config/new/page.js.map +7 -0
  49. package/dist/modules/sso/backend/sso/config/new/page.meta.js +19 -0
  50. package/dist/modules/sso/backend/sso/config/new/page.meta.js.map +7 -0
  51. package/dist/modules/sso/data/entities.js +299 -0
  52. package/dist/modules/sso/data/entities.js.map +7 -0
  53. package/dist/modules/sso/data/validators.js +114 -0
  54. package/dist/modules/sso/data/validators.js.map +7 -0
  55. package/dist/modules/sso/di.js +26 -0
  56. package/dist/modules/sso/di.js.map +7 -0
  57. package/dist/modules/sso/events.js +24 -0
  58. package/dist/modules/sso/events.js.map +7 -0
  59. package/dist/modules/sso/i18n/de.json +146 -0
  60. package/dist/modules/sso/i18n/en.json +146 -0
  61. package/dist/modules/sso/i18n/es.json +146 -0
  62. package/dist/modules/sso/i18n/pl.json +146 -0
  63. package/dist/modules/sso/index.js +11 -0
  64. package/dist/modules/sso/index.js.map +7 -0
  65. package/dist/modules/sso/lib/domains.js +30 -0
  66. package/dist/modules/sso/lib/domains.js.map +7 -0
  67. package/dist/modules/sso/lib/oidc-provider.js +140 -0
  68. package/dist/modules/sso/lib/oidc-provider.js.map +7 -0
  69. package/dist/modules/sso/lib/registry.js +15 -0
  70. package/dist/modules/sso/lib/registry.js.map +7 -0
  71. package/dist/modules/sso/lib/scim-filter.js +43 -0
  72. package/dist/modules/sso/lib/scim-filter.js.map +7 -0
  73. package/dist/modules/sso/lib/scim-mapper.js +49 -0
  74. package/dist/modules/sso/lib/scim-mapper.js.map +7 -0
  75. package/dist/modules/sso/lib/scim-patch.js +63 -0
  76. package/dist/modules/sso/lib/scim-patch.js.map +7 -0
  77. package/dist/modules/sso/lib/scim-response.js +34 -0
  78. package/dist/modules/sso/lib/scim-response.js.map +7 -0
  79. package/dist/modules/sso/lib/scim-utils.js +9 -0
  80. package/dist/modules/sso/lib/scim-utils.js.map +7 -0
  81. package/dist/modules/sso/lib/state-cookie.js +67 -0
  82. package/dist/modules/sso/lib/state-cookie.js.map +7 -0
  83. package/dist/modules/sso/lib/types.js +1 -0
  84. package/dist/modules/sso/lib/types.js.map +7 -0
  85. package/dist/modules/sso/migrations/Migration20260219000000_sso.js +20 -0
  86. package/dist/modules/sso/migrations/Migration20260219000000_sso.js.map +7 -0
  87. package/dist/modules/sso/migrations/Migration20260222000000_sso_add_name.js +13 -0
  88. package/dist/modules/sso/migrations/Migration20260222000000_sso_add_name.js.map +7 -0
  89. package/dist/modules/sso/migrations/Migration20260222000001_sso_partial_unique_org.js +15 -0
  90. package/dist/modules/sso/migrations/Migration20260222000001_sso_partial_unique_org.js.map +7 -0
  91. package/dist/modules/sso/migrations/Migration20260223000000_scim_tables.js +22 -0
  92. package/dist/modules/sso/migrations/Migration20260223000000_scim_tables.js.map +7 -0
  93. package/dist/modules/sso/migrations/Migration20260224000000_sso_external_id.js +15 -0
  94. package/dist/modules/sso/migrations/Migration20260224000000_sso_external_id.js.map +7 -0
  95. package/dist/modules/sso/migrations/Migration20260224100000_sso_role_grants.js +17 -0
  96. package/dist/modules/sso/migrations/Migration20260224100000_sso_role_grants.js.map +7 -0
  97. package/dist/modules/sso/migrations/Migration20260224200000_drop_default_role_id.js +13 -0
  98. package/dist/modules/sso/migrations/Migration20260224200000_drop_default_role_id.js.map +7 -0
  99. package/dist/modules/sso/migrations/Migration20260225000000_sso_identities_partial_unique.js +23 -0
  100. package/dist/modules/sso/migrations/Migration20260225000000_sso_identities_partial_unique.js.map +7 -0
  101. package/dist/modules/sso/migrations/Migration20260305000000_sso_role_grants_org_id.js +14 -0
  102. package/dist/modules/sso/migrations/Migration20260305000000_sso_role_grants_org_id.js.map +7 -0
  103. package/dist/modules/sso/services/accountLinkingService.js +298 -0
  104. package/dist/modules/sso/services/accountLinkingService.js.map +7 -0
  105. package/dist/modules/sso/services/hrdService.js +18 -0
  106. package/dist/modules/sso/services/hrdService.js.map +7 -0
  107. package/dist/modules/sso/services/scimService.js +372 -0
  108. package/dist/modules/sso/services/scimService.js.map +7 -0
  109. package/dist/modules/sso/services/scimTokenService.js +94 -0
  110. package/dist/modules/sso/services/scimTokenService.js.map +7 -0
  111. package/dist/modules/sso/services/ssoConfigService.js +254 -0
  112. package/dist/modules/sso/services/ssoConfigService.js.map +7 -0
  113. package/dist/modules/sso/services/ssoService.js +125 -0
  114. package/dist/modules/sso/services/ssoService.js.map +7 -0
  115. package/dist/modules/sso/setup.js +47 -0
  116. package/dist/modules/sso/setup.js.map +7 -0
  117. package/dist/modules/sso/subscribers/user-deleted-cleanup.js +21 -0
  118. package/dist/modules/sso/subscribers/user-deleted-cleanup.js.map +7 -0
  119. package/dist/modules/sso/widgets/injection/login-sso/widget.client.js +106 -0
  120. package/dist/modules/sso/widgets/injection/login-sso/widget.client.js.map +7 -0
  121. package/dist/modules/sso/widgets/injection/login-sso/widget.js +16 -0
  122. package/dist/modules/sso/widgets/injection/login-sso/widget.js.map +7 -0
  123. package/dist/modules/sso/widgets/injection-table.js +14 -0
  124. package/dist/modules/sso/widgets/injection-table.js.map +7 -0
  125. package/package.json +5 -4
  126. package/src/index.ts +1 -1
  127. package/src/modules/sso/acl.ts +7 -0
  128. package/src/modules/sso/api/admin-context.ts +36 -0
  129. package/src/modules/sso/api/callback/oidc/route.ts +115 -0
  130. package/src/modules/sso/api/config/[id]/activate/route.ts +53 -0
  131. package/src/modules/sso/api/config/[id]/domains/route.ts +107 -0
  132. package/src/modules/sso/api/config/[id]/route.ts +114 -0
  133. package/src/modules/sso/api/config/[id]/test/route.ts +44 -0
  134. package/src/modules/sso/api/config/route.ts +88 -0
  135. package/src/modules/sso/api/error-handler.ts +36 -0
  136. package/src/modules/sso/api/hrd/route.ts +55 -0
  137. package/src/modules/sso/api/initiate/route.ts +70 -0
  138. package/src/modules/sso/api/scim/context.ts +85 -0
  139. package/src/modules/sso/api/scim/logs/route.ts +69 -0
  140. package/src/modules/sso/api/scim/tokens/[id]/route.ts +45 -0
  141. package/src/modules/sso/api/scim/tokens/route.ts +89 -0
  142. package/src/modules/sso/api/scim/v2/ServiceProviderConfig/route.ts +40 -0
  143. package/src/modules/sso/api/scim/v2/Users/[id]/route.ts +103 -0
  144. package/src/modules/sso/api/scim/v2/Users/route.ts +94 -0
  145. package/src/modules/sso/backend/page.meta.ts +29 -0
  146. package/src/modules/sso/backend/page.tsx +232 -0
  147. package/src/modules/sso/backend/sso/config/[id]/page.meta.ts +15 -0
  148. package/src/modules/sso/backend/sso/config/[id]/page.tsx +1024 -0
  149. package/src/modules/sso/backend/sso/config/new/page.meta.ts +15 -0
  150. package/src/modules/sso/backend/sso/config/new/page.tsx +463 -0
  151. package/src/modules/sso/data/entities.ts +240 -0
  152. package/src/modules/sso/data/validators.ts +140 -0
  153. package/src/modules/sso/di.ts +25 -0
  154. package/src/modules/sso/docs/entra-id-setup.md +281 -0
  155. package/src/modules/sso/docs/google-workspace-setup.md +174 -0
  156. package/src/modules/sso/docs/sso-overview.md +218 -0
  157. package/src/modules/sso/docs/sso-security-audit-2026-02-27.md +118 -0
  158. package/src/modules/sso/docs/zitadel-setup.md +195 -0
  159. package/src/modules/sso/events.ts +21 -0
  160. package/src/modules/sso/i18n/de.json +146 -0
  161. package/src/modules/sso/i18n/en.json +146 -0
  162. package/src/modules/sso/i18n/es.json +146 -0
  163. package/src/modules/sso/i18n/pl.json +146 -0
  164. package/src/modules/sso/index.ts +7 -0
  165. package/src/modules/sso/lib/domains.ts +31 -0
  166. package/src/modules/sso/lib/oidc-provider.ts +196 -0
  167. package/src/modules/sso/lib/registry.ts +13 -0
  168. package/src/modules/sso/lib/scim-filter.ts +62 -0
  169. package/src/modules/sso/lib/scim-mapper.ts +88 -0
  170. package/src/modules/sso/lib/scim-patch.ts +88 -0
  171. package/src/modules/sso/lib/scim-response.ts +40 -0
  172. package/src/modules/sso/lib/scim-utils.ts +5 -0
  173. package/src/modules/sso/lib/state-cookie.ts +79 -0
  174. package/src/modules/sso/lib/types.ts +50 -0
  175. package/src/modules/sso/migrations/.snapshot-open-mercato.json +912 -0
  176. package/src/modules/sso/migrations/Migration20260219000000_sso.ts +21 -0
  177. package/src/modules/sso/migrations/Migration20260222000000_sso_add_name.ts +13 -0
  178. package/src/modules/sso/migrations/Migration20260222000001_sso_partial_unique_org.ts +15 -0
  179. package/src/modules/sso/migrations/Migration20260223000000_scim_tables.ts +24 -0
  180. package/src/modules/sso/migrations/Migration20260224000000_sso_external_id.ts +15 -0
  181. package/src/modules/sso/migrations/Migration20260224100000_sso_role_grants.ts +18 -0
  182. package/src/modules/sso/migrations/Migration20260224200000_drop_default_role_id.ts +13 -0
  183. package/src/modules/sso/migrations/Migration20260225000000_sso_identities_partial_unique.ts +25 -0
  184. package/src/modules/sso/migrations/Migration20260305000000_sso_role_grants_org_id.ts +14 -0
  185. package/src/modules/sso/services/accountLinkingService.ts +386 -0
  186. package/src/modules/sso/services/hrdService.ts +22 -0
  187. package/src/modules/sso/services/scimService.ts +461 -0
  188. package/src/modules/sso/services/scimTokenService.ts +136 -0
  189. package/src/modules/sso/services/ssoConfigService.ts +337 -0
  190. package/src/modules/sso/services/ssoService.ts +167 -0
  191. package/src/modules/sso/setup.ts +56 -0
  192. package/src/modules/sso/subscribers/user-deleted-cleanup.ts +33 -0
  193. package/src/modules/sso/widgets/injection/login-sso/widget.client.tsx +130 -0
  194. package/src/modules/sso/widgets/injection/login-sso/widget.ts +16 -0
  195. package/src/modules/sso/widgets/injection-table.ts +12 -0
@@ -0,0 +1,912 @@
1
+ {
2
+ "namespaces": [
3
+ "public"
4
+ ],
5
+ "name": "public",
6
+ "tables": [
7
+ {
8
+ "columns": {
9
+ "id": {
10
+ "name": "id",
11
+ "type": "uuid",
12
+ "unsigned": false,
13
+ "autoincrement": false,
14
+ "primary": false,
15
+ "nullable": false,
16
+ "default": "gen_random_uuid()",
17
+ "mappedType": "uuid"
18
+ },
19
+ "tenant_id": {
20
+ "name": "tenant_id",
21
+ "type": "uuid",
22
+ "unsigned": false,
23
+ "autoincrement": false,
24
+ "primary": false,
25
+ "nullable": true,
26
+ "mappedType": "uuid"
27
+ },
28
+ "organization_id": {
29
+ "name": "organization_id",
30
+ "type": "uuid",
31
+ "unsigned": false,
32
+ "autoincrement": false,
33
+ "primary": false,
34
+ "nullable": false,
35
+ "mappedType": "uuid"
36
+ },
37
+ "sso_config_id": {
38
+ "name": "sso_config_id",
39
+ "type": "uuid",
40
+ "unsigned": false,
41
+ "autoincrement": false,
42
+ "primary": false,
43
+ "nullable": false,
44
+ "mappedType": "uuid"
45
+ },
46
+ "operation": {
47
+ "name": "operation",
48
+ "type": "text",
49
+ "unsigned": false,
50
+ "autoincrement": false,
51
+ "primary": false,
52
+ "nullable": false,
53
+ "mappedType": "text"
54
+ },
55
+ "resource_type": {
56
+ "name": "resource_type",
57
+ "type": "text",
58
+ "unsigned": false,
59
+ "autoincrement": false,
60
+ "primary": false,
61
+ "nullable": false,
62
+ "mappedType": "text"
63
+ },
64
+ "resource_id": {
65
+ "name": "resource_id",
66
+ "type": "uuid",
67
+ "unsigned": false,
68
+ "autoincrement": false,
69
+ "primary": false,
70
+ "nullable": true,
71
+ "mappedType": "uuid"
72
+ },
73
+ "scim_external_id": {
74
+ "name": "scim_external_id",
75
+ "type": "text",
76
+ "unsigned": false,
77
+ "autoincrement": false,
78
+ "primary": false,
79
+ "nullable": true,
80
+ "mappedType": "text"
81
+ },
82
+ "response_status": {
83
+ "name": "response_status",
84
+ "type": "int",
85
+ "unsigned": false,
86
+ "autoincrement": false,
87
+ "primary": false,
88
+ "nullable": false,
89
+ "mappedType": "integer"
90
+ },
91
+ "error_message": {
92
+ "name": "error_message",
93
+ "type": "text",
94
+ "unsigned": false,
95
+ "autoincrement": false,
96
+ "primary": false,
97
+ "nullable": true,
98
+ "mappedType": "text"
99
+ },
100
+ "created_at": {
101
+ "name": "created_at",
102
+ "type": "timestamptz",
103
+ "unsigned": false,
104
+ "autoincrement": false,
105
+ "primary": false,
106
+ "nullable": false,
107
+ "length": 6,
108
+ "mappedType": "datetime"
109
+ }
110
+ },
111
+ "name": "scim_provisioning_log",
112
+ "schema": "public",
113
+ "indexes": [
114
+ {
115
+ "keyName": "scim_provisioning_log_config_created_idx",
116
+ "columnNames": [
117
+ "sso_config_id",
118
+ "created_at"
119
+ ],
120
+ "composite": true,
121
+ "constraint": false,
122
+ "primary": false,
123
+ "unique": false
124
+ },
125
+ {
126
+ "keyName": "scim_provisioning_log_pkey",
127
+ "columnNames": [
128
+ "id"
129
+ ],
130
+ "composite": false,
131
+ "constraint": true,
132
+ "primary": true,
133
+ "unique": true
134
+ }
135
+ ],
136
+ "checks": [],
137
+ "foreignKeys": {},
138
+ "nativeEnums": {}
139
+ },
140
+ {
141
+ "columns": {
142
+ "id": {
143
+ "name": "id",
144
+ "type": "uuid",
145
+ "unsigned": false,
146
+ "autoincrement": false,
147
+ "primary": false,
148
+ "nullable": false,
149
+ "default": "gen_random_uuid()",
150
+ "mappedType": "uuid"
151
+ },
152
+ "tenant_id": {
153
+ "name": "tenant_id",
154
+ "type": "uuid",
155
+ "unsigned": false,
156
+ "autoincrement": false,
157
+ "primary": false,
158
+ "nullable": true,
159
+ "mappedType": "uuid"
160
+ },
161
+ "organization_id": {
162
+ "name": "organization_id",
163
+ "type": "uuid",
164
+ "unsigned": false,
165
+ "autoincrement": false,
166
+ "primary": false,
167
+ "nullable": false,
168
+ "mappedType": "uuid"
169
+ },
170
+ "sso_config_id": {
171
+ "name": "sso_config_id",
172
+ "type": "uuid",
173
+ "unsigned": false,
174
+ "autoincrement": false,
175
+ "primary": false,
176
+ "nullable": false,
177
+ "mappedType": "uuid"
178
+ },
179
+ "name": {
180
+ "name": "name",
181
+ "type": "text",
182
+ "unsigned": false,
183
+ "autoincrement": false,
184
+ "primary": false,
185
+ "nullable": false,
186
+ "mappedType": "text"
187
+ },
188
+ "token_hash": {
189
+ "name": "token_hash",
190
+ "type": "text",
191
+ "unsigned": false,
192
+ "autoincrement": false,
193
+ "primary": false,
194
+ "nullable": false,
195
+ "mappedType": "text"
196
+ },
197
+ "token_prefix": {
198
+ "name": "token_prefix",
199
+ "type": "text",
200
+ "unsigned": false,
201
+ "autoincrement": false,
202
+ "primary": false,
203
+ "nullable": false,
204
+ "mappedType": "text"
205
+ },
206
+ "is_active": {
207
+ "name": "is_active",
208
+ "type": "boolean",
209
+ "unsigned": false,
210
+ "autoincrement": false,
211
+ "primary": false,
212
+ "nullable": false,
213
+ "default": "true",
214
+ "mappedType": "boolean"
215
+ },
216
+ "created_by": {
217
+ "name": "created_by",
218
+ "type": "uuid",
219
+ "unsigned": false,
220
+ "autoincrement": false,
221
+ "primary": false,
222
+ "nullable": true,
223
+ "mappedType": "uuid"
224
+ },
225
+ "created_at": {
226
+ "name": "created_at",
227
+ "type": "timestamptz",
228
+ "unsigned": false,
229
+ "autoincrement": false,
230
+ "primary": false,
231
+ "nullable": false,
232
+ "length": 6,
233
+ "mappedType": "datetime"
234
+ },
235
+ "updated_at": {
236
+ "name": "updated_at",
237
+ "type": "timestamptz",
238
+ "unsigned": false,
239
+ "autoincrement": false,
240
+ "primary": false,
241
+ "nullable": false,
242
+ "length": 6,
243
+ "mappedType": "datetime"
244
+ }
245
+ },
246
+ "name": "scim_tokens",
247
+ "schema": "public",
248
+ "indexes": [
249
+ {
250
+ "columnNames": [
251
+ "sso_config_id"
252
+ ],
253
+ "composite": false,
254
+ "keyName": "scim_tokens_sso_config_id_idx",
255
+ "constraint": false,
256
+ "primary": false,
257
+ "unique": false
258
+ },
259
+ {
260
+ "keyName": "scim_tokens_token_prefix_idx",
261
+ "columnNames": [
262
+ "token_prefix"
263
+ ],
264
+ "composite": false,
265
+ "constraint": false,
266
+ "primary": false,
267
+ "unique": false
268
+ },
269
+ {
270
+ "keyName": "scim_tokens_pkey",
271
+ "columnNames": [
272
+ "id"
273
+ ],
274
+ "composite": false,
275
+ "constraint": true,
276
+ "primary": true,
277
+ "unique": true
278
+ }
279
+ ],
280
+ "checks": [],
281
+ "foreignKeys": {},
282
+ "nativeEnums": {}
283
+ },
284
+ {
285
+ "columns": {
286
+ "id": {
287
+ "name": "id",
288
+ "type": "uuid",
289
+ "unsigned": false,
290
+ "autoincrement": false,
291
+ "primary": false,
292
+ "nullable": false,
293
+ "default": "gen_random_uuid()",
294
+ "mappedType": "uuid"
295
+ },
296
+ "tenant_id": {
297
+ "name": "tenant_id",
298
+ "type": "uuid",
299
+ "unsigned": false,
300
+ "autoincrement": false,
301
+ "primary": false,
302
+ "nullable": true,
303
+ "mappedType": "uuid"
304
+ },
305
+ "organization_id": {
306
+ "name": "organization_id",
307
+ "type": "uuid",
308
+ "unsigned": false,
309
+ "autoincrement": false,
310
+ "primary": false,
311
+ "nullable": false,
312
+ "mappedType": "uuid"
313
+ },
314
+ "name": {
315
+ "name": "name",
316
+ "type": "text",
317
+ "unsigned": false,
318
+ "autoincrement": false,
319
+ "primary": false,
320
+ "nullable": true,
321
+ "mappedType": "text"
322
+ },
323
+ "protocol": {
324
+ "name": "protocol",
325
+ "type": "text",
326
+ "unsigned": false,
327
+ "autoincrement": false,
328
+ "primary": false,
329
+ "nullable": false,
330
+ "mappedType": "text"
331
+ },
332
+ "issuer": {
333
+ "name": "issuer",
334
+ "type": "text",
335
+ "unsigned": false,
336
+ "autoincrement": false,
337
+ "primary": false,
338
+ "nullable": true,
339
+ "mappedType": "text"
340
+ },
341
+ "client_id": {
342
+ "name": "client_id",
343
+ "type": "text",
344
+ "unsigned": false,
345
+ "autoincrement": false,
346
+ "primary": false,
347
+ "nullable": true,
348
+ "mappedType": "text"
349
+ },
350
+ "client_secret_enc": {
351
+ "name": "client_secret_enc",
352
+ "type": "text",
353
+ "unsigned": false,
354
+ "autoincrement": false,
355
+ "primary": false,
356
+ "nullable": true,
357
+ "mappedType": "text"
358
+ },
359
+ "allowed_domains": {
360
+ "name": "allowed_domains",
361
+ "type": "jsonb",
362
+ "unsigned": false,
363
+ "autoincrement": false,
364
+ "primary": false,
365
+ "nullable": false,
366
+ "default": "'[]'",
367
+ "mappedType": "json"
368
+ },
369
+ "jit_enabled": {
370
+ "name": "jit_enabled",
371
+ "type": "boolean",
372
+ "unsigned": false,
373
+ "autoincrement": false,
374
+ "primary": false,
375
+ "nullable": false,
376
+ "default": "true",
377
+ "mappedType": "boolean"
378
+ },
379
+ "auto_link_by_email": {
380
+ "name": "auto_link_by_email",
381
+ "type": "boolean",
382
+ "unsigned": false,
383
+ "autoincrement": false,
384
+ "primary": false,
385
+ "nullable": false,
386
+ "default": "true",
387
+ "mappedType": "boolean"
388
+ },
389
+ "is_active": {
390
+ "name": "is_active",
391
+ "type": "boolean",
392
+ "unsigned": false,
393
+ "autoincrement": false,
394
+ "primary": false,
395
+ "nullable": false,
396
+ "default": "false",
397
+ "mappedType": "boolean"
398
+ },
399
+ "sso_required": {
400
+ "name": "sso_required",
401
+ "type": "boolean",
402
+ "unsigned": false,
403
+ "autoincrement": false,
404
+ "primary": false,
405
+ "nullable": false,
406
+ "default": "false",
407
+ "mappedType": "boolean"
408
+ },
409
+ "app_role_mappings": {
410
+ "name": "app_role_mappings",
411
+ "type": "jsonb",
412
+ "unsigned": false,
413
+ "autoincrement": false,
414
+ "primary": false,
415
+ "nullable": false,
416
+ "default": "'{}'",
417
+ "mappedType": "json"
418
+ },
419
+ "created_at": {
420
+ "name": "created_at",
421
+ "type": "timestamptz",
422
+ "unsigned": false,
423
+ "autoincrement": false,
424
+ "primary": false,
425
+ "nullable": false,
426
+ "length": 6,
427
+ "mappedType": "datetime"
428
+ },
429
+ "updated_at": {
430
+ "name": "updated_at",
431
+ "type": "timestamptz",
432
+ "unsigned": false,
433
+ "autoincrement": false,
434
+ "primary": false,
435
+ "nullable": false,
436
+ "length": 6,
437
+ "mappedType": "datetime"
438
+ },
439
+ "deleted_at": {
440
+ "name": "deleted_at",
441
+ "type": "timestamptz",
442
+ "unsigned": false,
443
+ "autoincrement": false,
444
+ "primary": false,
445
+ "nullable": true,
446
+ "length": 6,
447
+ "mappedType": "datetime"
448
+ }
449
+ },
450
+ "name": "sso_configs",
451
+ "schema": "public",
452
+ "indexes": [
453
+ {
454
+ "keyName": "sso_configs_pkey",
455
+ "columnNames": [
456
+ "id"
457
+ ],
458
+ "composite": false,
459
+ "constraint": true,
460
+ "primary": true,
461
+ "unique": true
462
+ }
463
+ ],
464
+ "checks": [],
465
+ "foreignKeys": {},
466
+ "nativeEnums": {}
467
+ },
468
+ {
469
+ "columns": {
470
+ "id": {
471
+ "name": "id",
472
+ "type": "uuid",
473
+ "unsigned": false,
474
+ "autoincrement": false,
475
+ "primary": false,
476
+ "nullable": false,
477
+ "default": "gen_random_uuid()",
478
+ "mappedType": "uuid"
479
+ },
480
+ "tenant_id": {
481
+ "name": "tenant_id",
482
+ "type": "uuid",
483
+ "unsigned": false,
484
+ "autoincrement": false,
485
+ "primary": false,
486
+ "nullable": true,
487
+ "mappedType": "uuid"
488
+ },
489
+ "organization_id": {
490
+ "name": "organization_id",
491
+ "type": "uuid",
492
+ "unsigned": false,
493
+ "autoincrement": false,
494
+ "primary": false,
495
+ "nullable": false,
496
+ "mappedType": "uuid"
497
+ },
498
+ "sso_config_id": {
499
+ "name": "sso_config_id",
500
+ "type": "uuid",
501
+ "unsigned": false,
502
+ "autoincrement": false,
503
+ "primary": false,
504
+ "nullable": false,
505
+ "mappedType": "uuid"
506
+ },
507
+ "user_id": {
508
+ "name": "user_id",
509
+ "type": "uuid",
510
+ "unsigned": false,
511
+ "autoincrement": false,
512
+ "primary": false,
513
+ "nullable": false,
514
+ "mappedType": "uuid"
515
+ },
516
+ "idp_subject": {
517
+ "name": "idp_subject",
518
+ "type": "text",
519
+ "unsigned": false,
520
+ "autoincrement": false,
521
+ "primary": false,
522
+ "nullable": false,
523
+ "mappedType": "text"
524
+ },
525
+ "idp_email": {
526
+ "name": "idp_email",
527
+ "type": "text",
528
+ "unsigned": false,
529
+ "autoincrement": false,
530
+ "primary": false,
531
+ "nullable": false,
532
+ "mappedType": "text"
533
+ },
534
+ "idp_name": {
535
+ "name": "idp_name",
536
+ "type": "text",
537
+ "unsigned": false,
538
+ "autoincrement": false,
539
+ "primary": false,
540
+ "nullable": true,
541
+ "mappedType": "text"
542
+ },
543
+ "idp_groups": {
544
+ "name": "idp_groups",
545
+ "type": "jsonb",
546
+ "unsigned": false,
547
+ "autoincrement": false,
548
+ "primary": false,
549
+ "nullable": false,
550
+ "default": "'[]'",
551
+ "mappedType": "json"
552
+ },
553
+ "external_id": {
554
+ "name": "external_id",
555
+ "type": "text",
556
+ "unsigned": false,
557
+ "autoincrement": false,
558
+ "primary": false,
559
+ "nullable": true,
560
+ "mappedType": "text"
561
+ },
562
+ "provisioning_method": {
563
+ "name": "provisioning_method",
564
+ "type": "text",
565
+ "unsigned": false,
566
+ "autoincrement": false,
567
+ "primary": false,
568
+ "nullable": false,
569
+ "mappedType": "text"
570
+ },
571
+ "first_login_at": {
572
+ "name": "first_login_at",
573
+ "type": "timestamptz",
574
+ "unsigned": false,
575
+ "autoincrement": false,
576
+ "primary": false,
577
+ "nullable": true,
578
+ "length": 6,
579
+ "mappedType": "datetime"
580
+ },
581
+ "last_login_at": {
582
+ "name": "last_login_at",
583
+ "type": "timestamptz",
584
+ "unsigned": false,
585
+ "autoincrement": false,
586
+ "primary": false,
587
+ "nullable": true,
588
+ "length": 6,
589
+ "mappedType": "datetime"
590
+ },
591
+ "created_at": {
592
+ "name": "created_at",
593
+ "type": "timestamptz",
594
+ "unsigned": false,
595
+ "autoincrement": false,
596
+ "primary": false,
597
+ "nullable": false,
598
+ "length": 6,
599
+ "mappedType": "datetime"
600
+ },
601
+ "updated_at": {
602
+ "name": "updated_at",
603
+ "type": "timestamptz",
604
+ "unsigned": false,
605
+ "autoincrement": false,
606
+ "primary": false,
607
+ "nullable": false,
608
+ "length": 6,
609
+ "mappedType": "datetime"
610
+ },
611
+ "deleted_at": {
612
+ "name": "deleted_at",
613
+ "type": "timestamptz",
614
+ "unsigned": false,
615
+ "autoincrement": false,
616
+ "primary": false,
617
+ "nullable": true,
618
+ "length": 6,
619
+ "mappedType": "datetime"
620
+ }
621
+ },
622
+ "name": "sso_identities",
623
+ "schema": "public",
624
+ "indexes": [
625
+ {
626
+ "columnNames": [
627
+ "sso_config_id"
628
+ ],
629
+ "composite": false,
630
+ "keyName": "sso_identities_config_id_idx",
631
+ "constraint": false,
632
+ "primary": false,
633
+ "unique": false
634
+ },
635
+ {
636
+ "columnNames": [
637
+ "user_id"
638
+ ],
639
+ "composite": false,
640
+ "keyName": "sso_identities_user_id_idx",
641
+ "constraint": false,
642
+ "primary": false,
643
+ "unique": false
644
+ },
645
+ {
646
+ "keyName": "sso_identities_config_external_id_unique",
647
+ "columnNames": [
648
+ "sso_config_id",
649
+ "external_id"
650
+ ],
651
+ "composite": true,
652
+ "constraint": true,
653
+ "primary": false,
654
+ "unique": true
655
+ },
656
+ {
657
+ "keyName": "sso_identities_config_subject_unique",
658
+ "columnNames": [
659
+ "sso_config_id",
660
+ "idp_subject"
661
+ ],
662
+ "composite": true,
663
+ "constraint": true,
664
+ "primary": false,
665
+ "unique": true
666
+ },
667
+ {
668
+ "keyName": "sso_identities_config_user_unique",
669
+ "columnNames": [
670
+ "sso_config_id",
671
+ "user_id"
672
+ ],
673
+ "composite": true,
674
+ "constraint": true,
675
+ "primary": false,
676
+ "unique": true
677
+ },
678
+ {
679
+ "keyName": "sso_identities_pkey",
680
+ "columnNames": [
681
+ "id"
682
+ ],
683
+ "composite": false,
684
+ "constraint": true,
685
+ "primary": true,
686
+ "unique": true
687
+ }
688
+ ],
689
+ "checks": [],
690
+ "foreignKeys": {},
691
+ "nativeEnums": {}
692
+ },
693
+ {
694
+ "columns": {
695
+ "id": {
696
+ "name": "id",
697
+ "type": "uuid",
698
+ "unsigned": false,
699
+ "autoincrement": false,
700
+ "primary": false,
701
+ "nullable": false,
702
+ "default": "gen_random_uuid()",
703
+ "mappedType": "uuid"
704
+ },
705
+ "tenant_id": {
706
+ "name": "tenant_id",
707
+ "type": "uuid",
708
+ "unsigned": false,
709
+ "autoincrement": false,
710
+ "primary": false,
711
+ "nullable": true,
712
+ "mappedType": "uuid"
713
+ },
714
+ "user_id": {
715
+ "name": "user_id",
716
+ "type": "uuid",
717
+ "unsigned": false,
718
+ "autoincrement": false,
719
+ "primary": false,
720
+ "nullable": false,
721
+ "mappedType": "uuid"
722
+ },
723
+ "role_id": {
724
+ "name": "role_id",
725
+ "type": "uuid",
726
+ "unsigned": false,
727
+ "autoincrement": false,
728
+ "primary": false,
729
+ "nullable": false,
730
+ "mappedType": "uuid"
731
+ },
732
+ "sso_config_id": {
733
+ "name": "sso_config_id",
734
+ "type": "uuid",
735
+ "unsigned": false,
736
+ "autoincrement": false,
737
+ "primary": false,
738
+ "nullable": false,
739
+ "mappedType": "uuid"
740
+ },
741
+ "created_at": {
742
+ "name": "created_at",
743
+ "type": "timestamptz",
744
+ "unsigned": false,
745
+ "autoincrement": false,
746
+ "primary": false,
747
+ "nullable": false,
748
+ "length": 6,
749
+ "mappedType": "datetime"
750
+ }
751
+ },
752
+ "name": "sso_role_grants",
753
+ "schema": "public",
754
+ "indexes": [
755
+ {
756
+ "columnNames": [
757
+ "user_id"
758
+ ],
759
+ "composite": false,
760
+ "keyName": "sso_role_grants_user_id_idx",
761
+ "constraint": false,
762
+ "primary": false,
763
+ "unique": false
764
+ },
765
+ {
766
+ "keyName": "sso_role_grants_user_role_config_unique",
767
+ "columnNames": [
768
+ "user_id",
769
+ "role_id",
770
+ "sso_config_id"
771
+ ],
772
+ "composite": true,
773
+ "constraint": true,
774
+ "primary": false,
775
+ "unique": true
776
+ },
777
+ {
778
+ "keyName": "sso_role_grants_pkey",
779
+ "columnNames": [
780
+ "id"
781
+ ],
782
+ "composite": false,
783
+ "constraint": true,
784
+ "primary": true,
785
+ "unique": true
786
+ }
787
+ ],
788
+ "checks": [],
789
+ "foreignKeys": {},
790
+ "nativeEnums": {}
791
+ },
792
+ {
793
+ "columns": {
794
+ "id": {
795
+ "name": "id",
796
+ "type": "uuid",
797
+ "unsigned": false,
798
+ "autoincrement": false,
799
+ "primary": false,
800
+ "nullable": false,
801
+ "default": "gen_random_uuid()",
802
+ "mappedType": "uuid"
803
+ },
804
+ "tenant_id": {
805
+ "name": "tenant_id",
806
+ "type": "uuid",
807
+ "unsigned": false,
808
+ "autoincrement": false,
809
+ "primary": false,
810
+ "nullable": true,
811
+ "mappedType": "uuid"
812
+ },
813
+ "organization_id": {
814
+ "name": "organization_id",
815
+ "type": "uuid",
816
+ "unsigned": false,
817
+ "autoincrement": false,
818
+ "primary": false,
819
+ "nullable": false,
820
+ "mappedType": "uuid"
821
+ },
822
+ "user_id": {
823
+ "name": "user_id",
824
+ "type": "uuid",
825
+ "unsigned": false,
826
+ "autoincrement": false,
827
+ "primary": false,
828
+ "nullable": false,
829
+ "mappedType": "uuid"
830
+ },
831
+ "sso_config_id": {
832
+ "name": "sso_config_id",
833
+ "type": "uuid",
834
+ "unsigned": false,
835
+ "autoincrement": false,
836
+ "primary": false,
837
+ "nullable": false,
838
+ "mappedType": "uuid"
839
+ },
840
+ "deactivated_at": {
841
+ "name": "deactivated_at",
842
+ "type": "timestamptz",
843
+ "unsigned": false,
844
+ "autoincrement": false,
845
+ "primary": false,
846
+ "nullable": false,
847
+ "length": 6,
848
+ "mappedType": "datetime"
849
+ },
850
+ "reactivated_at": {
851
+ "name": "reactivated_at",
852
+ "type": "timestamptz",
853
+ "unsigned": false,
854
+ "autoincrement": false,
855
+ "primary": false,
856
+ "nullable": true,
857
+ "length": 6,
858
+ "mappedType": "datetime"
859
+ },
860
+ "created_at": {
861
+ "name": "created_at",
862
+ "type": "timestamptz",
863
+ "unsigned": false,
864
+ "autoincrement": false,
865
+ "primary": false,
866
+ "nullable": false,
867
+ "length": 6,
868
+ "mappedType": "datetime"
869
+ }
870
+ },
871
+ "name": "sso_user_deactivations",
872
+ "schema": "public",
873
+ "indexes": [
874
+ {
875
+ "columnNames": [
876
+ "user_id"
877
+ ],
878
+ "composite": false,
879
+ "keyName": "sso_user_deactivations_user_id_idx",
880
+ "constraint": false,
881
+ "primary": false,
882
+ "unique": false
883
+ },
884
+ {
885
+ "keyName": "sso_user_deactivations_user_config_unique",
886
+ "columnNames": [
887
+ "user_id",
888
+ "sso_config_id"
889
+ ],
890
+ "composite": true,
891
+ "constraint": true,
892
+ "primary": false,
893
+ "unique": true
894
+ },
895
+ {
896
+ "keyName": "sso_user_deactivations_pkey",
897
+ "columnNames": [
898
+ "id"
899
+ ],
900
+ "composite": false,
901
+ "constraint": true,
902
+ "primary": true,
903
+ "unique": true
904
+ }
905
+ ],
906
+ "checks": [],
907
+ "foreignKeys": {},
908
+ "nativeEnums": {}
909
+ }
910
+ ],
911
+ "nativeEnums": {}
912
+ }