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.
Service account key fields
The following fields correspond to properties in the service account key JSON file that you download from Google Cloud IAM.
|
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. |