Skip to content

Commit

Permalink
prevent extra 'https://' scheme for identity center account app
Browse files Browse the repository at this point in the history
  • Loading branch information
flyinghermit committed Dec 17, 2024
1 parent 0f463c5 commit 80e8e8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/packages/teleport/src/services/apps/makeApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {};
Expand Down Expand Up @@ -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}`;
Expand Down

0 comments on commit 80e8e8e

Please sign in to comment.