@superblocksteam/shared 0.9545.1 → 0.9546.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/dist/jwt/verifier.d.ts +1 -0
- package/dist/jwt/verifier.d.ts.map +1 -1
- package/dist/jwt/verifier.js +4 -1
- package/dist/jwt/verifier.js.map +1 -1
- package/dist/plugins/templates/databricks.d.ts +1 -0
- package/dist/plugins/templates/databricks.d.ts.map +1 -1
- package/dist/plugins/templates/databricks.js +27 -3
- package/dist/plugins/templates/databricks.js.map +1 -1
- package/dist/plugins/templates/shared/sshtunnel.d.ts.map +1 -1
- package/dist/plugins/templates/shared/sshtunnel.js +0 -1
- package/dist/plugins/templates/shared/sshtunnel.js.map +1 -1
- package/dist/types/ai/index.d.ts +2 -0
- package/dist/types/ai/index.d.ts.map +1 -1
- package/dist/types/datasource/index.d.ts +14 -0
- package/dist/types/datasource/index.d.ts.map +1 -1
- package/dist/types/datasource/index.js +36 -2
- package/dist/types/datasource/index.js.map +1 -1
- package/dist/types/datasource/index.test.d.ts +2 -0
- package/dist/types/datasource/index.test.d.ts.map +1 -0
- package/dist/types/datasource/index.test.js +421 -0
- package/dist/types/datasource/index.test.js.map +1 -0
- package/dist/types/plugin/integration.d.ts +2 -1
- package/dist/types/plugin/integration.d.ts.map +1 -1
- package/dist/types/plugin/integration.js +3 -1
- package/dist/types/plugin/integration.js.map +1 -1
- package/dist-esm/jwt/verifier.d.ts +1 -0
- package/dist-esm/jwt/verifier.d.ts.map +1 -1
- package/dist-esm/jwt/verifier.js +4 -1
- package/dist-esm/jwt/verifier.js.map +1 -1
- package/dist-esm/plugins/templates/databricks.d.ts +1 -0
- package/dist-esm/plugins/templates/databricks.d.ts.map +1 -1
- package/dist-esm/plugins/templates/databricks.js +27 -3
- package/dist-esm/plugins/templates/databricks.js.map +1 -1
- package/dist-esm/plugins/templates/shared/sshtunnel.d.ts.map +1 -1
- package/dist-esm/plugins/templates/shared/sshtunnel.js +0 -1
- package/dist-esm/plugins/templates/shared/sshtunnel.js.map +1 -1
- package/dist-esm/types/ai/index.d.ts +2 -0
- package/dist-esm/types/ai/index.d.ts.map +1 -1
- package/dist-esm/types/datasource/index.d.ts +14 -0
- package/dist-esm/types/datasource/index.d.ts.map +1 -1
- package/dist-esm/types/datasource/index.js +33 -1
- package/dist-esm/types/datasource/index.js.map +1 -1
- package/dist-esm/types/datasource/index.test.d.ts +2 -0
- package/dist-esm/types/datasource/index.test.d.ts.map +1 -0
- package/dist-esm/types/datasource/index.test.js +419 -0
- package/dist-esm/types/datasource/index.test.js.map +1 -0
- package/dist-esm/types/plugin/integration.d.ts +2 -1
- package/dist-esm/types/plugin/integration.d.ts.map +1 -1
- package/dist-esm/types/plugin/integration.js +3 -1
- package/dist-esm/types/plugin/integration.js.map +1 -1
- package/package.json +2 -2
- package/src/jwt/verifier.ts +6 -1
- package/src/plugins/templates/databricks.ts +29 -3
- package/src/plugins/templates/shared/sshtunnel.ts +0 -1
- package/src/types/ai/index.ts +2 -0
- package/src/types/datasource/index.test.ts +499 -0
- package/src/types/datasource/index.ts +45 -1
- package/src/types/plugin/integration.ts +4 -2
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { IntegrationAuthType } from './auth.js';
|
|
2
|
+
import { isAuthenticatedDatasourceConfig, isAuthenticatedDatasourceConfigWithDynamicAuthType, getAuthTypeFromConfig } from './index.js';
|
|
3
|
+
describe('isAuthenticatedDatasourceConfig', () => {
|
|
4
|
+
test('returns true for config with authConfig and authType', () => {
|
|
5
|
+
const config = {
|
|
6
|
+
name: 'test',
|
|
7
|
+
authConfig: {
|
|
8
|
+
clientId: 'test-client',
|
|
9
|
+
clientSecret: 'test-secret'
|
|
10
|
+
},
|
|
11
|
+
authType: IntegrationAuthType.OAUTH2_CODE
|
|
12
|
+
};
|
|
13
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
test('returns false for config with authConfig and authTypeField', () => {
|
|
16
|
+
const config = {
|
|
17
|
+
name: 'test',
|
|
18
|
+
authConfig: {
|
|
19
|
+
clientId: 'test-client',
|
|
20
|
+
clientSecret: 'test-secret'
|
|
21
|
+
},
|
|
22
|
+
authTypeField: 'connectionType',
|
|
23
|
+
connectionType: 'fields' // This field must exist for the test to pass
|
|
24
|
+
};
|
|
25
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
26
|
+
});
|
|
27
|
+
test('returns false for config without authConfig', () => {
|
|
28
|
+
const config = {
|
|
29
|
+
name: 'test',
|
|
30
|
+
authType: IntegrationAuthType.OAUTH2_CODE
|
|
31
|
+
};
|
|
32
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
33
|
+
});
|
|
34
|
+
test('returns false for config with authConfig but no authType or authTypeField', () => {
|
|
35
|
+
const config = {
|
|
36
|
+
name: 'test',
|
|
37
|
+
authConfig: {
|
|
38
|
+
clientId: 'test-client',
|
|
39
|
+
clientSecret: 'test-secret'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
43
|
+
});
|
|
44
|
+
test('returns false for config with authType but no authConfig', () => {
|
|
45
|
+
const config = {
|
|
46
|
+
name: 'test',
|
|
47
|
+
authType: IntegrationAuthType.OAUTH2_CODE
|
|
48
|
+
};
|
|
49
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
50
|
+
});
|
|
51
|
+
test('returns false for config with authTypeField but no authConfig', () => {
|
|
52
|
+
const config = {
|
|
53
|
+
name: 'test',
|
|
54
|
+
authTypeField: 'connectionType'
|
|
55
|
+
};
|
|
56
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
57
|
+
});
|
|
58
|
+
test('returns false for empty config', () => {
|
|
59
|
+
const config = {
|
|
60
|
+
name: 'test'
|
|
61
|
+
};
|
|
62
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
63
|
+
});
|
|
64
|
+
test('returns true for config with authConfig and both authType and authTypeField', () => {
|
|
65
|
+
const config = {
|
|
66
|
+
name: 'test',
|
|
67
|
+
authConfig: {
|
|
68
|
+
clientId: 'test-client',
|
|
69
|
+
clientSecret: 'test-secret'
|
|
70
|
+
},
|
|
71
|
+
authType: IntegrationAuthType.OAUTH2_CODE,
|
|
72
|
+
authTypeField: 'connectionType',
|
|
73
|
+
connectionType: 'fields' // This field must exist for the test to pass
|
|
74
|
+
};
|
|
75
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(true);
|
|
76
|
+
});
|
|
77
|
+
test('returns false for config with authConfig but empty authTypeField', () => {
|
|
78
|
+
const config = {
|
|
79
|
+
name: 'test',
|
|
80
|
+
authConfig: {
|
|
81
|
+
clientId: 'test-client',
|
|
82
|
+
clientSecret: 'test-secret'
|
|
83
|
+
},
|
|
84
|
+
authTypeField: ''
|
|
85
|
+
};
|
|
86
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
87
|
+
});
|
|
88
|
+
test('returns false for config with authConfig but undefined authTypeField', () => {
|
|
89
|
+
const config = {
|
|
90
|
+
name: 'test',
|
|
91
|
+
authConfig: {
|
|
92
|
+
clientId: 'test-client',
|
|
93
|
+
clientSecret: 'test-secret'
|
|
94
|
+
},
|
|
95
|
+
authTypeField: undefined
|
|
96
|
+
};
|
|
97
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
98
|
+
});
|
|
99
|
+
test('returns false for config with authConfig but authTypeField pointing to non-existent field', () => {
|
|
100
|
+
const config = {
|
|
101
|
+
name: 'test',
|
|
102
|
+
authConfig: {
|
|
103
|
+
clientId: 'test-client',
|
|
104
|
+
clientSecret: 'test-secret'
|
|
105
|
+
},
|
|
106
|
+
authTypeField: 'nonExistentField'
|
|
107
|
+
// nonExistentField is not defined in the config
|
|
108
|
+
};
|
|
109
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
110
|
+
});
|
|
111
|
+
test('returns false for config with authConfig but undefined authTypeField', () => {
|
|
112
|
+
const config = {
|
|
113
|
+
name: 'test',
|
|
114
|
+
authConfig: {
|
|
115
|
+
clientId: 'test-client',
|
|
116
|
+
clientSecret: 'test-secret'
|
|
117
|
+
},
|
|
118
|
+
authTypeField: undefined
|
|
119
|
+
};
|
|
120
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
121
|
+
});
|
|
122
|
+
test('returns false for config with authConfig and authTypeField pointing to undefined field', () => {
|
|
123
|
+
const config = {
|
|
124
|
+
name: 'test',
|
|
125
|
+
authConfig: {
|
|
126
|
+
clientId: 'test-client',
|
|
127
|
+
clientSecret: 'test-secret'
|
|
128
|
+
},
|
|
129
|
+
authTypeField: 'connectionType'
|
|
130
|
+
// connectionType is not defined, so it's undefined
|
|
131
|
+
};
|
|
132
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
133
|
+
});
|
|
134
|
+
test('returns false for config with authConfig and authTypeField pointing to undefined field', () => {
|
|
135
|
+
const config = {
|
|
136
|
+
name: 'test',
|
|
137
|
+
authConfig: {
|
|
138
|
+
clientId: 'test-client',
|
|
139
|
+
clientSecret: 'test-secret'
|
|
140
|
+
},
|
|
141
|
+
authTypeField: 'connectionType',
|
|
142
|
+
connectionType: undefined
|
|
143
|
+
};
|
|
144
|
+
expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
describe('isAuthenticatedDatasourceConfigWithDynamicAuthType', () => {
|
|
148
|
+
test('returns true for config with authConfig and valid authTypeField', () => {
|
|
149
|
+
const config = {
|
|
150
|
+
name: 'test',
|
|
151
|
+
authConfig: {
|
|
152
|
+
clientId: 'test-client',
|
|
153
|
+
clientSecret: 'test-secret'
|
|
154
|
+
},
|
|
155
|
+
authTypeField: 'connectionType',
|
|
156
|
+
connectionType: 'oauth2'
|
|
157
|
+
};
|
|
158
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
159
|
+
});
|
|
160
|
+
test('returns true for config with authConfig and authTypeField pointing to non-empty string', () => {
|
|
161
|
+
const config = {
|
|
162
|
+
name: 'test',
|
|
163
|
+
authConfig: {
|
|
164
|
+
clientId: 'test-client',
|
|
165
|
+
clientSecret: 'test-secret'
|
|
166
|
+
},
|
|
167
|
+
authTypeField: 'authMethod',
|
|
168
|
+
authMethod: 'api_key'
|
|
169
|
+
};
|
|
170
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
171
|
+
});
|
|
172
|
+
test('returns false for config without authConfig', () => {
|
|
173
|
+
const config = {
|
|
174
|
+
name: 'test',
|
|
175
|
+
authTypeField: 'connectionType',
|
|
176
|
+
connectionType: 'oauth2'
|
|
177
|
+
};
|
|
178
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
179
|
+
});
|
|
180
|
+
test('returns false for config with authConfig but no authTypeField', () => {
|
|
181
|
+
const config = {
|
|
182
|
+
name: 'test',
|
|
183
|
+
authConfig: {
|
|
184
|
+
clientId: 'test-client',
|
|
185
|
+
clientSecret: 'test-secret'
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
189
|
+
});
|
|
190
|
+
test('returns false for config with authConfig and empty authTypeField', () => {
|
|
191
|
+
const config = {
|
|
192
|
+
name: 'test',
|
|
193
|
+
authConfig: {
|
|
194
|
+
clientId: 'test-client',
|
|
195
|
+
clientSecret: 'test-secret'
|
|
196
|
+
},
|
|
197
|
+
authTypeField: '',
|
|
198
|
+
connectionType: 'oauth2'
|
|
199
|
+
};
|
|
200
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
201
|
+
});
|
|
202
|
+
test('returns false for config with authConfig and undefined authTypeField', () => {
|
|
203
|
+
const config = {
|
|
204
|
+
name: 'test',
|
|
205
|
+
authConfig: {
|
|
206
|
+
clientId: 'test-client',
|
|
207
|
+
clientSecret: 'test-secret'
|
|
208
|
+
},
|
|
209
|
+
authTypeField: undefined,
|
|
210
|
+
connectionType: 'oauth2'
|
|
211
|
+
};
|
|
212
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
213
|
+
});
|
|
214
|
+
test('returns false for config with authConfig and authTypeField pointing to undefined field', () => {
|
|
215
|
+
const config = {
|
|
216
|
+
name: 'test',
|
|
217
|
+
authConfig: {
|
|
218
|
+
clientId: 'test-client',
|
|
219
|
+
clientSecret: 'test-secret'
|
|
220
|
+
},
|
|
221
|
+
authTypeField: 'connectionType'
|
|
222
|
+
// connectionType is not defined
|
|
223
|
+
};
|
|
224
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
225
|
+
});
|
|
226
|
+
test('returns false for config with authConfig and authTypeField pointing to null field', () => {
|
|
227
|
+
const config = {
|
|
228
|
+
name: 'test',
|
|
229
|
+
authConfig: {
|
|
230
|
+
clientId: 'test-client',
|
|
231
|
+
clientSecret: 'test-secret'
|
|
232
|
+
},
|
|
233
|
+
authTypeField: 'connectionType',
|
|
234
|
+
connectionType: null
|
|
235
|
+
};
|
|
236
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
237
|
+
});
|
|
238
|
+
test('returns false for config with authConfig and authTypeField pointing to empty string', () => {
|
|
239
|
+
const config = {
|
|
240
|
+
name: 'test',
|
|
241
|
+
authConfig: {
|
|
242
|
+
clientId: 'test-client',
|
|
243
|
+
clientSecret: 'test-secret'
|
|
244
|
+
},
|
|
245
|
+
authTypeField: 'connectionType',
|
|
246
|
+
connectionType: ''
|
|
247
|
+
};
|
|
248
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
249
|
+
});
|
|
250
|
+
test('returns true for config with authConfig and authTypeField pointing to zero', () => {
|
|
251
|
+
const config = {
|
|
252
|
+
name: 'test',
|
|
253
|
+
authConfig: {
|
|
254
|
+
clientId: 'test-client',
|
|
255
|
+
clientSecret: 'test-secret'
|
|
256
|
+
},
|
|
257
|
+
authTypeField: 'connectionType',
|
|
258
|
+
connectionType: 0
|
|
259
|
+
};
|
|
260
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
261
|
+
});
|
|
262
|
+
test('returns true for config with authConfig and authTypeField pointing to false', () => {
|
|
263
|
+
const config = {
|
|
264
|
+
name: 'test',
|
|
265
|
+
authConfig: {
|
|
266
|
+
clientId: 'test-client',
|
|
267
|
+
clientSecret: 'test-secret'
|
|
268
|
+
},
|
|
269
|
+
authTypeField: 'connectionType',
|
|
270
|
+
connectionType: false
|
|
271
|
+
};
|
|
272
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
273
|
+
});
|
|
274
|
+
test('returns true for config with authConfig and authTypeField pointing to object', () => {
|
|
275
|
+
const config = {
|
|
276
|
+
name: 'test',
|
|
277
|
+
authConfig: {
|
|
278
|
+
clientId: 'test-client',
|
|
279
|
+
clientSecret: 'test-secret'
|
|
280
|
+
},
|
|
281
|
+
authTypeField: 'connectionType',
|
|
282
|
+
connectionType: { type: 'oauth2' }
|
|
283
|
+
};
|
|
284
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
285
|
+
});
|
|
286
|
+
test('returns true for config with authConfig and authTypeField pointing to array', () => {
|
|
287
|
+
const config = {
|
|
288
|
+
name: 'test',
|
|
289
|
+
authConfig: {
|
|
290
|
+
clientId: 'test-client',
|
|
291
|
+
clientSecret: 'test-secret'
|
|
292
|
+
},
|
|
293
|
+
authTypeField: 'connectionType',
|
|
294
|
+
connectionType: ['oauth2', 'api_key']
|
|
295
|
+
};
|
|
296
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
297
|
+
});
|
|
298
|
+
test('returns false for empty config', () => {
|
|
299
|
+
const config = {
|
|
300
|
+
name: 'test'
|
|
301
|
+
};
|
|
302
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
303
|
+
});
|
|
304
|
+
test('returns false for config with authConfig but authTypeField pointing to non-existent field', () => {
|
|
305
|
+
const config = {
|
|
306
|
+
name: 'test',
|
|
307
|
+
authConfig: {
|
|
308
|
+
clientId: 'test-client',
|
|
309
|
+
clientSecret: 'test-secret'
|
|
310
|
+
},
|
|
311
|
+
authTypeField: 'nonExistentField'
|
|
312
|
+
// nonExistentField is not defined in the config
|
|
313
|
+
};
|
|
314
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
|
|
315
|
+
});
|
|
316
|
+
test('returns true for config with authConfig and authTypeField pointing to numeric value', () => {
|
|
317
|
+
const config = {
|
|
318
|
+
name: 'test',
|
|
319
|
+
authConfig: {
|
|
320
|
+
clientId: 'test-client',
|
|
321
|
+
clientSecret: 'test-secret'
|
|
322
|
+
},
|
|
323
|
+
authTypeField: 'connectionType',
|
|
324
|
+
connectionType: 42
|
|
325
|
+
};
|
|
326
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
327
|
+
});
|
|
328
|
+
test('returns true for config with authConfig and authTypeField pointing to boolean true', () => {
|
|
329
|
+
const config = {
|
|
330
|
+
name: 'test',
|
|
331
|
+
authConfig: {
|
|
332
|
+
clientId: 'test-client',
|
|
333
|
+
clientSecret: 'test-secret'
|
|
334
|
+
},
|
|
335
|
+
authTypeField: 'connectionType',
|
|
336
|
+
connectionType: true
|
|
337
|
+
};
|
|
338
|
+
expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
describe('getAuthTypeFromConfig', () => {
|
|
342
|
+
test('returns authType for config with direct authType field', () => {
|
|
343
|
+
const config = {
|
|
344
|
+
name: 'test',
|
|
345
|
+
authConfig: {
|
|
346
|
+
clientId: 'test-client',
|
|
347
|
+
clientSecret: 'test-secret'
|
|
348
|
+
},
|
|
349
|
+
authType: IntegrationAuthType.OAUTH2_CODE
|
|
350
|
+
};
|
|
351
|
+
expect(getAuthTypeFromConfig(config)).toBe(IntegrationAuthType.OAUTH2_CODE);
|
|
352
|
+
});
|
|
353
|
+
test('returns authType for config with authTypeField pointing to valid field', () => {
|
|
354
|
+
const config = {
|
|
355
|
+
name: 'test',
|
|
356
|
+
authConfig: {
|
|
357
|
+
clientId: 'test-client',
|
|
358
|
+
clientSecret: 'test-secret'
|
|
359
|
+
},
|
|
360
|
+
authTypeField: 'connectionType',
|
|
361
|
+
connectionType: 'fields'
|
|
362
|
+
};
|
|
363
|
+
expect(getAuthTypeFromConfig(config)).toBe('fields');
|
|
364
|
+
});
|
|
365
|
+
test('returns undefined for non-authenticated config', () => {
|
|
366
|
+
const config = {
|
|
367
|
+
name: 'test'
|
|
368
|
+
};
|
|
369
|
+
expect(getAuthTypeFromConfig(config)).toBe(undefined);
|
|
370
|
+
});
|
|
371
|
+
test('returns undefined for config with authConfig but no authType or authTypeField', () => {
|
|
372
|
+
const config = {
|
|
373
|
+
name: 'test',
|
|
374
|
+
authConfig: {
|
|
375
|
+
clientId: 'test-client',
|
|
376
|
+
clientSecret: 'test-secret'
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
expect(getAuthTypeFromConfig(config)).toBe(undefined);
|
|
380
|
+
});
|
|
381
|
+
test('returns undefined for config with authTypeField pointing to undefined field', () => {
|
|
382
|
+
const config = {
|
|
383
|
+
name: 'test',
|
|
384
|
+
authConfig: {
|
|
385
|
+
clientId: 'test-client',
|
|
386
|
+
clientSecret: 'test-secret'
|
|
387
|
+
},
|
|
388
|
+
authTypeField: 'connectionType'
|
|
389
|
+
// connectionType is not defined
|
|
390
|
+
};
|
|
391
|
+
expect(getAuthTypeFromConfig(config)).toBe(undefined);
|
|
392
|
+
});
|
|
393
|
+
test('returns undefined for config with authTypeField pointing to undefined field', () => {
|
|
394
|
+
const config = {
|
|
395
|
+
name: 'test',
|
|
396
|
+
authConfig: {
|
|
397
|
+
clientId: 'test-client',
|
|
398
|
+
clientSecret: 'test-secret'
|
|
399
|
+
},
|
|
400
|
+
authTypeField: 'connectionType',
|
|
401
|
+
connectionType: undefined
|
|
402
|
+
};
|
|
403
|
+
expect(getAuthTypeFromConfig(config)).toBe(undefined);
|
|
404
|
+
});
|
|
405
|
+
test('prioritizes direct authType over authTypeField', () => {
|
|
406
|
+
const config = {
|
|
407
|
+
name: 'test',
|
|
408
|
+
authConfig: {
|
|
409
|
+
clientId: 'test-client',
|
|
410
|
+
clientSecret: 'test-secret'
|
|
411
|
+
},
|
|
412
|
+
authType: IntegrationAuthType.OAUTH2_CODE,
|
|
413
|
+
authTypeField: 'connectionType',
|
|
414
|
+
connectionType: 'fields'
|
|
415
|
+
};
|
|
416
|
+
expect(getAuthTypeFromConfig(config)).toBe(IntegrationAuthType.OAUTH2_CODE);
|
|
417
|
+
});
|
|
418
|
+
});
|
|
419
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/types/datasource/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAEL,+BAA+B,EAC/B,kDAAkD,EAClD,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,IAAI,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAChE,MAAM,MAAM,GAA4B;YACtC,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,aAAa;gBACvB,YAAY,EAAE,aAAa;aAC5B;YACD,QAAQ,EAAE,mBAAmB,CAAC,WAAW;SAC1C,CAAC;QAEF,MAAM,CAAC,+BAA+B,CAAC,MAAM,CAA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ATABRICKS = "databricks"
|
|
47
48
|
}
|
|
48
49
|
export declare const ExtendedIntegrationPluginMap: Record<string, string>;
|
|
49
50
|
export declare const EXTENDED_INTEGRATION_PLUGIN_IDS: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/integration.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,2BAA2B,QAA2C,CAAC;AACpF,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,kCAAkC,sCAAsC,CAAC;AAEtF,oBAAY,2BAA2B;IACrC,OAAO,uBAAuB;IAC9B,QAAQ,uBAAuB;IAE/B,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,YAAY,gBAAgB;IAC5B,gBAAgB,oBAAoB;IACpC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;IAEvB,uBAAuB,YAAY;IACnC,SAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"integ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AAM,kBAAkB,yBAAoB,OAElD,CAAC;AAQF,eAAO,MAAM,eAAe,yBAAoB,MAE/C,CAAC;AAEF,eAAO,MAAM,+BAA+B,yBAAoB,OAE/D,CAAC;AAEF,eAAO,MAAM,8BAA8B,yBAAoB,OAO9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAAoB,OAMvD,CAAC"}
|
|
@@ -47,6 +47,7 @@ export var ExtendedIntegrationPluginId;
|
|
|
47
47
|
// Not native OpenAPI-backed integrations, but leveraging the same auth system
|
|
48
48
|
ExtendedIntegrationPluginId["GOOGLE_SHEETS_PLUGIN_ID"] = "gsheets";
|
|
49
49
|
ExtendedIntegrationPluginId["SNOWFLAKE"] = "snowflake";
|
|
50
|
+
ExtendedIntegrationPluginId["DATABRICKS"] = "databricks";
|
|
50
51
|
})(ExtendedIntegrationPluginId || (ExtendedIntegrationPluginId = {}));
|
|
51
52
|
// Note that we cannot import the plugins themselves to reference the id as
|
|
52
53
|
// that causes a cyclical import.
|
|
@@ -113,7 +114,8 @@ export const extendsRestApiIntegrationPlugin = (pluginId = '') => {
|
|
|
113
114
|
export const extendsAnyApiIntegrationPlugin = (pluginId = '') => {
|
|
114
115
|
return (getBasePluginId(pluginId) === ExtendedIntegrationPluginId.REST_API ||
|
|
115
116
|
pluginId === ExtendedIntegrationPluginId.GRAPHQL ||
|
|
116
|
-
pluginId === ExtendedIntegrationPluginId.SNOWFLAKE
|
|
117
|
+
pluginId === ExtendedIntegrationPluginId.SNOWFLAKE ||
|
|
118
|
+
pluginId === ExtendedIntegrationPluginId.DATABRICKS);
|
|
117
119
|
};
|
|
118
120
|
export const shouldInjectAuthHeaders = (pluginId = '') => {
|
|
119
121
|
return (getBasePluginId(pluginId) === ExtendedIntegrationPluginId.REST_API &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../../../src/types/plugin/integration.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAChD,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AACjD,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,uBAAuB,EAAE,CAAC;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AACjD,MAAM,CAAC,MAAM,kCAAkC,GAAG,mCAAmC,CAAC;AAEtF,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../../../src/types/plugin/integration.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAChD,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AACjD,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,uBAAuB,EAAE,CAAC;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AACjD,MAAM,CAAC,MAAM,kCAAkC,GAAG,mCAAmC,CAAC;AAEtF,MAAM,CAAN,IAAY,2BA4CX;AA5CD,WAAY,2BAA2B;IACrC,6DAA8B,CAAA;IAC9B,8DAA+B,CAAA;IAC/B,qCAAqC;IACrC,oDAAqB,CAAA;IACrB,8CAAe,CAAA;IACf,sDAAuB,CAAA;IACvB,0CAAW,CAAA;IACX,wDAAyB,CAAA;IACzB,kDAAmB,CAAA;IACnB,gDAAiB,CAAA;IACjB,kDAAmB,CAAA;IACnB,gDAAiB,CAAA;IACjB,sDAAuB,CAAA;IACvB,kDAAmB,CAAA;IACnB,oDAAqB,CAAA;IACrB,8CAAe,CAAA;IACf,wDAAyB,CAAA;IACzB,8CAAe,CAAA;IACf,8DAA+B,CAAA;IAC/B,4CAAa,CAAA;IACb,kDAAmB,CAAA;IACnB,gDAAiB,CAAA;IACjB,oDAAqB,CAAA;IACrB,4DAA6B,CAAA;IAC7B,kDAAmB,CAAA;IACnB,oDAAqB,CAAA;IACrB,4CAAa,CAAA;IACb,2DAA4B,CAAA;IAC5B,mE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;AAC5D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,QAAQ,GAAG,EAAE,EAAW,EAAE;IACxE,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,2BAA2B,CAAC,QAAQ,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,QAAQ,GAAG,EAAE,EAAW,EAAE;IACvE,OAAO,CACL,eAAe,CAAC,QAAQ,CAAC,KAAK,2BAA2B,CAAC,QAAQ;QAClE,QAAQ,KAAK,2BAA2B,CAAC,OAAO;QAChD,QAAQ,KAAK,2BAA2B,CAAC,SAAS;QAClD,QAAQ,KAAK,2BAA2B,CAAC,UAAU,CACpD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,QAAQ,GAAG,EAAE,EAAW,EAAE;IAChE,OAAO,CACL,eAAe,CAAC,QAAQ,CAAC,KAAK,2BAA2B,CAAC,QAAQ;QAClE,QAAQ,KAAK,2BAA2B,CAAC,QAAQ;QACjD,QAAQ,KAAK,2BAA2B,CAAC,OAAO,CACjD,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9546.0",
|
|
4
4
|
"description": "Superblocks Shared Resources",
|
|
5
5
|
"repository": "https://github.com/superblocksteam/shared.git",
|
|
6
6
|
"license": "Superblocks Community Software License",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@opentelemetry/api": "^1.9.0",
|
|
26
26
|
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
27
27
|
"@superblocksteam/sabs-types": "0.154.0",
|
|
28
|
-
"@superblocksteam/types": "0.
|
|
28
|
+
"@superblocksteam/types": "0.1949.0",
|
|
29
29
|
"@types/esprima": "4.0.3",
|
|
30
30
|
"@types/estree": "^1.0.5",
|
|
31
31
|
"@types/events": "^3.0.3",
|
package/src/jwt/verifier.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { UnauthorizedError } from '../errors/index.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export class JwtVerifier {
|
|
10
10
|
private readonly options: JwtVerifierOptions;
|
|
11
|
+
// Memoize the remote JWKS loader; without this, we'd recreate it on each verification and jose's own cache would never persist.
|
|
12
|
+
private remoteJwkSet?: ReturnType<typeof createRemoteJWKSet>;
|
|
11
13
|
constructor(options: JwtVerifierOptions) {
|
|
12
14
|
this.options = options;
|
|
13
15
|
}
|
|
@@ -65,7 +67,10 @@ export class JwtVerifier {
|
|
|
65
67
|
if (!isEmpty(this.options.timeoutMs)) {
|
|
66
68
|
opts.timeoutDuration = this.options.timeoutMs;
|
|
67
69
|
}
|
|
68
|
-
|
|
70
|
+
if (!this.remoteJwkSet) {
|
|
71
|
+
this.remoteJwkSet = createRemoteJWKSet(url, opts);
|
|
72
|
+
}
|
|
73
|
+
return this.remoteJwkSet;
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
|
|
@@ -14,7 +14,8 @@ import { makeDropdownItem } from './shared/db.js';
|
|
|
14
14
|
export const DatabricksPluginVersions = {
|
|
15
15
|
V1: '0.0.1',
|
|
16
16
|
V2: '0.0.2',
|
|
17
|
-
V3: '0.0.3'
|
|
17
|
+
V3: '0.0.3',
|
|
18
|
+
V4: '0.0.4'
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
enum ConnectionType {
|
|
@@ -76,6 +77,19 @@ const BASE_DEFAULT_SCHEMA = {
|
|
|
76
77
|
placeholder: 'default'
|
|
77
78
|
};
|
|
78
79
|
|
|
80
|
+
const BASE_SCOPED_CATALOG_SCHEMAS = {
|
|
81
|
+
label: 'Scoped catalogs and schemas',
|
|
82
|
+
name: 'connection.scopedCatalogSchemas',
|
|
83
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
84
|
+
placeholder: 'catalog1.schema1, catalog1.schema2, catalog2',
|
|
85
|
+
initialValue: '',
|
|
86
|
+
ldFlag: 'integrations.databricks.scoped',
|
|
87
|
+
tooltip: {
|
|
88
|
+
markdownText:
|
|
89
|
+
'Comma-separated list of catalog.schema pairs. Use just catalog name (without dot) to include all schemas from that catalog.'
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
79
93
|
const BASE_SUBJECT_TOKEN_SOURCE = {
|
|
80
94
|
label: 'Subject token source',
|
|
81
95
|
name: 'authConfig.subjectTokenSource',
|
|
@@ -244,7 +258,20 @@ export const DatabricksPlugin: Plugin = {
|
|
|
244
258
|
}
|
|
245
259
|
}
|
|
246
260
|
} as FormItem,
|
|
247
|
-
//
|
|
261
|
+
// SCOPED CATALOG SCHEMAS (shown when feature flag is enabled)
|
|
262
|
+
{
|
|
263
|
+
...BASE_SCOPED_CATALOG_SCHEMAS,
|
|
264
|
+
startVersion: DatabricksPluginVersions.V4,
|
|
265
|
+
display: {
|
|
266
|
+
show: {
|
|
267
|
+
'connection.connectionType': [
|
|
268
|
+
ConnectionType.PERSONAL_ACCESS_TOKEN,
|
|
269
|
+
ConnectionType.MACHINE_TO_MACHINE,
|
|
270
|
+
ConnectionType.OAUTH_TOKEN_FEDERATION
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
} as FormItem,
|
|
248
275
|
{
|
|
249
276
|
...BASE_DEFAULT_CATALOG,
|
|
250
277
|
startVersion: DatabricksPluginVersions.V1,
|
|
@@ -263,7 +290,6 @@ export const DatabricksPlugin: Plugin = {
|
|
|
263
290
|
}
|
|
264
291
|
}
|
|
265
292
|
} as FormItem,
|
|
266
|
-
// DEFAULT SCHEMA
|
|
267
293
|
{
|
|
268
294
|
...BASE_DEFAULT_SCHEMA,
|
|
269
295
|
startVersion: DatabricksPluginVersions.V1,
|