Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read ADO PAT from GCP secret manager #10702

Closed
3 of 5 tasks
dekiel opened this issue May 16, 2024 · 1 comment
Closed
3 of 5 tasks

Read ADO PAT from GCP secret manager #10702

dekiel opened this issue May 16, 2024 · 1 comment
Assignees
Labels
area/ci Issues or PRs related to CI related topics

Comments

@dekiel
Copy link
Contributor

dekiel commented May 16, 2024

Description

image-builder GitHub action used in image-builder reusable workflow must have access to ADO PAT in order to authenticate in ADO API. The token value should be read from GCP secret manager. Reading a token from secret manager should be part of image-builder reusable workflow. Access to the secret manager should be authenticated using GitHub OIDC token and GCP workflow identity federation. There is an existing GitHub action provided by Google for authentication and accessing secret manager. image-builder reusable workflow must use dedicated GCP service-account with access only to the ADO PAT secret in secret-manager.

Reasons

GCP secret manager is our default storage for secrets. It proved to be stable. Central storing of secrets makes management and roatation of secrets much easier. Using GitHub OIDC provider for accessing GCP resources is our standard solution.

Acceptance Criteria

  • image-builder github action uses ADO PAT read from GCP secret manager.
  • ADO PAT is read from GCP secret manager as part of image-builder reusable workflow.
  • image-builder reusable workflow uses GitHub OIDC provider and GCP identity federation for authentication in GCP.
  • image-buidler reusable workflow uses dedicated GCP service account for accessing secret-manager.
  • Dedicated GCP service account for image-builder reusable workflow has access only to the secret used by image-builder reusable workflow.
@dekiel dekiel added the area/ci Issues or PRs related to CI related topics label May 16, 2024
@dekiel dekiel self-assigned this May 27, 2024
@dekiel
Copy link
Contributor Author

dekiel commented Jun 4, 2024

Following GCP recommendations, we grant permissions directly to the Workload Identity Federation identities instead to the GCP service accounts, by using sa impersontation. This invalidates last two items from Acceptance Criteria.

@dekiel dekiel closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues or PRs related to CI related topics
Projects
None yet
Development

No branches or pull requests

1 participant