Skip to content

Support minting Azure access token from Vault sourced Azure credentials also from Vault sourced GCP service account keys#5

Open
stoader wants to merge 2 commits intomainfrom
vaut_gcp_az_access_tokens
Open

Support minting Azure access token from Vault sourced Azure credentials also from Vault sourced GCP service account keys#5
stoader wants to merge 2 commits intomainfrom
vaut_gcp_az_access_tokens

Conversation

@stoader
Copy link
Collaborator

@stoader stoader commented Feb 13, 2026

This pull request introduces a new Azure access token provider for Vault, and GCP access token provider for service account keys sourced from Vault.

…ls also from Vault sourced GCP service account keys
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for exchanging Vault-sourced credentials (Azure client secrets and GCP service account keys) for access tokens. The PR introduces new Azure and GCP access token providers within the Vault package that handle the token exchange and automatic refresh, along with configuration options to enable this behavior.

Changes:

  • Added new Azure and GCP access token providers that exchange Vault-sourced credentials for cloud provider access tokens with automatic refresh
  • Refactored the Vault credentials refresh loop to support worker goroutines for credential exchange
  • Introduced util.SendErrorToChannel helper function to simplify error handling across all credential providers

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
pkg/vault/option.go Added configuration options for enabling GCP service account key exchange and Azure client secret exchange with customizable scopes and tenant ID
pkg/vault/gcp.go New file implementing GCP access token provider that exchanges service account keys for access tokens with retry logic and automatic refresh
pkg/vault/azure.go New file implementing Azure access token provider that exchanges client credentials for access tokens with automatic refresh
pkg/vault/creds.go Refactored credential refresh loop to support worker goroutines, added authentication helper, and integrated new access token providers
pkg/util/credential.go Added SendErrorToChannel helper function to standardize error result creation and sending
pkg/oci/creds.go Updated to use new SendErrorToChannel helper for consistency
pkg/oauth2cc/oauth2cc.go Updated to use new SendErrorToChannel helper for consistency
pkg/generic/creds.go Updated to use new SendErrorToChannel helper for consistency
pkg/gcp/creds.go Updated to use new SendErrorToChannel helper for consistency
pkg/azure/creds.go Updated to use new SendErrorToChannel helper for consistency and moved expiry check before sending credentials
pkg/aws/creds.go Updated to use new SendErrorToChannel helper for consistency
go.mod Added cenkalti/backoff/v5 dependency and promoted go-viper/mapstructure/v2 to direct dependency
go.sum Updated checksums for new and modified dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant