Skip to content

Commit c7f2582

Browse files
[Fix] Add missing token URL and client ID in Github OIDC Credentials Provider (#322)
## Changes Add missing token URL and client ID in Github OIDC Credentials Provider. ## Tests Verified locally that these are properly passed. This change will be covered by Databricks internal integration tests.
1 parent 2b9394b commit c7f2582

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/core/oauth/AzureGithubOidcCredentialsProvider.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ public HeaderFactory configure(DatabricksConfig config) {
4141
TokenSource tokenSource =
4242
new OidcTokenSource(
4343
config.getHttpClient(),
44-
"",
45-
config.getClientId(),
44+
config.getDatabricksEnvironment().getAzureEnvironment().getActiveDirectoryEndpoint()
45+
+ config.getAzureTenantId()
46+
+ "/oauth2/token",
47+
config.getAzureClientId(),
4648
config.getEffectiveAzureLoginAppId(),
4749
idToken.get(),
4850
"urn:ietf:params:oauth:client-assertion-type:jwt-bearer");
@@ -85,7 +87,7 @@ private Optional<String> requestIdToken(DatabricksConfig config) {
8587
"Failed to request ID token: status code "
8688
+ resp.getStatusCode()
8789
+ ", response body: "
88-
+ resp.getBody());
90+
+ resp.getBody().toString());
8991
}
9092

9193
ObjectNode jsonResp;

0 commit comments

Comments
 (0)