Move cloud-based credential filtering into DefaultCredentialsProvider#690
Open
hectorcast-db wants to merge 2 commits intomainfrom
Open
Move cloud-based credential filtering into DefaultCredentialsProvider#690hectorcast-db wants to merge 2 commits intomainfrom
hectorcast-db wants to merge 2 commits intomainfrom
Conversation
Azure strategies (azure-cli, azure-client-secret, github-oidc-azure) are now skipped on GCP/AWS hosts in auto-detect mode. GCP strategies (google-credentials, google-id) are skipped on Azure/AWS hosts. When authType is explicitly set, cloud filtering is bypassed so the named strategy is always attempted regardless of host cloud. Individual credential providers no longer perform their own isAzure()/isGcp() checks — that responsibility now lives centrally in DefaultCredentialsProvider via a CLOUD_REQUIREMENTS map, mirroring the approach taken in databricks/databricks-sdk-go#1505. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
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.
Summary
Port of databricks/databricks-sdk-go#1505 to the Java SDK.
isAzure()/isGcp()checks from individual credential providers (AzureCliCredentialsProvider,AzureServicePrincipalCredentialsProvider,AzureGithubOidcCredentialsProvider,GoogleCredentialsCredentialsProvider,GoogleIdCredentialsProvider)DefaultCredentialsProvidervia a staticCLOUD_REQUIREMENTSmap: Azure strategies are skipped on GCP/AWS hosts and GCP strategies are skipped on Azure/AWS hosts in auto-detect modeauthTypeis explicitly set, cloud filtering is bypassed entirely so users can request any strategy regardless of detected host cloud (e.g.azure-clion a GCP host)DefaultCredentialsProviderTestwith unit tests verifying skip-on-mismatch and bypass-on-explicit-authType behaviourTest plan
DefaultCredentialsProviderTest#testCloudFiltering_SkipsOnCloudMismatch— azure-cli is skipped on a GCP host in auto-detect modeDefaultCredentialsProviderTest#testCloudFiltering_BypassesOnExplicitAuthType— azure-cli is called on a GCP host when authType is explicitly setAzureCliCredentialsProviderTest,AzureGithubOidcCredentialsProviderTest,AzureServicePrincipalCredentialsProviderTest— all passmvn test— 62 tests, 0 failures🤖 Generated with Claude Code