Reference: Adding a Google Artifact Registry

Add a Google Artifact Registry (GAR) to Cloud Workloads to enable image registry scanning and SBOM generation for images stored in Google Cloud.

Before you begin

  • Ensure that the service account has the Artifact Registry Reader role (roles/artifactregistry.reader) on the project that hosts the repository. This is the minimum role required to read images. If the service account is in a different project than the registry, you must grant this role explicitly in that project. For more information, see the Google Cloud documentation: Configure access control.

  • Obtain a service account key JSON file from Google Cloud IAM. For more information, see the Google Cloud documentation: Create and delete service account keys.

    Important: Save the key file immediately after creation. The key file cannot be re-downloaded after it is created.
    Note: Store the key file in a secure location and rotate it regularly.

Add a Google Artifact Registry

Add a Google Artifact Registry to the trusted registries list and configure connection details for image scanning.

  1. From the Main menu, go to Shared Services > Cloud Workloads. Click Settings and then click Add Registry.
    Tip: You can also click Add Registry in the Quick Links section on the Cloud Workloads Overview page.
  2. Configure the following settings:
    • Name: The registry name to display in the user interface.

    • Provider: Select Google Artifact Registry (GAR).

    • Address: The registry address in the format LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY. For example us-central1-docker.pkg.dev/my-project/my-repo. For more information, see the Google Cloud documentation: Docker repository and image names.

    • (Optional) Description: The registry description.

    • (Optional) Enable image registry scanning and SBOM generation: Select this option to scan the registry for images and create SBOMs. If selected, you must provide the following details:

      1. In the Connection Details section, identify the Artifact Registry repository to scan:

        • Project: The Google Cloud project name that hosts the Artifact Registry repository.

        • Location: The region or multi-region where the repository is hosted, for example us, us-central1, or europe-west1. For a list of supported locations, see the Google Cloud documentation: Repository locations.

        • Repository: The name of the Artifact Registry repository to scan.

        Then provide the service account key details that Cloud Workloads uses to authenticate to Google Cloud. All service account key fields are required. Copy each value directly from the service account key JSON file that you downloaded from Google Cloud IAM. For field descriptions, see Service account key fields.

      2. In the Satellites section, select the satellites to use when scanning this registry.

        Note:
        • Select more than one satellite to distribute the work and improve scanning performance.

        • For more information about satellites, see Managing satellites.

  3. Click Save.

Service account key fields

The following fields correspond to properties in the service account key JSON file that you download from Google Cloud IAM.

Table 1. Service account key fields

Field

Description

Type

The credential type. Corresponds to the type property in the key file. The value is typically service_account.

Project ID

The Google Cloud project ID. Corresponds to the project_id property in the key file.

Private Key ID

The unique identifier for the private key. Corresponds to the private_key_id property in the key file.

Private Key

The RSA private key in PEM encoding. Corresponds to the private_key property in the key file. Include the full key, including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines.

Note: Remove any \n characters before you paste the key into the field.

Client Email

The service account email address. Corresponds to the client_email property in the key file. The format is SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com.

Client ID

The unique numeric identifier for the service account. Corresponds to the client_id property in the key file.

Auth URI

The URI used for authentication. Corresponds to the auth_uri property in the key file. The value is typically https://accounts.google.com/o/oauth2/auth.

Token URI

The URI used to obtain access tokens. Corresponds to the token_uri property in the key file. The value is typically https://oauth2.googleapis.com/token.

Auth Provider X509 Cert URL

The URL for the Google public X.509 certificates used to verify tokens. Corresponds to the auth_provider_x509_cert_url property in the key file. The value is typically https://www.googleapis.com/oauth2/v1/certs.

Client X509 Cert URL

The URL for the public X.509 certificate for the service account. Corresponds to the client_x509_cert_url property in the key file.

Universe Domain

The Google Cloud universe domain. Corresponds to the universe_domain property in the key file. The value is typically googleapis.com.