Skip to content

Commit 6f994a8

Browse files
committed
Add SSO hostname to connect's proxy host allow list.
1 parent 9ae67e2 commit 6f994a8

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

web/packages/teleterm/src/mainProcess/rootClusterProxyHostAllowList.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,24 @@ export function manageRootClusterProxyHostAllowList({
7777

7878
allowList.clear();
7979
for (const rootCluster of rootClusters) {
80-
if (!rootCluster.proxyHost) {
81-
continue;
80+
if (rootCluster.proxyHost) {
81+
let browserProxyHost: string;
82+
try {
83+
browserProxyHost = proxyHostToBrowserProxyHost(rootCluster.proxyHost);
84+
} catch (error) {
85+
logger.error(
86+
'Ran into an error when converting proxy host to browser proxy host',
87+
error
88+
);
89+
continue;
90+
}
91+
allowList.add(browserProxyHost);
8292
}
8393

84-
let browserProxyHost: string;
85-
try {
86-
browserProxyHost = proxyHostToBrowserProxyHost(rootCluster.proxyHost);
87-
} catch (error) {
88-
logger.error(
89-
'Ran into an error when converting proxy host to browser proxy host',
90-
error
91-
);
92-
continue;
94+
// Allow the SSO hostname for SSO login/mfa redirects.
95+
if (rootCluster.ssoHostname) {
96+
allowList.add(rootCluster.ssoHostname);
9397
}
94-
95-
allowList.add(browserProxyHost);
9698
}
9799
};
98100

0 commit comments

Comments
 (0)