From 80e8e8eb8ddc3636938cc55bf0f90c2336b79283 Mon Sep 17 00:00:00 2001 From: flyinghermit Date: Mon, 16 Dec 2024 23:00:15 -0500 Subject: [PATCH] prevent extra 'https://' scheme for identity center account app --- web/packages/teleport/src/services/apps/makeApps.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/packages/teleport/src/services/apps/makeApps.ts b/web/packages/teleport/src/services/apps/makeApps.ts index 749ffc1937386..137241a89a3fc 100644 --- a/web/packages/teleport/src/services/apps/makeApps.ts +++ b/web/packages/teleport/src/services/apps/makeApps.ts @@ -20,7 +20,7 @@ import { AwsRole } from 'shared/services/apps'; import cfg from 'teleport/config'; -import { App, PermissionSet } from './types'; +import { App, AppSubKind, PermissionSet } from './types'; export default function makeApp(json: any): App { json = json || {}; @@ -59,11 +59,13 @@ export default function makeApp(json: any): App { addrWithProtocol = `cloud://${publicAddr}`; } else if (isTcp) { addrWithProtocol = `tcp://${publicAddr}`; + } else if (subKind === AppSubKind.AwsIcAccount) { + /** publicAddr for Identity Center account app is a URL with scheme. */ + addrWithProtocol = publicAddr; } else { addrWithProtocol = `https://${publicAddr}`; } } - let samlAppSsoUrl = ''; if (samlApp) { samlAppSsoUrl = `${cfg.baseUrl}/enterprise/saml-idp/login/${name}`;