Network Security Implementation
Procedures for applying the network security guidelines, and the canonical register of network gaps. Read the architecture first.
Resource access restrictions
What each Azure service allows today, which module output supplies it, and the gap that applies.
Open the matrixEgress and static IPs
Default outbound, the spoke NAT gateway, static-IP runners, and how to give a partner a stable IP.
Open egressRestrict a new resource
- List the real callers. For each caller record source, protocol, port, environment, and owner. Typical callers: the service’s compute, APIM, the environment runners, and engineers through ZPA.
- Choose the primitive. Use the strongest control the service supports (see primitives): private endpoint, then VNet rule over a service endpoint, then IP rules.
- Set the default. Default action
Denyon the resource firewall, orip_restriction_default_action = "Deny"on an App Service. - Add allow-list entries from the module. Consume
zpa-prerequisite-ipsoutputs (for examplefunction_app_allowed_ips_cidrfor Function Apps). Do not paste addresses or subnet IDs. - Cover the SCM site on App Service (
scm_use_main_ip_restriction = trueor explicitscm_ip_restriction). - Disable local authentication and grant the caller’s managed identity the narrowest RBAC role.
- Reject any
0.0.0.0/0, region-wide range (unless listed under NET-01), cross-environment source, or copied rule. - Test from an allowed source, from ZPA, and from a source that must be denied. Record the resource in the matrix.
Add a private endpoint (Phase 2)
- Confirm the hub has the private DNS zone for the service. If not, request it from the platform team (see landing zone implementation).
- Create the endpoint in a spoke subnet and attach it to the hub zone through a
private_dns_zone_group, while public access is still enabled. - From every caller (compute, runners, ZPA connectors), verify the service FQDN resolves to the private IP and that authentication still works.
- Disable public network access only after every caller has moved.
- Remove the now-unused firewall entries and test that public access is denied.
- Update the matrix. Only now may the resource be called private.
Verify the posture of an environment
| Check | How |
|---|---|
| No open firewall | Azure Resource Graph: resources with publicNetworkAccess = Enabled and firewall default action Allow |
No 0.0.0.0/0 in NSGs | Resource Graph over securityRules with source *, 0.0.0.0/0, or Internet on non-edge subnets |
| SCM covered | App Service config: scmIpSecurityRestrictionsDefaultAction is Deny or scmIpSecurityRestrictionsUseMain is true |
| Local auth off | disableLocalAuth, localAuthEnabled, or adminUserEnabled per service |
| Policy compliance | Azure Policy compliance view for the Key Vault initiative and the Azure Security Benchmark assignment (Audit) |
Diagnose a denied call
- Identify the denial layer. A firewall denial returns
403with a network-rule message (Key Vault, Storage, Service Bus) or a TCP reset. An identity denial returns401or an RBAC403. - Find the source address the resource saw: the NAT IP, a regional outbound IP, a runner subnet, or a ZPA connector.
- Compare with the resource’s allow-list in Terraform, not the portal.
- Fix at the source. Move a pipeline to the VNet-injected runners, route an
engineer through ZPA, or add the caller’s module output. Do not widen the rule
to a range or
0.0.0.0/0.
Engineer access when ZPA is unavailable
No break-glass procedure exists yet (NET-07). Until one is approved:
- the runtime is unaffected by design;
- engineers MUST NOT add personal IPs to resource firewalls in
bta,gma, orprd; - urgent changes go through the pipeline, whose runners do not depend on ZPA.
NET gap register
These gaps describe deployed behavior that does not meet the guidelines. They do not relax the guidelines. Status dates use ISO format.
| ID | Severity | Risk | Current implementation | Required disposition | Status |
|---|---|---|---|---|---|
| NET-01 | Medium | Any Azure workload in Switzerland North passes the network check | Key Vault, Service Bus, Event Hubs, and ADX allow all Azure Switzerland North ranges, because shared App Service and serverless outbound IPs cannot be bounded | Keep identity as the boundary (MI, RBAC, local auth off). Remove when Phase 2 private endpoints or full VNet integration land | Accepted risk (2026-10-15) |
| NET-02 | High | Registry credentials grant push and pull from anywhere | Container Registry is Standard SKU, public, with admin_enabled = true | Disable the admin user and use managed identity AcrPull/AcrPush. Evaluate Premium for network rules or private endpoint | Open |
| NET-03 | Medium | Data planes reachable from the internet, protected by identity only | App Configuration (no network config), Managed Redis (public access and access keys enabled by default), Power BI Embedded (no network ACL) | Disable access keys on Redis and use Entra auth. Plan private endpoints for App Configuration and Redis | Open |
| NET-04 | High | Basic SKU public IPs were retired by Microsoft on 2025-09-30 (Inferred, verify current state) | ZPA App Connector public IPs use Basic SKU | Migrate to Standard SKU static IPs; update allow-lists through the module | Open |
| NET-05 | Medium | Connector or network failure is noticed only when engineers complain | ZPA metrics are collected, but no alert rules exist; hub and spoke alert.tf are commented out | Alert on connector VM health, connector process, and NAT gateway SNAT exhaustion | Open |
| NET-06 | Low | A zone outage can take both connectors down | Two connectors per environment in an availability set, no zones | Place connectors in different availability zones | Open |
| NET-07 | Medium | Engineers cannot reach resources during a ZPA outage; pressure to add personal IPs | No documented break-glass path | Define and test a break-glass procedure (for example a PIM-gated, time-bound, pipeline-applied rule) | Open |
| NET-08 | Medium | Luna runners are denied by resources | Luna runner subnet exists in Alpha and Production; module outputs exist but resources do not consume them | Add the Luna subnet outputs to resource VNet rules as part of the rollout | Open (rollout) |
| NET-09 | Low | Unused attack surface and misleading configuration | Legacy hub ACI runner subnet; unused spoke APIM subnet; APIM NSG outbound port 1443 (likely a typo for 443) | Remove the legacy subnet and the unused APIM subnet and NSG | Open |
| NET-10 | Medium | No subnet-level filtering for most workloads | Only the App Service plan, Pigeon, and APIM subnets in the spoke have an NSG | Attach a baseline NSG to every spoke subnet that supports one | Open |
| NET-11 | Medium | No flow evidence for investigation | No VNet or NSG flow logs. NSG flow logs are being retired by Microsoft | Enable VNet flow logs with traffic analytics on hub, spoke, and Luna VNets | Open |
| NET-12 | Low | Allow-lists differ between the published and source module; hard-coded IDs drift | The published zpa-prerequisite-ips v1.0.0 exposes different output names than the source module. Key Vault and the NAT gateway use hard-coded subnet IDs | Publish a new module version and replace hard-coded IDs with data sources or outputs | Open |
| NET-13 | Low | Misleading allow-list | ADX allow-list contains private prefixes that have no effect on a public firewall; ZPA IPs are commented out as overlapping | Remove ineffective entries; document that region ranges cover ZPA for ADX | Open |
| NET-14 | Medium | Open rules can be introduced without detection | No policy detects 0.0.0.0/0 in NSGs or resource firewalls. Network-posture policies are Audit only | Add an Audit (then Deny) policy for open NSG and firewall rules | Open |
| NET-15 | Low | A zone outage removes the static egress IP | The spoke NAT gateway is pinned to zone 1 | Accept, or move to a zone-redundant design when Azure supports it for the SKU | Open |
| NET-16 | Accepted deviation | Outbound traffic is not inspected or filtered centrally | No Azure Firewall or hub egress path; each service controls its destinations | Recorded in the ADR-0016 amendment. No review date; revisit only if a trigger appears (for example a compliance driver that requires egress inspection) | Accepted deviation (2026-10-15), confirmed |
| NET-17 | Medium | Any Azure tenant’s workload, in any region, passes the SQL network check | sql_default_ips includes the AllowAzureServices rule (0.0.0.0–0.0.0.0) alongside region ranges and ZPA IPs | Accepted with identity as the compensating control: Entra-only authentication, SQL authentication disabled, managed identity for callers. Recorded in the ADR-0025 amendment | Accepted risk (2026-10-15) |
| NET-18 | Medium | Network-level environment isolation is broken | The shared Key Vault allows the runner subnets of all four environments; cosmos_db_default_ips uses the Production connector pair in every environment | No cross-environment access is required. Restrict the Key Vault runner subnets and the Cosmos DB connector IPs to the environment’s own sources. Check the module comment about Cosmos DB connector behavior before changing | Open |