Repository navigation
feat(networking)!: modernize FedRAMP stage 2 with NCC hub, NGFW policies, PSC APIs, and SWP egress - #404
Conversation
…ess to FedRAMP stage 2 * Replace per-VPC classic firewall rules in 2-networking-a-fedramp with Global Network Firewall Policies supporting Cloud NGFW Essentials, Standard, and Enterprise rules. * Provision per-VPC Private Service Connect endpoints for Google APIs (all-apis or vpc-sc), p.googleapis.com private DNS zones, and Cloud DNS response policies across hub, spoke, and optional egress VPCs. * Add an optional centralized egress-0 VPC spoke running Secure Web Proxy in NEXT_HOP_ROUTING_MODE with ENDPOINT_TYPE_SWG Cloud NAT and 0.0.0.0/0 next-hop IP routing.
…vor of PSC and opt-in psa_ranges * Remove the legacy psc.tf symlink from 2-networking-a-fedramp so spoke VPCs no longer create unconditional /22 Private Services Access VPC peerings by default. * Generalize psa_ranges to a map keyed by environment name so workloads that still require Private Services Access can opt in with explicit IPAM ranges.
* Resolve merge conflicts in 2-networking-a-fedramp and tests/test_stage2_networking.py after syncing Cloud Foundation Fabric v60.0.0. * Align subnets[*].secondary_ip_ranges and create_googleapis_routes.directpath in 2-networking-a-fedramp with modules/net-vpc v60.0.0.
…ll context, and SWP TLS inspection * Replace raw google_compute_project_metadata with compute_metadata on module.hub-project and module.env-spoke-projects. * Replace raw google_compute_address resources in connectivity-tests.tf with modules/net-address internal_addresses. * Wire CFF v60 context and Cloud NGFW Enterprise packet-mirroring rules across Stage 2 firewall policies, plus optional SWP tls_inspection_config and PSC service_directory_registration.
…, and default SAs * Enable Cloud NAT audit logging (logging_filter = ALL) across hub, spoke, and centralized SWP egress NAT gateways for NIST 800-53r5 AU-2/AU-12/SC-7 compliance. * Enable full VPC Flow Logs on the centralized egress-swp-0 subnet (CIS 3.9) and deprivilege default Compute Engine service accounts on all network host projects (CIS 1.5, NIST AC-6). * Attach googleapis DNS response policy and org-domain DNS peering to egress-0 in both PSC and legacy PGA modes.
aghassemlouei
left a comment
There was a problem hiding this comment.
Good Evening @Calvin-Cheng1!
Thank you for opening #404, modernizing FedRAMP Stage 2 around a central hub VPC, the Network Connectivity Center factory, global network firewall policies, and per-VPC Private Service Connect endpoints, and aligning the stage with the synced Cloud Foundation Fabric v60.0.0 modules. Separating the FedRAMP Moderate, FedRAMP High, and IL2 topology from the IL4 and IL5 NGFW appliance stack makes Stage 2 much cleaner to deploy and maintain.
All required GitHub Actions checks, check_documentation.py, Python unit tests, a six-scenario terraform plan matrix, and live Google Cloud smoke provisioning and teardown of the default hub, spoke, firewall policy, Network Connectivity Center STAR group, Private Service Connect all-apis, Cloud DNS response policy, Cloud NAT, and CIS alerting stack succeeded against commit 0e686cd. Testing centralized_egress, renamed hub subnets, standalone folder creation, Private Service Connect Service Directory DNS zones, and folder-scoped billing_override execution surfaced the apply, destroy, and plan-time items commented with inline suggestions below, plus two cross-file VDSS cleanup items outside the current diff:
-
scripts/deploy.shat lines 98 to 126 andscripts/restore.shat lines 25, 34, and 59 to 68 still reference${PREFIX}-net-vdss-host,module.vdss-host-project,vdss-dmz-0,vdss-landing-0, andmodule.kmskeyringvdss-keyringwhen Stage 2a is selected, which breaks brownfield import and project restoration on the new hub layout. -
blueprints/gemini-enterprise/README.mdat lines 163 to 174 and 652 to 687 plusdocs/ddg.mdat line 518 still describe2-networking-a-fedrampas deployingnet-vdss-host,vdss-dmz-0,vdss-landing-0, and NVA clusters throughnva.tfandnet-vdss.tf.
… factories - Route centralized SWP egress via next_hop_ilb and rely on SWP managed NAT - Drop manual p.googleapis.com zones that collide with auto-created Service Directory PSC zones - Parent host projects on module.folder.id, support common_services/AW folder fallback, and move Shared VPC host activation onto net-vpc - Avoid hardcoded hub-default subnet in connectivity tests and fix host_project_ids/host_project_numbers outputs - Simplify factory-ncc.tf with deep-merged NCC groups and site_to_site_data_transfer = false default - Restore built-in data/dns-policy-rules.yaml via dns-response-policy factory/context and remove unused dns.resolvers - Refresh FedRAMP system boundary diagram, docs, and Stage 2a paths in deploy.sh and restore.sh
aghassemlouei
left a comment
There was a problem hiding this comment.
Thank you @Calvin-Cheng1 for resolving all 14 review threads and the cross-file VDSS references in commit 6324874. All GitHub Actions checks, Stage 2 unit tests, and five terraform plan topologies covering default Private Service Connect, vpc-sc, centralized Secure Web Proxy egress, air-gapped Private Google Access, and custom Network Connectivity Center hubs pass cleanly.
One non-blocking follow-up note on optional centralized_egress.route_tags in fast/stages-aw/2-networking-a-fedramp/egress.tf at lines 173 and 189 and fast/stages-aw/2-networking-a-fedramp/variables.tf at line 71: Network Connectivity Center static routes require cross-spoke next_hop_ilb routes to be untagged, so setting a non-empty route_tags list succeeds during terraform apply while dropping outbound packets from tagged hub and spoke VMs at runtime. Default centralized_egress.enabled deployments leave route_tags unset and route cleanly, so route_tags can be removed in a small follow-up PR after merge.
Description
Modernizes
fast/stages-aw/2-networking-a-fedrampto implement the 1st-Party Google Cloud Network Landing Zone architecture (leaving2-networking-b-il5-ngfwuntouched):STARNCC Hub (net-hub.tf,factory-ncc.tf,schemas/ncc-hub.schema.json): Replaces the DoD VDSS two-VPC +simple-nvalayout (net-vdss.tf,nva.tf,module.peering-envs) withmodule.hub-project(<prefix>-net-hub-host),module.hub-vpc(hub-0), and a defaultSTAR-topology Network Connectivity Center hub (main,enable_default_ncc_hub = true,export_psc = true) placinghub-0incenterand<env>-spoke-0VPCs inedge, extensible viadata/ncc-hubs/*.yamlandvar.ncc_hubsforvpcs,tunnels,vlan_attachments, androuter_appliancesspokes.modules/net-firewall-policy): Replaces per-VPC classic firewall rules (modules/net-vpc-firewall,var.firewall_rules) with per-VPC Global Network Firewall Policies (module.hub-firewall-policy,module.env-spoke-firewall-policy,module.egress-firewall-policy,firewall_policy_enforcement_order = "BEFORE_CLASSIC_FIREWALL") supporting Cloud NGFW Essentials (L4 + IAM secure tags), Standard (fqdns,region_codes,threat_intelligences), and Enterprise (apply_security_profile_groupviavar.security_profile_group_ids+tls_inspect) inline viavar.firewall_policy_rulesor YAML files underdata/firewall-policies/.psc-google-apis.tf,var.psc_google_apis): Provisions dedicated non-transitive PSC Google APIs endpoints (modules/net-addresstargetingall-apisorvpc-sc), privatep.googleapis.com.DNS zones (modules/dns), andgoogleapisCloud DNS response policies (modules/dns-response-policy) inhub-0(accessible from on-premises via inbound DNS forwarding), each<env>-spoke-0VPC, and the optionalegress-0VPC.egress.tf,var.enable_cloud_nat,var.centralized_egress): Defaults to per-VPC Cloud NAT gateways, with an opt-inegress-0VPC spoke (centralized_egress.enabled = true) in the NCCmain/centergroup running Secure Web Proxy (modules/net-swp) inNEXT_HOP_ROUTING_MODEpaired withENDPOINT_TYPE_SWGCloud NAT and automatic0.0.0.0/0next-hop IP routes fromhub-0and<env>-spoke-0.Type of Change
Deployment & Compliance Impact
2-networking-a-fedrampvia NCCSTARcenter/edgegroup isolation, folder hierarchical + per-VPC Global Network Firewall Policies (Cloud NGFW Essentials/Standard/Enterprise), per-VPC PSC Google APIs endpoints, and distributed Cloud NAT or centralized Secure Web Proxy L7 egress without unmanagedsimple-nvaVMs.Checklist
Code Quality & Reusability
modules/orfast/stages-aw/can be leveraged for this change.docs/naming-convention.md.Documentation
README.mdof the modified module or blueprint.Security
Testing
Testing Performed
terraform fmt -recursive -check&terraform validateon2-networking-a-fedrampterraform plan -refresh=falseacross 3 topologies:psc_google_apis.enabled = true,enable_cloud_nat = true, Global Network Firewall Policies,mainSTARNCC hub)centralized_egress.enabled = true,NEXT_HOP_ROUTING_MODE,ENDPOINT_TYPE_SWGNAT,vpc-scPSC bundle, Cloud NGFW Standardfqdns/threat_intelligences+ Enterpriseapply_security_profile_grouprules)psc_google_apis.enabled = false,enable_cloud_nat = false)tools/tflint.sh,tools/check_documentation.py,tools/check_links.py,tools/check_names.py,tools/check_boilerplate.pypytest&ruff checkBreaking Changes