The token is valid for approximately one hour.
Supported ecosystems
NuGet, Cargo, RubyGems, CocoaPods, and Swift are not supported because Google Artifact Registry does not offer these formats.
Set up a GCP service account
To create a GCP service account with read access to your Artifact Registry repositories:- In Google Cloud Console, go to IAM & Admin > Service Accounts.
- Select Create Service Account and enter a name such as
endor-gar-reader. - Grant the service account the
roles/artifactregistry.readerrole on the target project or repository. - Open the service account and select Keys.
- Select Add Key > Create new key.
- Choose JSON as the key type and select Create.
- Save the downloaded JSON key file and use it when you add the integration.
Configure a GAR package manager integration
To connect Endor Labs to your Artifact Registry repositories:- Select User menu > Integrations from the left sidebar.
- Select Add next to the package manager type you want to configure.
- Select Add Package Manager.
- Enter a Name for the integration.
- Choose Google Artifact Registry as the authentication type.
- Enter your GCP Project ID, the ID of the GCP project that hosts the Artifact Registry repository.
- Enter the Location, the GCP region where your repository is hosted, for example
us-central1. - Enter the Repository, the name of your GAR repository.
- Enter the full contents of the downloaded JSON key file in Service Account Key.
- Optionally, under Advanced, select Propagate this package manager to all child namespaces to share this integration with child namespaces.
- Optionally, under Advanced, select Use this package manager as a plugin repository if this registry hosts build plugins rather than library dependencies.
- Click Add Package Manager.
Configure a GAR package manager integration using the API
Use endorctl to create a GAR package manager resource through the API. The following table lists the parameters required to create the integration.Known limitations
- Token lifetime: GAR access tokens expire approximately one hour after they are minted. A token is minted at the start of the scan and used for package resolution. If package resolution begins more than one hour after the scan starts, authentication fails with a
401 Unauthorizederror. Re-run the scan to generate a new access token and start a fresh one-hour window. - Long-lived service account key: The JSON key you provide remains valid until you revoke it in GCP. Rotate the key periodically following your organization’s credential management practices and update the integration in Endor Labs after rotation.
- Workload Identity Federation: Keyless authentication through Workload Identity Federation is not supported in this release.