Remove obsolete firewall check for VCore Mongo CloudShell terminal

CloudShell connects from Azure infrastructure and doesn't require a
0.0.0.0-255.255.255.255 firewall rule. The 'Open MongoDB (DocumentDB) shell'
button already works without this check because BaseTerminalComponentAdapter
skips the firewall gate for VCoreMongo/Mongo shell types.

- Remove firewall check, notification, and related state from VCoreMongoQuickstartTab
- Remove dead VCoreMongo firewall check from TerminalTab (was never enforced)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jade Welton
2026-05-21 11:14:29 -07:00
parent c7f9d7e305
commit 2527e4bd85
2 changed files with 7 additions and 42 deletions
-10
View File
@@ -46,16 +46,6 @@ export default class TerminalTab extends TabsBase {
this.isAllPublicIPAddressesEnabled, this.isAllPublicIPAddressesEnabled,
); );
} }
if (options.kind === ViewModels.TerminalKind.VCoreMongo) {
checkFirewallRules(
"2023-03-01-preview",
(rule) =>
rule.name.startsWith("AllowAllAzureServicesAndResourcesWithinAzureIps") ||
(rule.properties.startIpAddress === "0.0.0.0" && rule.properties.endIpAddress === "255.255.255.255"),
this.isAllPublicIPAddressesEnabled,
);
}
} }
public getContainer(): Explorer { public getContainer(): Explorer {
+1 -26
View File
@@ -1,49 +1,24 @@
import { Stack } from "@fluentui/react"; import { Stack } from "@fluentui/react";
import { MessageTypes } from "Contracts/ExplorerContracts";
import { TerminalKind } from "Contracts/ViewModels"; import { TerminalKind } from "Contracts/ViewModels";
import { CloudShellTerminalComponent } from "Explorer/Tabs/CloudShellTab/CloudShellTerminalComponent"; import { CloudShellTerminalComponent } from "Explorer/Tabs/CloudShellTab/CloudShellTerminalComponent";
import { QuickstartFirewallNotification } from "Explorer/Quickstart/QuickstartFirewallNotification";
import { VcoreMongoQuickstartGuide } from "Explorer/Quickstart/VCoreMongoQuickstartGuide"; import { VcoreMongoQuickstartGuide } from "Explorer/Quickstart/VCoreMongoQuickstartGuide";
import { checkFirewallRules } from "Explorer/Tabs/Shared/CheckFirewallRules";
import { userContext } from "UserContext"; import { userContext } from "UserContext";
import React, { useEffect, useState } from "react"; import React from "react";
import FirewallRuleScreenshot from "../../../images/vcoreMongoFirewallRule.png";
export const VcoreMongoQuickstartTab: React.FC = (): JSX.Element => { export const VcoreMongoQuickstartTab: React.FC = (): JSX.Element => {
const [isAllPublicIPAddressEnabled, setIsAllPublicIPAddressEnabled] = useState<boolean>(true);
useEffect(() => {
checkFirewallRules(
"2023-03-01-preview",
(rule) =>
rule.name.startsWith("AllowAllAzureServicesAndResourcesWithinAzureIps") ||
(rule.properties.startIpAddress === "0.0.0.0" && rule.properties.endIpAddress === "255.255.255.255"),
setIsAllPublicIPAddressEnabled,
);
});
return ( return (
<Stack style={{ width: "100%" }} horizontal> <Stack style={{ width: "100%" }} horizontal>
<Stack style={{ width: "50%" }}> <Stack style={{ width: "50%" }}>
<VcoreMongoQuickstartGuide /> <VcoreMongoQuickstartGuide />
</Stack> </Stack>
<Stack style={{ width: "50%", borderLeft: "black solid 1px" }}> <Stack style={{ width: "50%", borderLeft: "black solid 1px" }}>
{!isAllPublicIPAddressEnabled && (
<QuickstartFirewallNotification
messageType={MessageTypes.OpenVCoreMongoNetworkingBlade}
screenshot={FirewallRuleScreenshot}
shellName="MongoDB"
/>
)}
{isAllPublicIPAddressEnabled && (
<CloudShellTerminalComponent <CloudShellTerminalComponent
databaseAccount={userContext.databaseAccount} databaseAccount={userContext.databaseAccount}
tabId="QuickstartVcoreMongoShell" tabId="QuickstartVcoreMongoShell"
username={userContext.vcoreMongoConnectionParams?.adminLogin} username={userContext.vcoreMongoConnectionParams?.adminLogin}
shellType={TerminalKind.VCoreMongo} shellType={TerminalKind.VCoreMongo}
/> />
)}
</Stack> </Stack>
</Stack> </Stack>
); );