Google Cloud API Gateway Logging

Created:
April 12, 2024
Updated:
April 26, 2024

To be able to set up the Google Cloud API Gateway Logging integration you must have an an existing GCP API Gateway. For more information go to the Google Cloud API Inventory Scanning documentation.

Following the steps below will allow you to fill out the template and will deploy all the required resources to set up the integration.

1. Navigate to Integrations in the FireTail platform.

2. Select the Create Integration tab.

3. Click Google Cloud API Gateway Logging.

4. Select an existing GCP API Gateway from the dropdown menu.

5. Generate an app token.

6. Go to https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/firetail-io/firetail-google-apigateway-logging-cloud-function. You will need to indicate that you trust the repo.

7. When the Cloud Shell editor is open, first run the below script to authenticate:


gcloud auth login

8. Follow any prompts in the editor to complete authentication.

9. Run the below script in the editor:

EU Prod


./run.sh --ft-logging-endpoint=https://api.logging.eu-west-1.prod.firetail.app
--ft-app-token=<> 
--gcp-region={region} --gcp-gateway-id={gateway_id} 
--gcp-project-num={project_number} --gcp-resource-prefix=ft-logging-{gateway_id}

US Prod


./run.sh --ft-logging-endpoint=https://api.logging.us-east-2.prod.us.firetail.app
--ft-app-token=<> 
--gcp-region={region} --gcp-gateway-id={gateway_id} 
--gcp-project-num={project_number} --gcp-resource-prefix=ft-logging-{gateway_id}

Note: The following information must be inputted into the script:

  • FireTail App token - copy the token you generated.
  • project_number - The Project number is a numerical value, found on the homepage of the GCP console.
  • gateway_id - In the GCP console, open API Gateway, select the gateway and retrieve the Gateway ID.
  • region - In the GCP console, open API Gateway, select the gateway, the region is the location.

Example


./run.sh --ft-logging-endpoint=https://api.logging.eu-west-1.prod.firetail.app
--ft-app-token=FTA-01-1234567890
--gcp-region={europe-west2} --gcp-gateway-id=mygatewayid 
--gcp-project-num={123456789} --gcp-resource-prefix=ft-logging-mygatewayid