This article explains how traffic reaches your Virtru Private Keystore (CSE server) for Google Workspace Client-side Encryption (CSE), and which firewall rules your server needs. Use it when planning your network, firewall, and load balancer configuration.
Encryption and decryption requests come from your users' browsers, not from Google's servers.
What this means for your firewall:
- Each wrap or unwrap request comes from the user's own network (office, home, VPN, mobile, or Zero Trust egress), not from a Google IP address.
- Users' browsers connect to your server directly. Your CSE server therefore needs a publicly resolvable hostname and a certificate from a trusted CA, and it must be reachable from every network your users and guests work from.
- Don't restrict client traffic to Google IP ranges. Users won't be able to encrypt or decrypt content.
- Access control is enforced by the CSE server, which validates Google's authorization token and your IdP's authentication token. Network controls are additional hardening.
- You can restrict access to your users' IP addresses if you know all of them. Where you enforce the restriction depends on your topology.
- If you use a load balancer, its health checks call
/statuson your server from the load balancer's own IP ranges.
Firewall diagrams
-
CSE Firewall Access Diagram (without VPK): direct communication with Virtru and Google endpoints.
-
CSE Firewall Access Diagram (with VPK): communication flows where a customer-hosted VPK server handles encryption key management.
Inbound rules
Port 443 (default)
- Purpose: Accepts encrypt and decrypt requests from users' browsers in Drive, Docs, Gmail, Calendar, and Meet. Also accepts the Admin console Test connection check.
- Source: Your users' devices, desktop and mobile. Also your guests' devices, if guest access is enabled. Don't limit the source to Google IP ranges.
-
Requirements:
- TLS 1.2 or later, with a certificate signed by a trusted certificate authority.
- Your CSE server must allow cross-origin (CORS) requests from
https://client-side-encryption.google.com(user operations) andhttps://admin.google.com(Test connection). If a proxy or WAF rewrites CORS headers, allow both origins.
-
Health checks: Use HTTPS on port 443 with path
/status. Each/statuscall makes outbound requests (see Outbound rules), so keep the interval reasonable, for example 30 seconds. -
Behind a proxy load balancer: The origin must allow the load balancer's source ranges and health-check ranges. On a Google Cloud global external Application Load Balancer, these are
130.211.0.0/22and35.191.0.0/16. -
Using a custom port: If you serve CSE on a port other than 443, use that port wherever this article says 443:
- the port in your CSE hostname URL in the Google Admin console
- the load balancer listener
- every inbound firewall and security group rule
- the outbound rules on your users' networks
Port 22 (optional)
- Purpose: SSH access for server management.
- Recommendation: Limit the source to your administrative network, a bastion host, or an identity-aware proxy. Don't open port 22 to the internet.
Outbound rules
Allow outbound HTTPS (port 443) from your CSE server to the hosts below. Most firewalls and egress proxies filter by hostname, so paths are listed for reference only.
| Destination host | Purpose | When needed |
|---|---|---|
containers.virtru.com |
Pull the CSE container image (/cse:<tag>) |
Deploy and upgrade |
api.virtru.com |
Virtru ACM (/acm/api/*) and Accounts (/accounts/api/*) APIs |
Runtime |
www.googleapis.com |
Google's CSE token issuer keys (/service_accounts/v1/jwk/...) and Google OAuth certificates (/oauth2/v3/certs) |
Runtime |
Other *.googleapis.com hosts |
Google APIs for Drive Labels and group lookups, if you enable label-based policies | Runtime |
Your IdP's JWKS host (for example www.googleapis.com for Google as IdP, login.microsoftonline.com, or <org>.okta.com) |
IdP public signing keys for token validation | Runtime |
cks.example.com (optional) |
Customer-hosted VPK | Runtime |
If you use a customer-hosted VPK, the VPK server also needs inbound access on its own port (443 by default) from the CSE server and from Virtru. See the VPK firewall article for the full rule set and Virtru's published source IP addresses.
Changing the container port
The container listens on port 9000. By default, run.sh maps host port 443 to it (-p 443:9000).
If you map a different host port, your load balancer or edge firewall must forward client traffic to that host port. The host port is internal and clients never see it. Clients connect on the port in your CSE hostname URL, which is 443 by default.
Change the -p flag in run.sh:
- Default:
-p 443:9000 - Custom:
-p <host-port>:9000
docker run \
--env-file ./cse.env \
-v /var/virtru/cse/server.cert:/run/secrets/server.cert \
-v /var/virtru/cse/server.key:/run/secrets/server.key \
--restart unless-stopped \
-p <host-port>:9000 \
containers.virtru.com/cse:<tag>
Google IP range references
Google publishes its IP ranges in machine-readable feeds that change over time. Use these sources to get the current ranges instead of hard-coding CIDR blocks in firewall rules.
- Obtain Google IP address ranges (Google Workspace Admin Help)
- goog.json: all Google-owned IP ranges
- cloud.json: global and regional external ranges that customers can use for Google Cloud resources
- Firewall rules | Cloud Load Balancing: source ranges for load balancer and health check traffic