Skip to content

Commit

Permalink
prevent extra 'https://' scheme for identity center account app (#50339)
Browse files Browse the repository at this point in the history
  • Loading branch information
flyinghermit authored Dec 18, 2024
1 parent b894dd3 commit cb89acd
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 cb89acd

Please sign in to comment.