<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Implement Google Cloud Organization Restrictions in General Articles</title>
    <link>https://live.paloaltonetworks.com/t5/general-articles/implement-google-cloud-organization-restrictions/ta-p/537284</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="mmclimans_1-1680296188803.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49192i63D0D4A1A9F8166B/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="mmclimans_1-1680296188803.png" alt="mmclimans_1-1680296188803.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Introduction&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Security administrators can use &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/iam" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Google Cloud IAM&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; to control who can access resources within a Google Cloud organization.&amp;nbsp; However, companies&amp;nbsp; may require the ability to restrict access to resources and APIs that reside in different Google Cloud organizations.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The combination of Palo Alto Networks URL filtering and Google Cloud &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/overview" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;organization restrictions&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, enables security teams to restrict employee access to sanctioned Google Cloud organizations.&amp;nbsp; The capability provides a variety of security benefits including, preventing insider attacks and also stopping data exfiltration.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;Use-Cases&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;There are many use-cases for organization restrictions, for example:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In combination with Palo Alto Networks URL Filtering, you can monitor and control sites users can access, prevent phishing attacks by controlling the sites to which users can submit valid corporate credentials, and enforce safe search for search engines like Google.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;You can restrict access so employees can only &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/examples-org-restrictions#access-your-org" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;access resources in your Google Cloud organization&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; and not other organizations.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;You can &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/examples-org-restrictions#access-read-org" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;allow your employees read-only access to any Cloud Storage resources&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, but restrict all other types of access to only resources in your Google Cloud Organization.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;You can &lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/examples-org-restrictions#access-vendor-org" target="_blank" rel="noopener"&gt;allow your employees to access a vendor Google Cloud organization&lt;/A&gt; in addition to your Google Cloud organization.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;How it works&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;The diagram below shows the required components to enforce organization restrictions.&amp;nbsp; When a managed device accesses a Google Cloud resource, the URL Filtering profile defined within the security policy, inserts the value for the organization restrictions header,&amp;nbsp;&lt;CODE&gt;X-Goog-Allowed-Resources&lt;/CODE&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditormmclimans_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="mmclimans_4-1680296396713.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49193iC44449717101B6CC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="mmclimans_4-1680296396713.png" alt="mmclimans_4-1680296396713.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Managed device&lt;/STRONG&gt;&lt;SPAN&gt;: Any device that adheres to the organizational policies of the company and is connected to, or routed through, a Palo Alto Networks enforcement point with URL Filtering enabled.&amp;nbsp; For example, the managed device can be a remote user connected with GlobalProtect, a datacenter server protected by a PA-Series NGFW, or cloud resources protected by VM-Series NGFW.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Palo Alto Networks URL Filtering&lt;/STRONG&gt;&lt;SPAN&gt;: A URL Filtering profile is created and attached to the security policy.&amp;nbsp; The profile inserts the organization restriction as a &lt;/SPAN&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-admin/app-id/http-header-insertion/http-header-insertion-create-custom" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;custom header&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for any requests originating from the managed device.&amp;nbsp; This configuration prevents users and devices from accessing any Google Cloud resources that reside in unsanctioned Google Cloud organizations.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Google Cloud&lt;/STRONG&gt;&lt;SPAN&gt;: The organization restrictions feature in Google Cloud inspects all requests for organization restrictions header, and allows or denies the requests based on the organization being accessed.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;Example Scenario&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;The network security administrator of &lt;CODE&gt;Organization A&lt;/CODE&gt;, wants to allow employee access to resources hosted in their Google Cloud organization.&amp;nbsp; All employee access to cloud resources hosted in all other Google Cloud organizations should be denied.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Configuration&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;A cloud and network security administrator for &lt;CODE&gt;Organization A&lt;/CODE&gt; perform the following steps to implement organization restrictions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="1"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Retrieve the Google Cloud organization ID for &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;gcloud organizations list&lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;(output)&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;DISPLAY_NAME: Organization A
ID: 0123456
DIRECTORY_CUSTOMER_ID: a1b2c3d4&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="2"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Create a JSON representation for the value that will be assigned to the organization restriction header,&amp;nbsp;&lt;CODE&gt;X-Goog-Allowed-Resources&lt;/CODE&gt;, and save it to a file named &lt;CODE&gt;authorized_orgs.json&lt;/CODE&gt;.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Please see &lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/configure-organization-restrictions#create_the_header" target="_blank" rel="noopener"&gt;configure organization restrictions&lt;/A&gt; for complete information on constructing the value for the header.&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;{
   "resources": ["organizations/0123456"],
   "options": "strict"
}&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="3"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Encode the header value in base64 format.&amp;nbsp; Below is an example using&amp;nbsp; &lt;/SPAN&gt;&lt;A href="https://man7.org/linux/man-pages/man1/basenc.1.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;basenc&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. &amp;nbsp; The URL Filtering profile will insert the base64 string as the value for the &lt;/SPAN&gt;&lt;SPAN&gt;X-Goog-Allowed-Resources&lt;/SPAN&gt;&lt;SPAN&gt; header.&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;cat authorized_orgs.json | basenc --base64url -w0&lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;(output)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;fdsasdfInJlc291cmNlasjdfaJnYW5pemF0ay8xMjM0NTY3ODkiXSwKICJvcHRpb25zIjogInN0cmljdCIKfQo​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="4"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;If there are no upstream devices decrypting HTTPS traffic, &lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-admin/decryption/configure-ssl-forward-proxy" target="_blank" rel="noopener"&gt;configure SSL Forward Proxy&lt;/A&gt;.&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="5"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;On the Palo Alto Networks device, edit or &lt;/SPAN&gt;&lt;A href="https://docs.paloaltonetworks.com/content/techdocs/en_US/pan-os/9-1/pan-os-admin/url-filtering/configure-url-filtering.html#id3d8708ea-76d3-49dd-8568-47136fb02950" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;create a URL Filtering profile&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; In the profile, click &lt;/SPAN&gt;&lt;STRONG&gt;HTTP Header Insertion → Add&lt;/STRONG&gt;&lt;SPAN&gt; to create a new entry.&amp;nbsp; Configure the entry as follows:&lt;/SPAN&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;STRONG&gt;Header&lt;/STRONG&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;&lt;CODE&gt;X-Goog-Allowed-Resources&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;SPAN&gt;: Add the base64 encoded value from the previous step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mmclimans_0-1680297275872.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49194i76CBD60D4F22A705/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="mmclimans_0-1680297275872.png" alt="mmclimans_0-1680297275872.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="6"&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;SPAN&gt;Apply the URL Filtering profile to your security policy that inspects the managed device’s internet traffic.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="7"&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;SPAN&gt;Commit the changes. &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;H3&gt;Verify Configuration&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;The organization restrictions are applied for access to the Google Cloud APIs and Google Cloud console. On a managed device that has access to both &lt;CODE&gt;Organization A&lt;/CODE&gt; and &lt;CODE&gt;Organization B&lt;/CODE&gt;, perform the following to test the organization restrictions feature.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="1"&gt;
&lt;LI&gt;&lt;SPAN&gt;On the managed device, log into the Google Cloud &lt;A href="https://console.cloud.google.com/" target="_blank" rel="noopener"&gt;Console&lt;/A&gt; with an account that has access to &lt;CODE&gt;Organization A&lt;/CODE&gt; and &lt;CODE&gt;Organization B&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="2"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the Console, click the Organization drop down menu.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;SPAN&gt;&lt;FONT color="#808080"&gt;Even though the user account on the managed device has access to&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt; &lt;FONT color="#808080"&gt;and&lt;/FONT&gt; &lt;CODE&gt;Organization B&lt;/CODE&gt;&lt;FONT color="#808080"&gt;, only&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt; &lt;FONT color="#808080"&gt;appears in the Google Cloud Console.&amp;nbsp; This is because the URL Filtering profile inserts the organization restriction header to enable Google Cloud to block the user from accessing other organizations.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mmclimans_1-1680297558320.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49196i2408A77FA26AE07E/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="mmclimans_1-1680297558320.png" alt="mmclimans_1-1680297558320.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;&lt;SPAN&gt;From the same managed device, attempt to reach the logging API of a Google Project (i.e.&lt;CODE&gt;org-a-project&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;) that belongs to &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;The request should show a successful return of the log entries within the Google Cloud project belonging to&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TOKEN=$(gcloud auth print-access-token)

curl -X POST -d '{"projectIds": ["org-a-project"]}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${TOKEN}" "https://logging.googleapis.com/v2/entries:list"
      &lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;(output)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;{
   [
      &amp;lt;..redacted..&amp;gt;
   ]
   nextPageToken": "EAB&amp;lt;..redacted..&amp;gt;RsAB"
}&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="4"&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Attempt to reach the logging API of a Google Cloud project (i.e. org-b-project) that does not belong to &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;The request should show a failed return to the Google Cloud project that does not belong to&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt;&lt;FONT color="#808080"&gt;.&amp;nbsp; This is because the URL filtering profile inserted the organization restriction header into the request of the managed device.&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -X POST -d '{"projectIds": ["org-b-project"]}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${TOKEN}" "https://logging.googleapis.com/v2/entries:list"&lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;(output)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;{
   "error": {
      "code": 403,
      "message": "Access denied by organization restriction. Please contact your 
                  administrator for additional information.",
      "status": "PERMISSION_DENIED",
      "details": [{
         "@type": "type.googleapis.com/google.rpc.ErrorInfo",
         "reason": "ORG_RESTRICTION_VIOLATION",
         "domain": "googleapis.com",
         "metadata": {
            "consumer": "projects/01234567890",
            "service": "logging.googleapis.com"
         }
      }]
   }
}     &lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Additional Materials&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/overview#:~:text=The%20organization%20restrictions%20feature%20lets,in%20authorized%20Google%20Cloud%20organizations." target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Google Cloud: Introduction to organization restrictions&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/configure-organization-restrictions#create_the_header" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Google Cloud: Configure organization restrictions&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-web-interface-help/objects/objects-security-profiles-url-filtering/http-header-insertion" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Palo Alto Networks: HTTP Header Insertion&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-admin/app-id/http-header-insertion/http-header-insertion-create-custom" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Palo Alto Networks: Create Custom HTTP Header Insertion Entries&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 04 May 2023 00:07:56 GMT</pubDate>
    <dc:creator>mmclimans</dc:creator>
    <dc:date>2023-05-04T00:07:56Z</dc:date>
    <item>
      <title>Implement Google Cloud Organization Restrictions</title>
      <link>https://live.paloaltonetworks.com/t5/general-articles/implement-google-cloud-organization-restrictions/ta-p/537284</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="mmclimans_1-1680296188803.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49192i63D0D4A1A9F8166B/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="mmclimans_1-1680296188803.png" alt="mmclimans_1-1680296188803.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Introduction&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Security administrators can use &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/iam" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Google Cloud IAM&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; to control who can access resources within a Google Cloud organization.&amp;nbsp; However, companies&amp;nbsp; may require the ability to restrict access to resources and APIs that reside in different Google Cloud organizations.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The combination of Palo Alto Networks URL filtering and Google Cloud &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/overview" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;organization restrictions&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, enables security teams to restrict employee access to sanctioned Google Cloud organizations.&amp;nbsp; The capability provides a variety of security benefits including, preventing insider attacks and also stopping data exfiltration.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;Use-Cases&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;There are many use-cases for organization restrictions, for example:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In combination with Palo Alto Networks URL Filtering, you can monitor and control sites users can access, prevent phishing attacks by controlling the sites to which users can submit valid corporate credentials, and enforce safe search for search engines like Google.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;You can restrict access so employees can only &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/examples-org-restrictions#access-your-org" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;access resources in your Google Cloud organization&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; and not other organizations.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;You can &lt;/SPAN&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/examples-org-restrictions#access-read-org" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;allow your employees read-only access to any Cloud Storage resources&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, but restrict all other types of access to only resources in your Google Cloud Organization.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;You can &lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/examples-org-restrictions#access-vendor-org" target="_blank" rel="noopener"&gt;allow your employees to access a vendor Google Cloud organization&lt;/A&gt; in addition to your Google Cloud organization.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;How it works&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;The diagram below shows the required components to enforce organization restrictions.&amp;nbsp; When a managed device accesses a Google Cloud resource, the URL Filtering profile defined within the security policy, inserts the value for the organization restrictions header,&amp;nbsp;&lt;CODE&gt;X-Goog-Allowed-Resources&lt;/CODE&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditormmclimans_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="mmclimans_4-1680296396713.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49193iC44449717101B6CC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="mmclimans_4-1680296396713.png" alt="mmclimans_4-1680296396713.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Managed device&lt;/STRONG&gt;&lt;SPAN&gt;: Any device that adheres to the organizational policies of the company and is connected to, or routed through, a Palo Alto Networks enforcement point with URL Filtering enabled.&amp;nbsp; For example, the managed device can be a remote user connected with GlobalProtect, a datacenter server protected by a PA-Series NGFW, or cloud resources protected by VM-Series NGFW.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Palo Alto Networks URL Filtering&lt;/STRONG&gt;&lt;SPAN&gt;: A URL Filtering profile is created and attached to the security policy.&amp;nbsp; The profile inserts the organization restriction as a &lt;/SPAN&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-admin/app-id/http-header-insertion/http-header-insertion-create-custom" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;custom header&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for any requests originating from the managed device.&amp;nbsp; This configuration prevents users and devices from accessing any Google Cloud resources that reside in unsanctioned Google Cloud organizations.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Google Cloud&lt;/STRONG&gt;&lt;SPAN&gt;: The organization restrictions feature in Google Cloud inspects all requests for organization restrictions header, and allows or denies the requests based on the organization being accessed.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;Example Scenario&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;The network security administrator of &lt;CODE&gt;Organization A&lt;/CODE&gt;, wants to allow employee access to resources hosted in their Google Cloud organization.&amp;nbsp; All employee access to cloud resources hosted in all other Google Cloud organizations should be denied.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Configuration&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;A cloud and network security administrator for &lt;CODE&gt;Organization A&lt;/CODE&gt; perform the following steps to implement organization restrictions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="1"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Retrieve the Google Cloud organization ID for &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;gcloud organizations list&lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;(output)&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;DISPLAY_NAME: Organization A
ID: 0123456
DIRECTORY_CUSTOMER_ID: a1b2c3d4&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="2"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Create a JSON representation for the value that will be assigned to the organization restriction header,&amp;nbsp;&lt;CODE&gt;X-Goog-Allowed-Resources&lt;/CODE&gt;, and save it to a file named &lt;CODE&gt;authorized_orgs.json&lt;/CODE&gt;.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Please see &lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/configure-organization-restrictions#create_the_header" target="_blank" rel="noopener"&gt;configure organization restrictions&lt;/A&gt; for complete information on constructing the value for the header.&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;{
   "resources": ["organizations/0123456"],
   "options": "strict"
}&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="3"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Encode the header value in base64 format.&amp;nbsp; Below is an example using&amp;nbsp; &lt;/SPAN&gt;&lt;A href="https://man7.org/linux/man-pages/man1/basenc.1.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;basenc&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. &amp;nbsp; The URL Filtering profile will insert the base64 string as the value for the &lt;/SPAN&gt;&lt;SPAN&gt;X-Goog-Allowed-Resources&lt;/SPAN&gt;&lt;SPAN&gt; header.&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;cat authorized_orgs.json | basenc --base64url -w0&lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;(output)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;fdsasdfInJlc291cmNlasjdfaJnYW5pemF0ay8xMjM0NTY3ODkiXSwKICJvcHRpb25zIjogInN0cmljdCIKfQo​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="4"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;If there are no upstream devices decrypting HTTPS traffic, &lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-admin/decryption/configure-ssl-forward-proxy" target="_blank" rel="noopener"&gt;configure SSL Forward Proxy&lt;/A&gt;.&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="5"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;On the Palo Alto Networks device, edit or &lt;/SPAN&gt;&lt;A href="https://docs.paloaltonetworks.com/content/techdocs/en_US/pan-os/9-1/pan-os-admin/url-filtering/configure-url-filtering.html#id3d8708ea-76d3-49dd-8568-47136fb02950" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;create a URL Filtering profile&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; In the profile, click &lt;/SPAN&gt;&lt;STRONG&gt;HTTP Header Insertion → Add&lt;/STRONG&gt;&lt;SPAN&gt; to create a new entry.&amp;nbsp; Configure the entry as follows:&lt;/SPAN&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;STRONG&gt;Header&lt;/STRONG&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;&lt;CODE&gt;X-Goog-Allowed-Resources&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;SPAN&gt;: Add the base64 encoded value from the previous step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mmclimans_0-1680297275872.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49194i76CBD60D4F22A705/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="mmclimans_0-1680297275872.png" alt="mmclimans_0-1680297275872.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="6"&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;SPAN&gt;Apply the URL Filtering profile to your security policy that inspects the managed device’s internet traffic.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="7"&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;SPAN&gt;Commit the changes. &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;H3&gt;Verify Configuration&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;The organization restrictions are applied for access to the Google Cloud APIs and Google Cloud console. On a managed device that has access to both &lt;CODE&gt;Organization A&lt;/CODE&gt; and &lt;CODE&gt;Organization B&lt;/CODE&gt;, perform the following to test the organization restrictions feature.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="1"&gt;
&lt;LI&gt;&lt;SPAN&gt;On the managed device, log into the Google Cloud &lt;A href="https://console.cloud.google.com/" target="_blank" rel="noopener"&gt;Console&lt;/A&gt; with an account that has access to &lt;CODE&gt;Organization A&lt;/CODE&gt; and &lt;CODE&gt;Organization B&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="2"&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the Console, click the Organization drop down menu.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;SPAN&gt;&lt;FONT color="#808080"&gt;Even though the user account on the managed device has access to&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt; &lt;FONT color="#808080"&gt;and&lt;/FONT&gt; &lt;CODE&gt;Organization B&lt;/CODE&gt;&lt;FONT color="#808080"&gt;, only&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt; &lt;FONT color="#808080"&gt;appears in the Google Cloud Console.&amp;nbsp; This is because the URL Filtering profile inserts the organization restriction header to enable Google Cloud to block the user from accessing other organizations.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mmclimans_1-1680297558320.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/49196i2408A77FA26AE07E/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="mmclimans_1-1680297558320.png" alt="mmclimans_1-1680297558320.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;&lt;SPAN&gt;From the same managed device, attempt to reach the logging API of a Google Project (i.e.&lt;CODE&gt;org-a-project&lt;/CODE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;) that belongs to &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;The request should show a successful return of the log entries within the Google Cloud project belonging to&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TOKEN=$(gcloud auth print-access-token)

curl -X POST -d '{"projectIds": ["org-a-project"]}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${TOKEN}" "https://logging.googleapis.com/v2/entries:list"
      &lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;(output)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;{
   [
      &amp;lt;..redacted..&amp;gt;
   ]
   nextPageToken": "EAB&amp;lt;..redacted..&amp;gt;RsAB"
}&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;BR /&gt;
&lt;OL start="4"&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Attempt to reach the logging API of a Google Cloud project (i.e. org-b-project) that does not belong to &lt;CODE&gt;Organization A&lt;/CODE&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;The request should show a failed return to the Google Cloud project that does not belong to&lt;/FONT&gt; &lt;CODE&gt;Organization A&lt;/CODE&gt;&lt;FONT color="#808080"&gt;.&amp;nbsp; This is because the URL filtering profile inserted the organization restriction header into the request of the managed device.&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -X POST -d '{"projectIds": ["org-b-project"]}' -H 'Content-Type: application/json' -H "Authorization: Bearer ${TOKEN}" "https://logging.googleapis.com/v2/entries:list"&lt;/LI-CODE&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;(output)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;LI-CODE lang="markup"&gt;{
   "error": {
      "code": 403,
      "message": "Access denied by organization restriction. Please contact your 
                  administrator for additional information.",
      "status": "PERMISSION_DENIED",
      "details": [{
         "@type": "type.googleapis.com/google.rpc.ErrorInfo",
         "reason": "ORG_RESTRICTION_VIOLATION",
         "domain": "googleapis.com",
         "metadata": {
            "consumer": "projects/01234567890",
            "service": "logging.googleapis.com"
         }
      }]
   }
}     &lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Additional Materials&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/overview#:~:text=The%20organization%20restrictions%20feature%20lets,in%20authorized%20Google%20Cloud%20organizations." target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Google Cloud: Introduction to organization restrictions&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://cloud.google.com/resource-manager/docs/organization-restrictions/configure-organization-restrictions#create_the_header" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Google Cloud: Configure organization restrictions&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-web-interface-help/objects/objects-security-profiles-url-filtering/http-header-insertion" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Palo Alto Networks: HTTP Header Insertion&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-admin/app-id/http-header-insertion/http-header-insertion-create-custom" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Palo Alto Networks: Create Custom HTTP Header Insertion Entries&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 May 2023 00:07:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-articles/implement-google-cloud-organization-restrictions/ta-p/537284</guid>
      <dc:creator>mmclimans</dc:creator>
      <dc:date>2023-05-04T00:07:56Z</dc:date>
    </item>
  </channel>
</rss>

