Set up your service account

This document describes how to set up a service account for secure communication.

Set up your service account for service-to-service communication

This guide shows how to set up a service account for security and service-to-service communication. While you may have completed some of these steps in the Create service accounts page, this document provides additional instructions for setting up a service account to access the Navigation Connect API.

gcloud

Replace ${project_id} with your project ID and ${service_account_email} with your service account email.

The following steps use the GCloud SDK:

  1. Create a service account which will be used to access the Navigation Connect API.

    gcloud --project=${project_id} iam service-accounts create navigationconnect
    
  2. Give the account the Service Account Token Creator role.

    gcloud projects add-iam-policy-binding ${project_id} \
      --member=serviceAccount:${service_account_email} \
      --role=roles/iam.serviceAccountTokenCreator
    
  3. Give the account the Navigation Connect administrator role.

    gcloud projects add-iam-policy-binding ${project_id} \
        --member=serviceAccount:${service_account_email} \
        --role=roles/navigationconnect.admin
    

For service accounts that only need read access to trips using GetTrip, use the role navigationconnect.reader.