Secure Web Proxy is a regional service. By default, your clients must be in the same Google Cloud region as the Secure Web Proxy instance.
When you enable global access for a Secure Web Proxy instance, clients can connect from any region, not only the region where the proxy is deployed. This feature supports the following use cases:
Outbound traffic from a specific region: to meet cost-optimization or regulatory compliance requirements, you can enforce all outbound internet traffic to exit from a particular region.
Cross-region failover: if the primary proxy experiences any issues, you can manually redirect traffic to an alternative Secure Web Proxy instance in a different region.
Benefits
Increased reliability and availability: if a regional outage occurs, you can reroute traffic to alternative Secure Web Proxy instances in other available regions. To reroute traffic, you can either adjust routes for next hop mode or change DNS records for explicit proxy mode.
Simplified network management: manage your outbound traffic from a centralized location to simplify network administration for your organization.
Enable global access
To enable global access, you must set the allow_global_access field to true
in your gateway.yaml file when you create a Secure Web Proxy instance.
You can enable global access for Secure Web Proxy in the following deployment modes:
Configuration example
The following example shows how to enable global access when you create a Secure Web Proxy instance in the explicit proxy deployment mode:
Use a text editor to create a
gateway.yamlfile.Add the following code to the
gateway.yamlfile with theallow_global_accessfield set totrue.name: projects/PROJECT_ID/locations/REGION /gateways/swp1 type: SECURE_WEB_GATEWAY addresses: ["IP_ADDRESS"] ports: [443] gatewaySecurityPolicy: projects/PROJECT_ID/locations/REGION/gatewaySecurityPolicies/policy1 network: projects/PROJECT_ID/global/networks/ NETWORK subnetwork: projects/PROJECT_ID/regions/REGION /subnetworks/SUBNETWORK routingMode: EXPLICIT_ROUTING_MODE allow_global_access: trueReplace the following:
PROJECT_ID: ID of your projectREGION: region of your Secure Web Proxy instanceIP_ADDRESS: IP address of your Secure Web Proxy instanceNETWORK: network of your Secure Web Proxy instanceSUBNETWORK: subnetwork of your Secure Web Proxy instance. You must use the VPC subnet that you created as part of the initial setup steps.
To create the Secure Web Proxy instance, use the
gcloud network-services gateways importcommand.gcloud network-services gateways import swp1 \ --source=gateway.yaml
Identity attributes in policy rules
Identity attributes, such as service accounts and tags, that are available for use in Secure Web Proxy policy rules remain functional regardless of whether you enable the global access feature.
Client applications and workloads from various Google Cloud regions can provide their identities, which your Secure Web Proxy instance can then use to enforce your policy rules. For more information, see Supported identities for source attributes.
Logging and monitoring
Secure Web Proxy logs include information about the source of your outbound traffic. When you enable global access for your Secure Web Proxy instance, the logs show a client application's original region, even if it differs from your proxy region. For more information, see Logs and metrics.
What's next
- TLS inspection overview
- Create an authorization policy
- Create a gateway security policy
- Create a gateway security rule