Conversation
…ials Signed-off-by: Evgheni Poleacov <evgheni.poleacov@gmail.com>
evgheni7
force-pushed
the
feat/gcp-identity
branch
from
August 11, 2026 10:47
bd93e6d to
37f31e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Adds an optional
spec.identitytoProviderConfig/ClusterProviderConfigso the provider can obtain an OAuth2 bearer token itself, starting with Google Application Credentials. Today a short-lived token has to be kept fresh in aSecretby something outside Crossplane. A service account key can't be used directly, since turning one into a token means signing a JWT assertion.source: InjectedIdentityresolves from the pod's environment instead (Workload Identity on GKE). Optionalscopesnarrows from the defaultcloud-platform.The API shape and token handling both follow
provider-kubernetes, usingspec.identitywith anIdentityTypeand the logic inpkg/kube/client/gke, so the two providers are configured the same way.spec.identityis optional and a request carrying its ownAuthorizationheader keeps it, so existing behaviour is unchanged.IdentityTypedeclares onlyGoogleApplicationCredentialsrather than enum values with nothing behind them. The Azure/AWS/Nebius variants can follow the same shape if preferred.Related to crossplane-contrib#142, though that asks for a different mechanism (mounted token files).
I have:
make reviewable testto ensure this PR is ready for review.How has this code been tested
Unit tests for the token source covering both credential formats, the injected-identity path, and the error cases. Existing suite passes unchanged.