Enable TLS inspection  |  Secure Web Proxy  |  Google Cloud (2024)

This page describes how to enable Transport Layer Security (TLS) inspectionfor your Secure Web Proxy instance.

Before you begin

Before you configure Secure Web Proxy for TLS inspection,complete the tasks in the following sections.

Enable CAS

Secure Web Proxy usesCertificate Authority Service (CAS)to generate the certificates used for TLS inspection.

To enable CAS, use the following command:

 gcloud services enable privateca.googleapis.com 

Create a CA pool

You must create a certificate authority (CA) pool before you can use CAS tocreate a CA. This section walks you through the permissions that you need tocomplete this task and then describes how to create a CA pool.

To generate certificates, TLS inspection uses a separate service account foreach project calledservice-{project ID}@gcp-sa-certmanager.iam.gserviceaccount.com.Make sure that you have granted permissions to this service account to useyour CA pool. If this access is revoked, TLS inspection stops working.

Permissions required for this task

To perform this task, you must have been granted the following permissions or IAM roles.

Permissions

  • networksecurity.tlsInspectionPolicies.create
  • networksecurity.tlsInspectionPolicies.get
  • networksecurity.tlsInspectionPolicies.list
  • networksecurity.tlsInspectionPolicies.delete
  • networksecurity.tlsInspectionPolicies.update

Roles

  • Compute Network Admin (roles/compute.networkAdmin)
  • Certificate Manager Editor (roles/certificatemanager.editor)
  • Optional: Security Policy Admin (roles/compute.orgSecurityPolicyAdmin)

To create the pool, use the gcloud privateca pools create command and specify the subordinate pool ID, tier, project ID, and location.

 gcloud privateca pools create SUBORDINATE_POOL_ID 
--tier=TIER
--project=PROJECT_ID
--location=REGION

Replace the following:

  • SUBORDINATE_POOL_ID: the name of the CA pool
  • TIER: the CA tier, either devops or enterprise

    We recommend that you create the CA pool in the devops tier because tracking individually issued certificates is unnecessary.

  • PROJECT_ID: the ID of the CA pool project

  • REGION: the location of the CA pool

Create a subordinate CA pool

You can create a subordinate CA pool, and the root CA signs all ofthe CAs in that pool. These certificates are used to sign servercertificates generated for TLS inspection.

To create a subordinate pool, use any of the following methods.

Create a subordinate CA pool by using an existing root CA stored within CAS

To generate a subordinate CA, do the following:

  1. Create a CA pool.
  2. Create subordinate CAs within a CA pool.

Create a subordinate CA pool by using an existing root CA held externally

To generate a subordinate CA, do the following:

  1. Create a CA pool.
  2. Create subordinate CAs signed by an external root CA.

Create a root CA

If you do not have an existing root CA, you can create one within CAS.To create a root CA, do the following:

  1. Create a root CA.
  2. Follow the steps in Create a subordinate CA pool by using an existing root CA stored within CAS.

For more information about CA pools, see theCertificate Authority Service documentation.

Create a service account

If you do not have a service account, you must create one and grantthe required permissions.

  1. Create a service account:

    gcloud beta services identity create \ --service=networksecurity.googleapis.com \ --project=PROJECT_ID

    In response, the Google Cloud CLI creates a service account called service-{project ID}@gcp-sa-networksecurity.iam.gserviceaccount.com.

  2. For the service account that you created, grant permissions to generatecertificates with your CA pool:

    gcloud privateca pools add-iam-policy-binding CA_POOL \ --member='serviceAccount:SERVICE_ACCOUNT' \ --role='roles/privateca.certificateManager' \ --location='REGION'

Configure Secure Web Proxy for TLS inspection

You can only proceed with the tasks in this section after you have completedthe prerequisite tasks listed in the Before you begin section.

To configure TLS inspection, complete the tasks in the following sections.

Create a TLS inspection policy

  1. Create the file TLS_INSPECTION_FILE.yaml. ReplaceTLS_INSPECTION_FILE with your desired filename.

  2. Add the following code to the YAML file to configure the desiredTlsInspectionPolicy:

    name: projects/PROJECT_ID/locations/REGION/tlsInspectionPolicies/TLS_INSPECTION_NAMEcaPool: projects/PROJECT_ID/locations/REGION/caPools/CA_POOL

    Replace the following:

    • PROJECT_ID: the project number
    • REGION: the region to create the policy in
    • TLS_INSPECTION_NAME: the name of theSecure Web Proxy TLS inspection policy
    • CA_POOL: the name of the CA pool to createthe certificates from

      The CA pool must exist within the same region.

Import the TLS inspection policy

Import the TLS inspection policy that you created in the previous step:

gcloud network-security tls-inspection-policies import TLS_INSPECTION_NAME \ --source=TLS_INSPECTION_FILE.yaml \ --location=REGION

Add the TLS inspection policy to the security policy

Console

Create the web proxy policy

  1. In the Google Cloud console, go to the Network Security page.

    Go to Network Security

  2. Click Secure Web Proxy.

  3. Click the Policies tab.

  4. Click Create a policy.

  5. Enter a name for the policy that you want to create, such as myswppolicy.

  6. Enter a description of the policy, such as My new swp policy.

  7. In the Regions list, select the region where you want to create the Secure Web Proxy policy.

  8. To configure TLS inspection, select Configure TLS inspection.

  9. In the TLS inspection policy list, select the TLS inspection policy that you created.

  10. If you want to create rules for your policy, click Continue, and then click Add rule. For details, see Create Secure Web Proxy rules.

  11. Click Create.

Create the web proxy rules

  1. In the Google Cloud console, go to the Network Security page.

    Go to Network Security

  2. Click Secure Web Proxy.

  3. In the project selector menu, select your organization ID or the folder that contains your policy.

  4. Click the name of your policy.

  5. Click Add rule.

  6. Populate the rule fields:

    1. Name
    2. Description
    3. Status
    4. Priority: the numeric evaluation order of the rule. The rules areevaluated from highest to lowest priority where 0 is the highestpriority.
    5. In the Action section, specify whether connections that matchthe rule are allowed (Allow) or denied (Deny).
    6. In the Session Match section, specify the criteria formatching the session. For more information about the syntax forSessionMatcher, see theCEL matcher language reference.
    7. To enable TLS inspection, select Enable TLS inspection.
    8. In the Application Match section, specify the criteria formatching the request. If you do not enable the rule for TLSinspection, then the request can only match HTTP traffic.
    9. Click Create.
  7. Click Add rule to add another rule.

  8. Click Create to create the policy.

Set up a web proxy

  1. In the Google Cloud console, go to the Network Security page.

    Go to Network Security

  2. Click Secure Web Proxy.

  3. Click the Web proxies tab.

  4. Click Set up a web proxy.

  5. Enter a name for the web proxy that you want to create, such as myswp.

  6. Enter a description of the web proxy, such as My new swp.

  7. In the Regions list, select the region where you want to create the web proxy.

  8. In the Network list, select the network where you want to create the web proxy.

  9. In the Subnetwork list, select the subnetwork where you want to create the web proxy.

  10. Enter the web proxy IP address.

  11. In the Certificate list, select the certificate that you want to use to create the web proxy.

  12. In the Policy list, select the policy that you created to associate the web proxy with.

  13. Click Create.

Cloud Shell

  1. Create the file policy.yaml:

     description: basic Secure Web Proxy policy name: projects/PROJECT_ID/locations/REGION/gatewaySecurityPolicies/policy1 tlsInspectionPolicy: projects/PROJECT_ID/locations/REGION/tlsInspectionPolicies/TLS_INSPECTION_NAME
  2. Create the Secure Web Proxy policy:

     gcloud network-security gateway-security-policies import policy1 \ --source=policy.yaml --location=REGION
  3. Create the file rule.yaml:

     name: projects/PROJECT_ID/locations/REGION/gatewaySecurityPolicies/policy1/rules/allow-example-com description: Allow example.com enabled: true priority: 1 basicProfile: ALLOW sessionMatcher: host() == 'example.com' applicationMatcher: request.path.contains('index.html') tlsInspectionEnabled: true
  4. Create the security policy rule:

     gcloud network-security gateway-security-policies rules import allow-example-com \ --source=rule.yaml \ --location=REGION \ --gateway-security-policy=policy1
  5. To attach a TLS inspection policy to an existing security policy, create the file POLICY_FILE.yaml. Replace POLICY_FILE with your desired filename.

     description: My Secure Web Proxy policy name: projects/PROJECT_ID/locations/REGION/gatewaySecurityPolicies/POLICY_NAME tlsInspectionPolicy: projects/PROJECT_ID/locations/REGION/tlsInspectionPolicies/TLS_INSPECTION_NAME

What's next?

  • Use a URL list to create policies
Enable TLS inspection  |  Secure Web Proxy  |  Google Cloud (2024)
Top Articles
14 Benefits Of Napping for College Students | Sleepopolis
FDIC accidentally reveals details about Silicon Valley Bank’s biggest customers | CNN Business
Jack Doherty Lpsg
Fighter Torso Ornament Kit
2018 Jeep Wrangler Unlimited All New for sale - Portland, OR - craigslist
neither of the twins was arrested,传说中的800句记7000词
Lighthouse Diner Taylorsville Menu
Activities and Experiments to Explore Photosynthesis in the Classroom - Project Learning Tree
Poe Pohx Profile
Bbc 5Live Schedule
104 Presidential Ct Lafayette La 70503
Crusader Kings 3 Workshop
Synq3 Reviews
Explore Top Free Tattoo Fonts: Style Your Ink Perfectly! 🖌️
Cooking Fever Wiki
Echo & the Bunnymen - Lips Like Sugar Lyrics
Voy Boards Miss America
Buy Swap Sell Dirt Late Model
Concordia Apartment 34 Tarkov
Outlet For The Thames Crossword
Barber Gym Quantico Hours
Little Rock Skipthegames
The Many Faces of the Craigslist Killer
Sherburne Refuge Bulldogs
Prep Spotlight Tv Mn
Sorrento Gourmet Pizza Goshen Photos
Tuw Academic Calendar
Churchill Downs Racing Entries
Ou Football Brainiacs
Claio Rotisserie Menu
Black Lion Backpack And Glider Voucher
Busch Gardens Wait Times
Babydepot Registry
Rvtrader Com Florida
Fox And Friends Mega Morning Deals July 2022
Rocksteady Steakhouse Menu
Sedano's Supermarkets Expands to Orlando - Sedano's Supermarkets
The Vélodrome d'Hiver (Vél d'Hiv) Roundup
Rs3 Bis Perks
The best bagels in NYC, according to a New Yorker
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Sand Castle Parents Guide
Bill Manser Net Worth
Gamestop Store Manager Pay
60 Days From May 31
Mybiglots Net Associates
M&T Bank
Conan Exiles Tiger Cub Best Food
Streameast Io Soccer
Parks And Rec Fantasy Football Names
Costco Gas Price Fort Lauderdale
E. 81 St. Deli Menu
Latest Posts
Article information

Author: Francesca Jacobs Ret

Last Updated:

Views: 5924

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Francesca Jacobs Ret

Birthday: 1996-12-09

Address: Apt. 141 1406 Mitch Summit, New Teganshire, UT 82655-0699

Phone: +2296092334654

Job: Technology Architect

Hobby: Snowboarding, Scouting, Foreign language learning, Dowsing, Baton twirling, Sculpting, Cabaret

Introduction: My name is Francesca Jacobs Ret, I am a innocent, super, beautiful, charming, lucky, gentle, clever person who loves writing and wants to share my knowledge and understanding with you.