Google Artifact Registry - Private Packages
Private packages stored in a Google Artifact Registry can be retrieved by AutoFix for Poetry, UV, NPM, PNPM, Yarn & Bun AutoFixes. Authentication to Google Artifact Registry can be done through Workload Identity Federation or a Service Account.
Using Workload Identity Federation
Workload Identity Federation allows you to grant the Aikido read role access to your Google Artifact Registry without sharing credentials with Aikido. This is the recommended approach for setting up a private packages hosted in Google Artifact Registry.
Setup in the Google Cloud Console
Step 1: Create the Workload Identity Pool and AWS Provider
Open the Google Cloud Console and navigate to IAM & Admin > Workload Identity Federation.
Click + Get Started (or + Create Pool if you already have pools setup).
Name your pool: Enter
aikido-identity-poolas the name and click Continue.Add a provider to your pool:
Select AWS from the Select a provider dropdown list
Enter the Provider name:
aws-providerEnter Aikido's AWS Account ID:
881830977366Click Continue.
Configure provider attributes:
Under Attribute mapping, Google automatically maps
google.subjecttoaws.arn. Leave this as default or modify it if you want specific attribute extractions.Click Save to create the pool and provider.
Step 2: Download the federated identity JSON
Go to the aikido-identity-pool details
Click + Grant access
Use Grant access using federated identities
Click
Download configto retrieve the configuration JSON
Step 3: Grant access on Artifact Registry
Go to Artifact Registry
Select the repository you want to provide Aikido access to
Click Permissions in the top menu (this only appears when you have selected a repository)
Click Add principal
In the New principals textbox enter the following principal & replace
<project-id>with your 12-digit project id:
Assign the
Artifact Registry ReaderroleClick Save
Setup in the Aikido UI
Google Artifact Registry is currently only supported for Poetry, UV, NPM, PNPM, Yarn and Bun AutoFixes. You can configure the GCP credentials in the Google Artifact Registry section under private package configuration.
Once the steps in the GCP console are done, you can configure AutoFix to authenticate with your private registry by following the steps below:
Go to the AutoFix > Settings page in the Aikido UI
Click on + Connect Registry, the configuration modal will now be shown

Select Google Artifact Registry:

Paste your saved JSON config content from Step 3 above in the GCP credentials field
Click Save to save the configuration.
Using a Service Account
Setup in the Google Cloud Console
Step 1: Create a Service Account
First, create a service account in your Google Cloud project:
Go to the Google Cloud Console.
Navigate to IAM & Admin > Service Accounts.
Click Create Service Account.
Fill in a Service account name such as
Aikido Artifact Registry Readerand click Create And Continue.Grant the service account with the Artifact Registry Reader role.
Click Continue and Done.
Step 2: Create a Key for the Service Account
On the Service Accounts page, find the service account you just created.
Click on the three dots on the right and select Manage Keys.
Click Add Key > Create New Key.
Choose JSON and click Create.
Save the JSON key file to a secure location.
Setup in the Aikido UI
Google Artifact Registry is currently only supported for Poetry, UV, NPM, PNPM, Yarn and Bun AutoFixes. You can configure the GCP credentials in the Google Artifact Registry section under private package configuration.
Once the steps in the GCP console are done, you can configure AutoFix to authenticate with your private registry by following the steps below:
Go to the AutoFix > Settings page in the Aikido UI
Click on + Connect Registry, the configuration modal will now be shown

Select Google Artifact Registry:

Paste your saved Service Acount Key content from Step 2 above in the GCP credentials field
Click Save to save the configuration.
Last updated
Was this helpful?