@finos/legend-application-studio 28.21.14 → 28.21.16

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.
@@ -24,22 +24,79 @@ import { LegendStudioEventHelper } from '../__lib__/LegendStudioEventHelper.js';
24
24
  import { LEGEND_STUDIO_SDLC_BYPASSED_ROUTE_PATTERN } from '../__lib__/LegendStudioNavigation.js';
25
25
  import { ShowcaseManagerState } from './ShowcaseManagerState.js';
26
26
  import { getCurrentUserIDFromEngineServer } from '@finos/legend-graph';
27
+ /**
28
+ * Same-origin path of the static page that the SDLC OAuth flow redirects to
29
+ * when re-authenticating in a popup window. Shipped by the Studio deployment
30
+ * (see `assets/popup-callback.html`); deployments enabling the popup
31
+ * re-auth feature must register `<base-url>/popup-callback.html` on the
32
+ * SDLC server's OAuth client allow-list.
33
+ *
34
+ * The leading slash is required because `navigator.generateAddress` is
35
+ * `origin + baseUrl + location` and baseUrl has its trailing slash stripped.
36
+ */
37
+ const SDLC_POPUP_REAUTH_CALLBACK_PATH = '/popup-callback.html';
27
38
  export class LegendStudioBaseStore {
28
39
  applicationStore;
29
40
  sdlcServerClient;
30
41
  depotServerClient;
31
42
  pluginManager;
32
43
  initState = ActionState.create();
44
+ popupReAuthState = ActionState.create();
33
45
  isSDLCAuthorized = false;
34
46
  isSDLCServerInitialized = false;
35
47
  SDLCServerTermsOfServicesUrlsToView = [];
48
+ /**
49
+ * Tracks whether an automatic popup re-auth has already been attempted for
50
+ * the current "failure episode". An episode is the window between two
51
+ * successful SDLC interactions: the flag is set on the first auto-attempt
52
+ * and cleared whenever a re-auth (auto or manual) succeeds. This is what
53
+ * prevents endless 401 → popup → 401 loops.
54
+ */
55
+ autoPopupReAuthAttempted = false;
56
+ /**
57
+ * Dedupes concurrent auto callers of `handleSDLCUnauthorized`. Wraps the
58
+ * raw popup promise with the auto-flow notification logic (manual-fallback
59
+ * warning on failure) so all concurrent 401-driven callers get the same
60
+ * resolution and only one warning fires per attempt.
61
+ */
62
+ inFlightAutoReAuth;
63
+ /**
64
+ * The raw popup promise, set by `reAuthorizeSDLCInPopup` for the duration
65
+ * of an on-screen popup REGARDLESS of who opened it (manual shield click
66
+ * OR auto-trigger). `handleSDLCUnauthorized` consults this before deciding
67
+ * to consume the episode and warn — without it, a 401 raised while the
68
+ * user is in a manually-opened popup would either stack a second popup or
69
+ * pop a "click the shield" warning at them while the shield's popup is in
70
+ * front of them.
71
+ */
72
+ inFlightReAuth;
73
+ /**
74
+ * Per-episode dedup flag for the "click the shield to retry" warning.
75
+ * `handleSDLCUnauthorized` can be re-entered many times within a single
76
+ * failure episode (every subsequent failing SDLC request in a burst lands
77
+ * in the loop-guard branch); without this flag, each one would stack an
78
+ * identical toast. Cleared alongside `autoPopupReAuthAttempted` on a
79
+ * successful re-auth so the next episode can warn again.
80
+ */
81
+ manualReAuthNotifiedForEpisode = false;
82
+ /**
83
+ * Re-entry guard for the network layer's 401 hook. Set to `true` while we
84
+ * are re-bootstrapping the SDLC session inside the popup-success path so
85
+ * that a 401 raised by the re-bootstrap requests themselves (e.g. the
86
+ * `isAuthorized` verification GET coming back 401 because cookies didn't
87
+ * actually land) cannot recurse into `handleSDLCUnauthorized` — that would
88
+ * return the still-in-flight outer promise and deadlock the whole chain.
89
+ */
90
+ suppressAutoReAuth = false;
36
91
  constructor(applicationStore) {
37
92
  makeObservable(this, {
38
93
  isSDLCAuthorized: observable,
39
94
  SDLCServerTermsOfServicesUrlsToView: observable,
40
95
  needsToAcceptSDLCServerTermsOfServices: computed,
96
+ isSDLCPopupReAuthEnabled: computed,
41
97
  initialize: flow,
42
98
  initializeSDLCServerClient: flow,
99
+ verifySDLCSessionAfterReAuth: flow,
43
100
  dismissSDLCServerTermsOfServicesAlert: action,
44
101
  });
45
102
  this.applicationStore = applicationStore;
@@ -55,6 +112,11 @@ export class LegendStudioBaseStore {
55
112
  serverUrl: this.applicationStore.config.sdlcServerUrl,
56
113
  baseHeaders: this.applicationStore.config.sdlcServerBaseHeaders,
57
114
  client: this.applicationStore.config.sdlcServerClient,
115
+ // On a mid-session 401, auto-launch the popup re-auth flow. The
116
+ // handler enforces a one-attempt-per-episode guard to prevent endless
117
+ // retry loops; when it gives up, the StatusBar manual button remains
118
+ // available.
119
+ autoReAuthenticate: () => this.handleSDLCUnauthorized(),
58
120
  });
59
121
  this.sdlcServerClient.setTracerService(this.applicationStore.tracerService);
60
122
  }
@@ -130,6 +192,322 @@ export class LegendStudioBaseStore {
130
192
  dismissSDLCServerTermsOfServicesAlert() {
131
193
  this.SDLCServerTermsOfServicesUrlsToView = [];
132
194
  }
195
+ /**
196
+ * Whether the popup-based SDLC re-authentication flow is available.
197
+ *
198
+ * The feature is opt-in via the `sdlc.enablePopupReAuth` config flag
199
+ * because the derived callback URL must be explicitly registered as an
200
+ * OAuth `redirect_uri` on the SDLC server. When `false` (or unset), only
201
+ * the legacy top-level redirect flow is available.
202
+ */
203
+ get isSDLCPopupReAuthEnabled() {
204
+ return this.applicationStore.config.sdlcEnablePopupReAuth;
205
+ }
206
+ /**
207
+ * 401 interception hook wired into the SDLC server client. Triggers the
208
+ * popup re-auth flow automatically — without any user action — but only
209
+ * once per failure episode to guard against retry loops.
210
+ *
211
+ * @returns a promise resolving to `true` if the SDLC server is now
212
+ * authorized (i.e. the underlying network layer should retry the original
213
+ * request), `false` otherwise.
214
+ */
215
+ handleSDLCUnauthorized() {
216
+ // Feature off → propagate the 401 to the caller as before.
217
+ if (!this.isSDLCPopupReAuthEnabled) {
218
+ return Promise.resolve(false);
219
+ }
220
+ // Re-entry guard: a 401 raised from inside the post-popup re-bootstrap
221
+ // (e.g. the verification `isAuthorized()` call itself coming back 401
222
+ // because cookies didn't actually land) MUST NOT recurse into the popup
223
+ // flow — that would return the in-flight outer promise and deadlock.
224
+ if (this.suppressAutoReAuth) {
225
+ return Promise.resolve(false);
226
+ }
227
+ // Coalesce concurrent auto callers onto the wrapped auto-flow promise so
228
+ // the manual-fallback warning only fires once per attempt.
229
+ if (this.inFlightAutoReAuth) {
230
+ return this.inFlightAutoReAuth;
231
+ }
232
+ // If a popup is already on screen — most commonly because the user just
233
+ // clicked the StatusBar shield, but also possibly because a prior auto-
234
+ // attempt's popup is still finalising — defer to its outcome instead of
235
+ // consuming this episode's one auto-attempt and warning at the user
236
+ // about a manual button that the popup is in the way of.
237
+ if (this.inFlightReAuth) {
238
+ return this.inFlightReAuth;
239
+ }
240
+ // Loop guard: we've already auto-attempted once this episode. Surface
241
+ // the manual fallback (deduped) and stop auto-retrying.
242
+ if (this.autoPopupReAuthAttempted) {
243
+ this.notifyManualReAuthAvailable();
244
+ return Promise.resolve(false);
245
+ }
246
+ this.autoPopupReAuthAttempted = true;
247
+ // NOTE: we deliberately don't fire an upfront "session expired" toast —
248
+ // the popup window itself is the user-visible signal that re-auth is
249
+ // happening. We only notify on completion (success or failure) so the
250
+ // toast stack stays clean.
251
+ this.inFlightAutoReAuth = this.reAuthorizeSDLCInPopup()
252
+ .then((ok) => {
253
+ this.inFlightAutoReAuth = undefined;
254
+ if (!ok) {
255
+ this.notifyManualReAuthAvailable();
256
+ }
257
+ // success path resets `autoPopupReAuthAttempted` inside
258
+ // `reAuthorizeSDLCInPopup` so the next episode can auto-attempt again
259
+ return ok;
260
+ })
261
+ .catch(() => {
262
+ this.inFlightAutoReAuth = undefined;
263
+ this.notifyManualReAuthAvailable();
264
+ return false;
265
+ });
266
+ return this.inFlightAutoReAuth;
267
+ }
268
+ /**
269
+ * Best-effort notification that nudges the user toward the manual
270
+ * re-authentication entry point (the StatusBar shield button) when the
271
+ * automatic flow could not complete (popup blocked, user dismissed, or
272
+ * the retry still 401'd).
273
+ *
274
+ * Deduped per failure episode: subsequent 401s within the same episode
275
+ * (a burst of editor requests after session expiry, for example) all hit
276
+ * the loop-guard branch and would otherwise each stack an identical
277
+ * warning toast. The flag is cleared when a re-auth attempt succeeds.
278
+ */
279
+ notifyManualReAuthAvailable() {
280
+ if (this.manualReAuthNotifiedForEpisode) {
281
+ return;
282
+ }
283
+ this.manualReAuthNotifiedForEpisode = true;
284
+ this.applicationStore.notificationService.notifyWarning(`Automatic SDLC re-authentication did not complete. Click the shield icon in the status bar to retry, or reload the page to start a fresh session.`);
285
+ }
286
+ /**
287
+ * Re-initiate the SDLC authorization step in a popup window so that the
288
+ * user can recover from an expired SDLC session without losing in-memory
289
+ * editor state (open tabs, unsaved buffers, etc.).
290
+ *
291
+ * The popup loads the SDLC server's `/auth/authorize?redirect_uri=...`
292
+ * endpoint with a same-origin callback page as the `redirect_uri`. That
293
+ * URL is derived at runtime via the navigator — the same way the
294
+ * boot-time auth flow derives its own `redirect_uri` — so deployments
295
+ * only need to declare intent (`sdlc.enablePopupReAuth: true`) and ship
296
+ * the static `popup-callback.html` page at their base URL.
297
+ *
298
+ * The callback page is expected to `postMessage` back to the opener with
299
+ * payload `{ type: 'SDLC_REAUTH_DONE' }` and then close itself.
300
+ *
301
+ * On success, the SDLC server client is re-checked and re-initialized in
302
+ * place — no top-level navigation, no state loss.
303
+ *
304
+ * @returns a promise that resolves to `true` if the SDLC server is
305
+ * authorized after the popup flow completes, `false` otherwise (popup
306
+ * blocked, user cancelled, authorization check still failing, ...).
307
+ */
308
+ async reAuthorizeSDLCInPopup() {
309
+ if (!this.isSDLCPopupReAuthEnabled) {
310
+ this.applicationStore.notificationService.notifyWarning(`Popup re-authentication is not enabled. Set 'sdlc.enablePopupReAuth' to true in the Studio config to enable it.`);
311
+ return false;
312
+ }
313
+ // Coalesce concurrent callers (manual shield click + auto 401 trigger)
314
+ // onto a single popup. Without this, a 401 raised while the user is in
315
+ // a manually-opened popup would either stack a second popup OR fire a
316
+ // confusing "click the shield" warning at the user while the shield's
317
+ // popup is literally on screen.
318
+ if (this.inFlightReAuth) {
319
+ return this.inFlightReAuth;
320
+ }
321
+ this.popupReAuthState.inProgress();
322
+ // Derive the callback URL the same way the boot-time SDLC auth flow
323
+ // derives its `redirect_uri` — via the navigator's same-origin address
324
+ // builder. The callback page is a constant static asset shipped with
325
+ // every Studio deployment.
326
+ const callbackUrl = this.applicationStore.navigationService.navigator.generateAddress(SDLC_POPUP_REAUTH_CALLBACK_PATH);
327
+ const callbackOrigin = new URL(callbackUrl).origin;
328
+ const authorizeUrl = SDLCServerClient.authorizeCallbackUrl(this.applicationStore.config.sdlcServerUrl, callbackUrl, this.applicationStore.config.sdlcServerClient);
329
+ const popup = window.open(authorizeUrl, 'legend-studio-sdlc-reauth', 'width=560,height=720,menubar=no,toolbar=no,location=no,status=no');
330
+ if (!popup) {
331
+ this.popupReAuthState.fail();
332
+ this.applicationStore.notificationService.notifyError(`Failed to open the re-authentication popup. Please allow popups for this site and try again.`);
333
+ return false;
334
+ }
335
+ const promise = new Promise((resolve) => {
336
+ let closedPoll;
337
+ let settled = false;
338
+ // `finalize` and `onMessage` form a small cycle:
339
+ // onMessage -> finalize (call on success postMessage)
340
+ // finalize -> onMessage (removeEventListener on teardown)
341
+ // We declare `finalize` first so only the one forward reference to
342
+ // `onMessage` from inside `finalize`'s body needs to be excused.
343
+ const finalize = (signalled) => {
344
+ if (settled) {
345
+ return;
346
+ }
347
+ settled = true;
348
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
349
+ window.removeEventListener('message', onMessage);
350
+ if (closedPoll !== undefined) {
351
+ clearInterval(closedPoll);
352
+ closedPoll = undefined;
353
+ }
354
+ try {
355
+ popup.close();
356
+ }
357
+ catch {
358
+ // ignored — popup may already be closed or cross-origin
359
+ }
360
+ // Always re-verify the SDLC session in place, whether the callback
361
+ // page managed to `postMessage` (`signalled === true`) or the popup
362
+ // simply closed (`signalled === false`). The popup-closed path used
363
+ // to fail outright, but that silently broke environments where the
364
+ // browser severs `window.opener` somewhere along the auth redirect
365
+ // chain (most commonly an IdP or the SDLC server sending
366
+ // `Cross-Origin-Opener-Policy: same-origin`): the callback page's
367
+ // `postMessage` becomes a no-op, the popup closes itself, and the
368
+ // only way to learn whether auth actually took is to ask the server.
369
+ // The cost is one cheap GET on user-cancel; the upside is robust
370
+ // recovery for COOP-severed deployments.
371
+ //
372
+ // We deliberately do NOT route through `initializeSDLCServerClient`
373
+ // here — that would do a top-level redirect on `!isAuthorized` and
374
+ // lose all the in-memory editor state this whole feature exists to
375
+ // protect. `suppressAutoReAuth` is set for the duration of the
376
+ // verify so that a 401 raised by the verify GET itself can't recurse
377
+ // back into `handleSDLCUnauthorized` (which would return the still-
378
+ // in-flight outer promise and deadlock).
379
+ this.isSDLCServerInitialized = false;
380
+ this.suppressAutoReAuth = true;
381
+ flowResult(this.verifySDLCSessionAfterReAuth())
382
+ .then((ok) => {
383
+ this.suppressAutoReAuth = false;
384
+ if (ok) {
385
+ // reset the per-episode flags so the next failure episode
386
+ // can auto-attempt re-auth and warn the user again
387
+ this.autoPopupReAuthAttempted = false;
388
+ this.manualReAuthNotifiedForEpisode = false;
389
+ this.popupReAuthState.pass();
390
+ this.applicationStore.notificationService.notifySuccess(`Successfully re-authenticated with the SDLC server.`);
391
+ }
392
+ else {
393
+ this.popupReAuthState.fail();
394
+ if (signalled) {
395
+ // The popup explicitly told us it completed, yet the SDLC
396
+ // server still reports the session as unauthorized. That's
397
+ // a real problem the user should know about (wrong identity
398
+ // chosen in the popup, third-party-cookie / SameSite issue,
399
+ // ToS race, etc.). Surface a loud error.
400
+ this.applicationStore.notificationService.notifyError(`Re-authentication popup completed but the SDLC session is still not authorized. Please reload the page to start a fresh session.`);
401
+ }
402
+ // !signalled + verify failed is indistinguishable from a
403
+ // deliberate user-cancel — stay quiet. The auto-trigger
404
+ // caller (`handleSDLCUnauthorized`) will fire a single
405
+ // "click the shield to retry" hint if this was an auto
406
+ // attempt; the manual button caller simply gets `false` back.
407
+ }
408
+ resolve(ok);
409
+ })
410
+ .catch((error) => {
411
+ this.suppressAutoReAuth = false;
412
+ assertErrorThrown(error);
413
+ this.popupReAuthState.fail();
414
+ this.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE), error);
415
+ this.applicationStore.notificationService.notifyError(error);
416
+ resolve(false);
417
+ });
418
+ };
419
+ const onMessage = (event) => {
420
+ // strict origin + payload-shape check
421
+ if (event.origin !== callbackOrigin) {
422
+ return;
423
+ }
424
+ const data = event.data;
425
+ if (!data || data.type !== 'SDLC_REAUTH_DONE') {
426
+ return;
427
+ }
428
+ finalize(true);
429
+ };
430
+ window.addEventListener('message', onMessage);
431
+ // Fallback: if the user closes the popup without completing auth,
432
+ // we still want to release the in-progress state.
433
+ closedPoll = setInterval(() => {
434
+ if (popup.closed) {
435
+ finalize(false);
436
+ }
437
+ }, 500);
438
+ });
439
+ this.inFlightReAuth = promise;
440
+ try {
441
+ return await promise;
442
+ }
443
+ finally {
444
+ // Clear the slot AFTER awaiting so all concurrent callers (which got
445
+ // `this.inFlightReAuth` back from the early-return branch) resolve
446
+ // against the same promise instance. Subsequent attempts then start
447
+ // a fresh popup.
448
+ this.inFlightReAuth = undefined;
449
+ }
450
+ }
451
+ /**
452
+ * Shared post-auth bootstrap: ToS gate, platforms, features. Plain
453
+ * generator (not a flow) — delegated to from both `initializeSDLCServerClient`
454
+ * (the boot-time flow) and `verifySDLCSessionAfterReAuth` (the popup-success
455
+ * flow) via `yield*`. Caller is responsible for asserting `isSDLCAuthorized`
456
+ * beforehand.
457
+ */
458
+ *bootstrapSDLCSessionAfterAuth() {
459
+ // check terms of service agreement status
460
+ this.SDLCServerTermsOfServicesUrlsToView =
461
+ (yield this.sdlcServerClient.hasAcceptedTermsOfService());
462
+ if (this.SDLCServerTermsOfServicesUrlsToView.length) {
463
+ this.applicationStore.alertService.setActionAlertInfo({
464
+ message: `Please read and accept the SDLC servers' terms of service`,
465
+ prompt: `Click 'Done' when you have accepted all the terms`,
466
+ type: ActionAlertType.CAUTION,
467
+ actions: [
468
+ {
469
+ label: 'See terms of services',
470
+ default: true,
471
+ handler: () => this.SDLCServerTermsOfServicesUrlsToView.forEach((url) => this.applicationStore.navigationService.navigator.visitAddress(url)),
472
+ type: ActionAlertActionType.PROCEED,
473
+ },
474
+ {
475
+ label: 'Done',
476
+ type: ActionAlertActionType.PROCEED_WITH_CAUTION,
477
+ handler: () => {
478
+ this.dismissSDLCServerTermsOfServicesAlert();
479
+ this.applicationStore.navigationService.navigator.reload();
480
+ },
481
+ },
482
+ ],
483
+ });
484
+ }
485
+ // fetch server features config and platforms
486
+ yield this.sdlcServerClient.fetchServerPlatforms();
487
+ yield this.sdlcServerClient.fetchServerFeaturesConfiguration();
488
+ // the sdlc server client is authorized and initialized
489
+ this.isSDLCServerInitialized = true;
490
+ }
491
+ /**
492
+ * Verify the SDLC session after a popup re-auth attempt completes, and
493
+ * re-bootstrap the session in place if it took. Returns `true` if the
494
+ * session is now usable, `false` if the SDLC server still reports the
495
+ * session as unauthorized (e.g. cookies didn't actually land, user authed
496
+ * against the wrong identity).
497
+ *
498
+ * Unlike `initializeSDLCServerClient`, this does NOT do a top-level
499
+ * redirect on `!isAuthorized` — preserving in-memory editor state is the
500
+ * entire reason the popup flow exists.
501
+ */
502
+ *verifySDLCSessionAfterReAuth() {
503
+ this.isSDLCAuthorized =
504
+ (yield this.sdlcServerClient.isAuthorized());
505
+ if (!this.isSDLCAuthorized) {
506
+ return false;
507
+ }
508
+ yield* this.bootstrapSDLCSessionAfterAuth();
509
+ return true;
510
+ }
133
511
  *initializeSDLCServerClient() {
134
512
  try {
135
513
  this.isSDLCAuthorized =
@@ -138,38 +516,8 @@ export class LegendStudioBaseStore {
138
516
  this.applicationStore.navigationService.navigator.goToAddress(SDLCServerClient.authorizeCallbackUrl(this.applicationStore.config.sdlcServerUrl, this.applicationStore.navigationService.navigator.getCurrentAddress(), this.applicationStore.config.sdlcServerClient));
139
517
  }
140
518
  else {
141
- // Only proceed intialization after passing authorization check
142
- // check terms of service agreement status
143
- this.SDLCServerTermsOfServicesUrlsToView =
144
- (yield this.sdlcServerClient.hasAcceptedTermsOfService());
145
- if (this.SDLCServerTermsOfServicesUrlsToView.length) {
146
- this.applicationStore.alertService.setActionAlertInfo({
147
- message: `Please read and accept the SDLC servers' terms of service`,
148
- prompt: `Click 'Done' when you have accepted all the terms`,
149
- type: ActionAlertType.CAUTION,
150
- actions: [
151
- {
152
- label: 'See terms of services',
153
- default: true,
154
- handler: () => this.SDLCServerTermsOfServicesUrlsToView.forEach((url) => this.applicationStore.navigationService.navigator.visitAddress(url)),
155
- type: ActionAlertActionType.PROCEED,
156
- },
157
- {
158
- label: 'Done',
159
- type: ActionAlertActionType.PROCEED_WITH_CAUTION,
160
- handler: () => {
161
- this.dismissSDLCServerTermsOfServicesAlert();
162
- this.applicationStore.navigationService.navigator.reload();
163
- },
164
- },
165
- ],
166
- });
167
- }
168
- // fetch server features config and platforms
169
- yield this.sdlcServerClient.fetchServerPlatforms();
170
- yield this.sdlcServerClient.fetchServerFeaturesConfiguration();
171
- // the sdlc server client is authorized and initialized
172
- this.isSDLCServerInitialized = true;
519
+ // Only proceed initialization after passing authorization check
520
+ yield* this.bootstrapSDLCSessionAfterAuth();
173
521
  }
174
522
  }
175
523
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"LegendStudioBaseStore.js","sourceRoot":"","sources":["../../src/stores/LegendStudioBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,qBAAqB,EACrB,eAAe,EACf,gCAAgC,EAChC,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,EACd,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO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AK,CAAC,CAAC;YACzB;YACE,0CAA0C;YAC1C,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;gBACtC,KAAK,YAAY,kBAAkB;gBACnC,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,UAAU,CAAC,YAAY,EACjD,CAAC;gBACD,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC;oBACpD,OAAO,EACL,kKAAkK;oBACpK,IAAI,EAAE,eAAe,CAAC,QAAQ;oBAC9B,OAAO,EAAE;wBACP;4BACE,KAAK,EAAE,yBAAyB;4BAChC,IAAI,EAAE,qBAAqB,CAAC,OAAO;4BACnC,OAAO,EAAE,IAAI;4BACb,OAAO,EAAE,GAAS,EAAE;gCAClB,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,YAAY,CAC5D,IAAI,CAAC,gBAAgB,CAAC,cAAc,CACrC,CAAC;gCACF,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,gBAAgB,CAAC;oCAClD,OAAO,EACL,6DAA6D;oCAC/D,MAAM,EACJ,6DAA6D;iCAChE,CAAC,CAAC;4BACL,CAAC;yBACF;qBACF;iBACF,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,CACpC,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,EAC7D,KAAK,CACN,CAAC;gBACF,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-studio",
3
- "version": "28.21.14",
3
+ "version": "28.21.16",
4
4
  "description": "Legend Studio application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -47,21 +47,21 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@dagrejs/dagre": "1.1.4",
50
- "@finos/legend-application": "16.0.112",
51
- "@finos/legend-art": "7.1.153",
52
- "@finos/legend-code-editor": "2.0.179",
53
- "@finos/legend-data-cube": "0.3.96",
54
- "@finos/legend-extension-dsl-data-product": "0.0.89",
55
- "@finos/legend-extension-dsl-diagram": "8.1.243",
56
- "@finos/legend-graph": "32.6.10",
57
- "@finos/legend-lego": "2.0.199",
58
- "@finos/legend-query-builder": "4.18.18",
59
- "@finos/legend-server-depot": "6.1.13",
60
- "@finos/legend-server-lakehouse": "0.3.59",
61
- "@finos/legend-server-sdlc": "5.4.4",
62
- "@finos/legend-server-showcase": "0.2.66",
63
- "@finos/legend-shared": "11.0.25",
64
- "@finos/legend-storage": "3.0.146",
50
+ "@finos/legend-application": "16.0.113",
51
+ "@finos/legend-art": "7.1.154",
52
+ "@finos/legend-code-editor": "2.0.181",
53
+ "@finos/legend-data-cube": "0.3.98",
54
+ "@finos/legend-extension-dsl-data-product": "0.0.91",
55
+ "@finos/legend-extension-dsl-diagram": "8.1.245",
56
+ "@finos/legend-graph": "32.6.12",
57
+ "@finos/legend-lego": "2.0.201",
58
+ "@finos/legend-query-builder": "4.18.20",
59
+ "@finos/legend-server-depot": "6.1.14",
60
+ "@finos/legend-server-lakehouse": "0.3.61",
61
+ "@finos/legend-server-sdlc": "5.4.5",
62
+ "@finos/legend-server-showcase": "0.2.67",
63
+ "@finos/legend-shared": "11.0.26",
64
+ "@finos/legend-storage": "3.0.147",
65
65
  "@testing-library/dom": "10.4.0",
66
66
  "@testing-library/react": "16.2.0",
67
67
  "@types/react": "19.0.10",
@@ -182,7 +182,27 @@ class LegendStudioApplicationCoreOptions {
182
182
 
183
183
  export interface LegendStudioApplicationConfigurationData
184
184
  extends LegendApplicationConfigurationData {
185
- sdlc: { url: string; baseHeaders?: RequestHeaders; client?: string };
185
+ sdlc: {
186
+ url: string;
187
+ baseHeaders?: RequestHeaders;
188
+ client?: string;
189
+ /**
190
+ * Enable the popup-based SDLC re-authentication flow.
191
+ *
192
+ * When `true`, Studio surfaces a "Re-authenticate with SDLC" action
193
+ * and (on a mid-session 401) automatically opens a popup that completes
194
+ * the OAuth dance against the SDLC server — preserving all in-memory
195
+ * editor state instead of doing a top-level navigation that wipes it.
196
+ *
197
+ * The popup uses a same-origin static page as its OAuth `redirect_uri`,
198
+ * derived at runtime from Studio's own origin + base URL (the same way
199
+ * the boot-time `/auth/authorize` flow constructs its `redirect_uri`).
200
+ * The deployment ships that page at `<base-url>/popup-callback.html`;
201
+ * deployments that enable this flag must register that derived URL on
202
+ * the SDLC server's OAuth client allow-list.
203
+ */
204
+ enablePopupReAuth?: boolean;
205
+ };
186
206
  depot: { url: string };
187
207
  engine: {
188
208
  url: string;
@@ -203,6 +223,7 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
203
223
  readonly sdlcServerUrl: string;
204
224
  readonly sdlcServerBaseHeaders?: RequestHeaders | undefined;
205
225
  readonly sdlcServerClient?: string | undefined;
226
+ readonly sdlcEnablePopupReAuth: boolean;
206
227
  readonly queryApplicationUrl?: string | undefined;
207
228
  readonly showcaseServerUrl?: string | undefined;
208
229
  readonly pctReportUrl?: string | undefined;
@@ -255,6 +276,9 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
255
276
  );
256
277
  this.sdlcServerBaseHeaders = input.configData.sdlc.baseHeaders;
257
278
  this.sdlcServerClient = input.configData.sdlc.client;
279
+ this.sdlcEnablePopupReAuth = Boolean(
280
+ input.configData.sdlc.enablePopupReAuth,
281
+ );
258
282
 
259
283
  // query
260
284
  if (input.configData.query?.url) {
@@ -28,6 +28,7 @@ import {
28
28
  AssistantIcon,
29
29
  ErrorIcon,
30
30
  WarningIcon,
31
+ ShieldIcon,
31
32
  } from '@finos/legend-art';
32
33
  import { LEGEND_STUDIO_TEST_ID } from '../../__lib__/LegendStudioTesting.js';
33
34
  import {
@@ -42,7 +43,10 @@ import {
42
43
  import { flowResult } from 'mobx';
43
44
  import { useEditorStore } from './EditorStoreProvider.js';
44
45
  import { WorkspaceType } from '@finos/legend-server-sdlc';
45
- import { useLegendStudioApplicationStore } from '../LegendStudioFrameworkProvider.js';
46
+ import {
47
+ useLegendStudioApplicationStore,
48
+ useLegendStudioBaseStore,
49
+ } from '../LegendStudioFrameworkProvider.js';
46
50
  import { useParams } from '@finos/legend-application/browser';
47
51
  import { guaranteeNonNullable } from '@finos/legend-shared';
48
52
 
@@ -51,6 +55,7 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
51
55
  const params = useParams<WorkspaceEditorPathParams>();
52
56
  const editorStore = useEditorStore();
53
57
  const applicationStore = useLegendStudioApplicationStore();
58
+ const baseStore = useLegendStudioBaseStore();
54
59
  const isInConflictResolutionMode = editorStore.isInConflictResolutionMode;
55
60
  // SDLC
56
61
  const projectId = params.projectId;
@@ -392,6 +397,21 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
392
397
  >
393
398
  <HackerIcon />
394
399
  </button>
400
+ {baseStore.isSDLCPopupReAuthEnabled && (
401
+ <button
402
+ className="editor__status-bar__action"
403
+ disabled={baseStore.popupReAuthState.isInProgress}
404
+ onClick={(): void => {
405
+ baseStore
406
+ .reAuthorizeSDLCInPopup()
407
+ .catch(applicationStore.alertUnhandledError);
408
+ }}
409
+ tabIndex={-1}
410
+ title="Re-authenticate with SDLC (preserves local state)"
411
+ >
412
+ <ShieldIcon />
413
+ </button>
414
+ )}
395
415
  <button
396
416
  className={clsx(
397
417
  'editor__status-bar__action editor__status-bar__action__toggler',