DCAP Central Google Cloud Platform (GCP) Integration

DCAP Central support 1 GCP source of integration:

  • Importing generic Stackdriver messages.

Here are high level guidelines on how to add a GCP cloud sources:

  1. Get a GCP service account credentials json file.
  2. Start the required gateway-gcp service.
  3. Add the cloud source and enable it.

GCP Credentials json file:

Follow the google documentation on how to create a service account and get a service account key. Follow the section “Set up a service account” at:

Authenticating to a GCP Cloud API Service

Pubsub Integration:

For this sonargateway integration, it is assumed that a pubsub topic and a subscription already exists, and that json messages have been published to the topic. Sonargateway supports several message formats, and could be easily re-configured to import various message formats. To create new topics and subscriptions, and to push json messages to pubsub - follow googles’ quick start guide in the following link: Pubsub Quick Start

  1. Start the relevant sonargateway service:
sudo systemctl start gateway-gcp@pubsub
  1. Go to cloud sources screen at: https://<host>:8443/cloud_sources.xhtml
  2. Click on “New Cloud Source”
  3. Click on “Google pubsub”
  4. Click on “Add New Credentials”, enter your credentials and click on “save”.
  5. Click on “Load Subscriptions”.
  6. Select a subscription to import the messages from, and choose “Gcp Pubsub” as the service.
  7. Click on “Add Selected Subscription”.
  8. Enable the subscription, using the “Enable” button.
  9. Wait a couple of minutes and then refresh the page.

Messages should flow into sonargd.pubsub “ingested collection”.