Secure access to SaaS applicationsStay organized with collectionsSave and categorize content based on your preferences.
This page guides you through the process of securing your SaaS applications
through the Chrome Enterprise Premium secure gateway.
A Chrome Enterprise Premium secure gateway functions as a forward proxy, enforcing a
zero trust access framework and delivering granular, context-aware control over
who accesses your SaaS applications.
How securing access to SaaS applications works
The following is a high level overview of how a secure gateway protects your
SaaS applications:
The client-side browser settings route application traffic through a secure
gateway proxy.
The secure gateway checks Context-Aware Access policies to authorize client (user
and device) access.
If client access is allowed, the gateway forwards traffic to the application
using unique source IP addresses assigned to that gateway and Google Cloud
region. These assigned IP addresses are reserved exclusively for the gateway
that you create and cannot be used by other users or gateways. To control
access, you can add these dedicated source IP addresses to an allowlist in
your SaaS application.
Before you begin
Before setting up the secure gateway, verify that you have the following:
A SaaS application that you want to protect. The application must supportIP allowlistingto enforce security checks by the secure gateway.
Limitations
A Chrome Enterprise Premium secure gateway has the following limitations:
IPv6 connectivity: Chrome Enterprise Premium secure gateway doesn't support SaaS
applications that use IPv6 connectivity.
Identity provider as a SaaS application: An Identity provider must not be
configured as a SaaS application to be protected by the secure gateway, if
the end-user's authentication with secure gateway is dependent on the same
IdP.
Set up your shell environment
To streamline the setup process and interact with the secure gateway APIs,
define the following environment variables in your working shell.
PROJECT_ID: The ID of the project where the
secure gateway is created.
APPLICATION_ID: The ID of your application, such
asgithub. The name can be up to 63 characters, and can contain
lowercase letters, numbers, and hyphens. The first character must be a
letter, and the last character can be a letter or number.
APPLICATION_DISPLAY_NAME: The human-readable name
to display.
HOST_NAME: The hostname of your application. For
example,github.com. The hostname can be up to 253 characters
long, and must adhere to one of the following formats:
SECURITY_GATEWAY_ID: The ID of the secure
gateway. The ID can be up to 63 characters, and can contain lowercase
letters, numbers, and hyphens. The first character should be a letter, and
the last character can be a letter or number.
SECURITY_GATEWAY_DISPLAY_NAME: The human-readable
name of the secure gateway. The name can be up to 63 characters long and can
only contain printable characters.
Create a secure gateway
A Chrome Enterprise Premium secure gateway is a fundamental building block for
establishing secure connections to your applications. It allocates a dedicated
project and network, providing isolation and security.
On theSaaS Egress Hubspage, find the table listing the hubs. For each region you intend to use, copy all the IP addresses listed in theStatic dedicated egress IPscolumn. Each region provides two IP addresses.
The following is a sampleGETresponse of a secure gateway withhubs. In the example,hubsare created in theus-central1andus-east1regions, and all of the
IP addresses returned in the response must be allowed in the SaaS
application.
The following is a sampleGETresponse of a secure gateway withhubs. In the example,hubsare created in theus-central1andus-east1regions, and all of the
IP addresses returned in the response must be allowed in the SaaS
application.
The following information guides you through the process of setting up and
configuring a secure gateway application resource.
Create a secure gateway application resource in Google Cloud
The Google Cloud application resource is a sub-resource of the secure
gateway resource. Create an application resource by using the Google Cloud console
or calling theCreateAPI.
You can route application traffic through the secure gateway by applying a PAC
file in the Chrome settings in the Google Admin console. To
apply the PAC file, do the following:
To create or update a PAC file, do the following:
Create your first application by creating apac_config.jsfile using the following example PAC file.
Update your existingpac_config.jsfile and add the domains of your new application to the sites array, as shown in the following example PAC file.
ReplaceHOST_NAMEwith the hostname of your application—for
example,myapp.example.com.
If you're using an existing PAC file that's not specific to a secure
gateway, merge the PAC files by adding the domains of your application
to the sites array.
Upload the file so that it's publicly downloadable. For example, you canupload the file to
Cloud Storage, and make
the file publicly downloadable by granting all of the users theStorage Object Userrole on the bucket.
To verify that the uploaded file is the latest version, you can adjust its
caching behavior by setting theCache-Controlheader tono-cache. Setting the header prevents browsers and intermediate servers from storing a copy of
the file, so that Chrome downloads the most recent version.
For more information aboutCache-Controland how it affects browser
caching, seeCache-Control header.
Select the organizational unit or group, and then clickProxy mode.
InProxy mode, selectAlways use the proxy auto-config specified below, and enter the URL of
the PAC file from Cloud Storage.
To save the proxy mode settings, clickSave.
Configure an access policy
You can apply an access policy to control access at either the secure gateway
level, which affects all associated applications, or at the individual
application level for more granular control.
console
Create a gateway-level policy
To configure an access policy, do the following:
To create a policy that applies to multiple applications linked to the secure gateway, go to thePoliciespage. Go to Policies
To add access policies to applications, clickCreate Policy.
From the drop-down list, select the applications that you'd like the policies to apply to.
Add principals to the policy:
Principals can be users, groups, domains, or service accounts. These principals are granted or denied access based on the access levels you assign.
To add a principal, clickAdd principal.
In thePrincipalfield, enter the email address of the user, group, service account, or the domain name.
In theAccess Levelsdrop-down, select one or more predefinedContext-Aware Accesslevels. Access is granted only if the principal meets the conditions of the selected access levels.
To add more principals, clickAdd principalagain and repeat the substeps.
To apply the policy to the application, clickCreate Policy.
Modify an application-level access policy
To modify a policy for a single application, go to theApplicationspage. Go to Applications
To find the application that you want to edit, do the following:
In theApplicationslist, search for the application that you want to modify.
To view the application details, click theMore actionsmenu (more_vert) and selectView Details.
To edit the application, clickEdit.
Add principals to the policy:
Principals can be users, groups, domains, or service accounts. These principals are granted or denied access based on the access levels you assign.
To add a principal, clickAdd principal.
In thePrincipalfield, enter the email address of the user, group, service account, or the domain name.
In theAccess Levelsdrop-down list, select one or more predefined Context-Aware Access levels. Access is granted only if the principal meets the conditions of the selected access levels.
To add more principals, clickAdd principalagain and repeat the substeps.
To apply the policy to the application, clickSave.
gcloud
Safely update an access policy
ThesetIamPolicycommand replaces the entire existing policy with the one that
you provide. To avoid accidentally removing existing permissions, we recommend
that you use the following "read-modify-write" pattern. This pattern helps
prevent accidental removal of existing permissions.
Read: First, get the current access policy.
Modify: Edit the policy file locally to add or change permissions.
Write: Apply your updated policy file.
Get the current policy
Retrieve the current policy before making any changes. Theetagfield in the policy acts as a version identifier. It prevents
conflicting updates if multiple administrators make changes simultaneously.
The following command retrieves the policy and saves it to a file namedpolicy.json.
APPLICATION_ID: the ID of the application resource
SECURITY_GATEWAY_ID: the ID of the secure gateway
PROJECT_ID: the ID of the project where the secure gateway is configured
The command creates apolicy.jsonfile that contains the current
policy.
Modify the policy file
Open thepolicy.jsonfile in a text editor. To grant a group access to use the
secure gateway, add the group to thememberslist for theroles/beyondcorp.securityGatewayUserrole.
Thepolicy.jsonfile is similar to the following example:
To add an additional group, add a new entry to themembersarray. Include a
comma after the preceding entry.
The following example addsnew-group@example.com:
You can also add other types of members, such asserviceAccount,user,group,principal, andprincipalSet, in policy bindings. SeeIAM principalsfor
more information.
Apply the updated policy
After editing and saving yourpolicy.jsonfile, apply it to the resource using
thesetIamPolicycommand. This command uses theetagfrom your file to
ensure that you update the correct version.
APPLICATION_ID: the ID of the application resource
SECURITY_GATEWAY_ID: the ID of the secure gateway
PROJECT_ID: the ID of the project where the secure gateway is configured
Add a conditional access policy
You can also set access policies with conditions. Conditions specify
requirements, such as a user's IP address originating from a specific location.
The following example policy grants access only if the source IP address is
within a specified access level:
{"version":3,"bindings":[{"role":"roles/beyondcorp.securityGatewayUser","members":["group:group@example.com"],"condition":{"expression":"request.auth.access_levels.contains('accessPolicies/1234567890/accessLevels/in_us')","title":"Source IP must be in US"}}],"etag":"BwXN8_d-bOM="}
To apply this policy, follow thestepsdescribed earlier.
REST
Safely update an access policy
ThesetIamPolicycommand replaces the entire existing policy with the one that
you provide. To avoid accidentally removing existing permissions, we recommend
that you use the following "read-modify-write" pattern. This pattern helps
prevent accidental removal of existing permissions.
Read: Save the current access policy to a file.
Modify: Edit the policy file locally to add or change permissions.
Write: Apply your updated policy file.
Get the current policy
Retrieve the current policy before making any changes. Theetagfield in the policy acts as a version identifier. It prevents
conflicting updates if multiple administrators make changes simultaneously.
The following command retrieves the policy and saves it to a file namedpolicy.json.
To add an additional group, add a new entry to themembersarray. Include a
comma after the preceding entry.
The following example addsnew-group@example.com:
You can also add other types of members, such asserviceAccount,user,group,principal, andprincipalSet, in policy bindings. SeeIAM principalsfor more
information.
Apply the updated policy
After editing and saving yourpolicy.jsonfile, apply it to the resource using
thesetIamPolicycommand. This command uses theetagfrom your file to
ensure that you update the correct version.
PROJECT_ID: the ID of the project where the secure gateway is configured
SECURITY_GATEWAY_ID: the ID of the secure gateway
APPLICATION_ID: the ID of the application resource
Add a conditional access policy
You can also set access policies with conditions. Conditions specify
requirements, such as a user's IP address originating from a specific location.
The following example policy grants access only if the source IP address is
within a specified access level:
{"version":3,"bindings":[{"role":"roles/beyondcorp.securityGatewayUser","members":["group:group@example.com"],"condition":{"expression":"request.auth.access_levels.contains('accessPolicies/1234567890/accessLevels/in_us')","title":"Source IP must be in US"}}],"etag":"BwXN8_d-bOM="}
To apply this policy, follow thestepsdescribed earlier.
Enhance Security with Context-Aware Access
To further enhance security and ensure that only managed Google Chrome
instances can access your web applications through the Security Gateway, we
recommend adding a Context-Aware Access (CAA) rule. This rule verifies that the
user's Chrome profile is under management, preventing potential
misuse from unmanaged or malicious browsers.
You can implement this by adding a condition to your access levels in
Chrome Enterprise Premium Access Context Manager. Here is an example condition you can adapt:
The Chrome Enterprise Premium extension is an integral part of a secure gateway, and it
helps with authentication. Install the extension for all of the users of the
secure gateway. For information about deploying the extension, seeView and
configure apps and
extensions. To install the
Chrome Enterprise Premium extension, do the following:
PROJECT_ID: the ID of the project where the secure gateway is configured
SECURITY_GATEWAY_ID: the ID of the secure gateway
To save the configuration, clickSave.
End user experience
When the setup is complete, end users who access the protected SaaS application
are granted or denied access based on the access policy applied to the
application.
Accessing the application in Chrome
The Chrome Enterprise Premium extensionis required to direct traffic through the secure gateway. The extension handles
the authentication between the user and the secure gateway. The extension is
automatically installed through the domain policy.
When users access the SaaS application that you configured, their traffic goes
through the secure gateway, which checks if they satisfy the access policy. If
the users pass the access policy checks, they're granted access to the
application.
When browser access to the application is rejected by the authorization policy,
users receive anAccess deniedmessage.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-03-20 UTC."],[],[]]