Skip to content

MHR replace GCP SA keys with container ADC for GCP API calls#2334

Open
doug-lovett wants to merge 2 commits into
bcgov:mainfrom
doug-lovett:37375-mhr-remove-sa-keys
Open

MHR replace GCP SA keys with container ADC for GCP API calls#2334
doug-lovett wants to merge 2 commits into
bcgov:mainfrom
doug-lovett:37375-mhr-remove-sa-keys

Conversation

@doug-lovett

Copy link
Copy Markdown
Collaborator

Issue #: /bcgov/entity#33735

Description of changes:
Outstanding tech debt task. Remove service account keys from the document services GCP cloud run jobs and services.
Use GCP Application Default Credentials (ADC) for container calls to cloud storage (works within the same GCP project).
Retain the configuration with a GCP key for unit testing and running services locally. Remove the requirement to use a key for cloud storage and pub/sub api calls.

SRE has a policy of rotating service account keys every 3 months. Removing the keys from the container configuration removes the need to update the containers and redeploy when the keys change.

  • Verify or enable IAM Service Account Credentials API on the project.
  • Assign the container service accounts the correct roles: storage admin, pub/sub publisher, and service account token creator.
  • Update all MHR jobs that use a GCP SA key.
  • Update MHR API service
  • Remove environment variable from container configuration.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the PPR license (Apache 2.0).

@doug-lovett doug-lovett self-assigned this Jun 16, 2026
@bcregistry-sre

Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://bcregistry-assets-dev--pr-2334-wgm77xbl.web.app

1 similar comment
@bcregistry-sre

Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://bcregistry-assets-dev--pr-2334-wgm77xbl.web.app

@doug-lovett doug-lovett requested a review from eve-git June 16, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants