Skip to content

Conversation

@hectorcast-db
Copy link
Contributor

@hectorcast-db hectorcast-db commented Mar 25, 2025

What changes are proposed in this pull request?

This PR adds support for Databricks Workload Identity Federation using GitHub tokens. This allows users to use WIF from their GitHub Workflows and authenticate their workloads without long lived secrets.

This new credentials strategy is added to the DefaultCredentialsStrategy after the other Databricks Credentials Strategy and before cloud specific authentication methods.
WIF credentials uses a subset of configuration values of other Databricks authentication methods. By being added after them it ensures that WIF is not used when other Databricks authentication methods are configured.
WIF uses the Databricks client id, which is not used by cloud specific authentication methods. Therefore, it will not be used when cloud specific authentication methods are configured.

How is this tested?

Added tests.


public ClientCredentials build() {
Objects.requireNonNull(this.clientId, "clientId must be specified");
Objects.requireNonNull(this.clientSecret, "clientSecret must be specified");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not required for WIF/OIDC

@hectorcast-db hectorcast-db force-pushed the hectorcast-db/databricks-wif branch from d2c0c40 to 8c7bf80 Compare March 27, 2025 08:41
@hectorcast-db hectorcast-db force-pushed the hectorcast-db/databricks-wif branch from 8c7bf80 to 09796a2 Compare March 27, 2025 08:45
@hectorcast-db hectorcast-db changed the title [DRAFT] Implement WIF support Support Databricks Workload Identity Federation for GitHub tokens Mar 27, 2025
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-java

Inputs:

  • PR number: 423
  • Commit SHA: d15182b0a2216f0800632f374fc38c3d1f8716d3

Checks will be approved automatically on success.

@hectorcast-db hectorcast-db added this pull request to the merge queue Apr 29, 2025
Merged via the queue into main with commit f5bde48 Apr 29, 2025
15 checks passed
@hectorcast-db hectorcast-db deleted the hectorcast-db/databricks-wif branch April 29, 2025 14:02
deco-sdk-tagging bot added a commit that referenced this pull request Apr 30, 2025
## Release v0.48.0

### New Features and Improvements
 * Introduce support for Databricks Workload Identity Federation in GitHub workflows ([423](#423)).
   See README.md for instructions.
 * [Breaking] Users running their workflows in GitHub Actions, which use Cloud native authentication and also have a `DATABRICKS_CLIENT_ID` and `DATABRICKS_HOST`
   environment variables set may see their authentication start failing due to the order in which the SDK tries different authentication methods.

### API Changes
* Added `workspaceClient.alertsV2()` service.
* Added `updateNccAzurePrivateEndpointRulePublic()` method for `accountClient.networkConnectivity()` service.
* Added `createdAt`, `createdBy` and `metastoreId` fields for `com.databricks.sdk.service.catalog.SetArtifactAllowlist`.
* [Breaking] Added `networkConnectivityConfig` field for `com.databricks.sdk.service.settings.CreateNetworkConnectivityConfigRequest`.
* [Breaking] Added `privateEndpointRule` field for `com.databricks.sdk.service.settings.CreatePrivateEndpointRuleRequest`.
* Added `domainNames` field for `com.databricks.sdk.service.settings.NccAzurePrivateEndpointRule`.
* Added `autoResolveDisplayName` field for `com.databricks.sdk.service.sql.CreateAlertRequest`.
* Added `autoResolveDisplayName` field for `com.databricks.sdk.service.sql.CreateQueryRequest`.
* Added `CREATE_CLEAN_ROOM`, `EXECUTE_CLEAN_ROOM_TASK` and `MODIFY_CLEAN_ROOM` enum values for `com.databricks.sdk.service.catalog.Privilege`.
* Added `DNS_RESOLUTION_ERROR` and `GCP_DENIED_BY_ORG_POLICY` enum values for `com.databricks.sdk.service.compute.TerminationReasonCode`.
* Added `EXPIRED` enum value for `com.databricks.sdk.service.settings.NccAzurePrivateEndpointRuleConnectionState`.
* [Breaking] Changed `createNetworkConnectivityConfiguration()` and `createPrivateEndpointRule()` methods for `accountClient.networkConnectivity()` service with new required argument order.
* [Breaking] Changed `workloadSize` field for `com.databricks.sdk.service.serving.ServedModelInput` to type `String` class.
* [Breaking] Changed `groupId` field for `com.databricks.sdk.service.settings.NccAzurePrivateEndpointRule` to type `String` class.
* [Breaking] Changed `targetServices` field for `com.databricks.sdk.service.settings.NccAzureServiceEndpointRule` to type `com.databricks.sdk.service.settings.EgressResourceTypeList` class.
* [Breaking] Removed `name` and `region` fields for `com.databricks.sdk.service.settings.CreateNetworkConnectivityConfigRequest`.
* [Breaking] Removed `groupId` and `resourceId` fields for `com.databricks.sdk.service.settings.CreatePrivateEndpointRuleRequest`.
* [Breaking] Removed `LARGE`, `MEDIUM` and `SMALL` enum values for `com.databricks.sdk.service.serving.ServedModelInputWorkloadSize`.
* [Breaking] Removed `BLOB`, `DFS`, `MYSQL_SERVER` and `SQL_SERVER` enum values for `com.databricks.sdk.service.settings.NccAzurePrivateEndpointRuleGroupId`.
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