Skip to content

[Feature]Add support for discovery URL - #336

Merged
mgyucht merged 10 commits into
databricks:mainfrom
samikshya-db:samikshya-db/newmergedChanges
Aug 30, 2024
Merged

mgyucht merged 10 commits into
databricks:mainfrom
samikshya-db:samikshya-db/newmergedChanges

Conversation

@samikshya-db

@samikshya-db samikshya-db commented Aug 28, 2024 •

Copy link
Copy Markdown
Contributor

Changes

  • The current state of SDK : OAuth Token and auth endpoints: we build the discovery endpoint from the host url set in DatabricksConfig.
  • The changed state in SDK : We fetch the token endpoint and auth endpoint from discovery endpoint. This is useful for scenarios when customers have their own auth endpoints.

Tests

  • Manually tested using SQL driver
  • Also added unit tests

@samikshya-db
samikshya-db marked this pull request as ready for review August 28, 2024 04:27
@samikshya-db
samikshya-db requested a review from gopalldb August 28, 2024 04:27
@samikshya-db samikshya-db changed the title Add support for discovery URL Add support for discovery URL. [tests pending] Aug 28, 2024
@samikshya-db samikshya-db changed the title Add support for discovery URL. [tests pending] [Feature] Add support for discovery URL. [tests pending] Aug 28, 2024
jayantsing-db

This comment was marked as off-topic.

@jayantsing-db
jayantsing-db self-requested a review August 28, 2024 07:35
@samikshya-db samikshya-db added the enhancement New feature or request label Aug 28, 2024
@jayantsing-db
jayantsing-db requested review from jayantsing-db and removed request for jayantsing-db August 28, 2024 07:38
@samikshya-db samikshya-db changed the title [Feature] Add support for discovery URL. [tests pending] [Feature] Add support for discovery URL Aug 28, 2024
@samikshya-db samikshya-db changed the title [Feature] Add support for discovery URL [Feature]Add support for discovery URL Aug 28, 2024
@samikshya-db
samikshya-db requested a review from mgyucht August 29, 2024 04:38

@mgyucht mgyucht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One small nit, otherwise, LGTM!

samikshya-db and others added 10 commits August 29, 2024 14:47
## Changes
<!-- Summary of your changes that are easy to understand -->
Add a new config in proxy hosts to provide non proxy hosts. Related
system property info here:
https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html

## Tests
<!-- How is this tested? -->
Tested locally and via unit tests
## Changes
<!-- Summary of your changes that are easy to understand -->
We need to provide a way for clients to specify their own SSL socket
factory in case they want to handle TLS connections in a different way

## Tests
<!-- How is this tested? -->
Unit tests and local testing
@mgyucht
mgyucht added this pull request to the merge queue Aug 30, 2024
Merged via the queue into databricks:main with commit e00d328 Aug 30, 2024
mgyucht added a commit that referenced this pull request Sep 4, 2024
### New Features and Improvements

 * Add a way to provide non proxy hosts ([#331](#331)).
 * Add support for discovery URL ([#336](#336)).
 * Provide SSLSocketFactory in HttpClient ([#333](#333)).

### Bug Fixes

 * DatabricksConfig: newWithWorkspaceHost should retain authType ([#338](#338)).
 * Handle login.html incorrect validation for private link ([#340](#340)).

### Internal Changes

 * Fix nightly test failure ([#339](#339)).

### API Changes:

 * Added `regenerateDashboard()` method for `workspaceClient.qualityMonitors()` service.
 * Added `com.databricks.sdk.service.catalog.RegenerateDashboardRequest` and `com.databricks.sdk.service.catalog.RegenerateDashboardResponse` classes.
 * Added `com.databricks.sdk.service.jobs.QueueDetails`, `com.databricks.sdk.service.jobs.QueueDetailsCodeCode`, `com.databricks.sdk.service.jobs.RunLifecycleStateV2State`, `com.databricks.sdk.service.jobs.RunStatus`, `com.databricks.sdk.service.jobs.TerminationCodeCode`, `com.databricks.sdk.service.jobs.TerminationDetails` and `com.databricks.sdk.service.jobs.TerminationTypeType` classes.
 * Added `status` field for `com.databricks.sdk.service.jobs.BaseRun`.
 * Added `status` field for `com.databricks.sdk.service.jobs.RepairHistoryItem`.
 * Added `status` field for `com.databricks.sdk.service.jobs.Run`.
 * Added `status` field for `com.databricks.sdk.service.jobs.RunTask`.
 * Added `maxProvisionedThroughput` and `minProvisionedThroughput` fields for `com.databricks.sdk.service.serving.ServedModelInput`.
 * Added `columnsToSync` field for `com.databricks.sdk.service.vectorsearch.DeltaSyncVectorIndexSpecRequest`.
 * Changed `workloadSize` field for `com.databricks.sdk.service.serving.ServedModelInput` to no longer be required.

OpenAPI SHA: d05898328669a3f8ab0c2ecee37db2673d3ea3f7, Date: 2024-09-04
@mgyucht mgyucht mentioned this pull request Sep 4, 2024
github-merge-queue Bot pushed a commit that referenced this pull request Sep 4, 2024
### New Features and Improvements

* Add a way to provide non proxy hosts
([#331](#331)).
* Add support for discovery URL
([#336](#336)).
* Provide SSLSocketFactory in HttpClient
([#333](#333)).


### Bug Fixes

* DatabricksConfig: newWithWorkspaceHost should retain authType
([#338](#338)).
* Handle login.html incorrect validation for private link
([#340](#340)).


### Internal Changes

* Fix nightly test failure
([#339](#339)).


### API Changes:

* Added `regenerateDashboard()` method for
`workspaceClient.qualityMonitors()` service.
* Added `com.databricks.sdk.service.catalog.RegenerateDashboardRequest`
and `com.databricks.sdk.service.catalog.RegenerateDashboardResponse`
classes.
* Added `com.databricks.sdk.service.jobs.QueueDetails`,
`com.databricks.sdk.service.jobs.QueueDetailsCodeCode`,
`com.databricks.sdk.service.jobs.RunLifecycleStateV2State`,
`com.databricks.sdk.service.jobs.RunStatus`,
`com.databricks.sdk.service.jobs.TerminationCodeCode`,
`com.databricks.sdk.service.jobs.TerminationDetails` and
`com.databricks.sdk.service.jobs.TerminationTypeType` classes.
 * Added `status` field for `com.databricks.sdk.service.jobs.BaseRun`.
* Added `status` field for
`com.databricks.sdk.service.jobs.RepairHistoryItem`.
 * Added `status` field for `com.databricks.sdk.service.jobs.Run`.
 * Added `status` field for `com.databricks.sdk.service.jobs.RunTask`.
* Added `maxProvisionedThroughput` and `minProvisionedThroughput` fields
for `com.databricks.sdk.service.serving.ServedModelInput`.
* Added `columnsToSync` field for
`com.databricks.sdk.service.vectorsearch.DeltaSyncVectorIndexSpecRequest`.
* Changed `workloadSize` field for
`com.databricks.sdk.service.serving.ServedModelInput` to no longer be
required.

OpenAPI SHA: d05898328669a3f8ab0c2ecee37db2673d3ea3f7, Date: 2024-09-04
github-merge-queue Bot pushed a commit that referenced this pull request Sep 17, 2025
…lsStrategy (#505)

## What changes are proposed in this pull request?

- **WHAT** : Discovery URL is currently being honored only in the M2M
flow. This PR makes changes to honor it for U2M and other flows as well.
Discovery URL was added by me last year in SDK for M2M flow
[Link](#336)
- ~~I have also added a fallback to defaultOIDC flow to make this
backward compatible too.~~ skipped the fallback in this PR, will raise
in a followup if I get approval from the SDK team
- **WHY** : A major customer ask is to extend discovery URL for U2M flow
as well.

## How is this tested?

Tested that discovery URL is being honored in U2M as well. Tested this
using the OSS JDBC with the following URL
1. Success flow test : 
```
String jdbcUrl =
        "jdbc:databricks://e2-dogfood.staging.cloud.databricks.com:443/default;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/dd43ee29fedd958d;"
            + "AuthMech=11;Auth_Flow=2;LogLevel=6;UseThriftClient=0;EnableTokenCache=0;OIDCDiscoveryEndpoint=https://e2-dogfood.staging.cloud.databricks.com/oidc/.well-known/oauth-authorization-server";
```
2. Failure flow test : 
```
String jdbcUrl =
        "jdbc:databricks://e2-dogfood.staging.cloud.databricks.com:443/default;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/dd43ee29fedd958d;"
            + "AuthMech=11;Auth_Flow=2;LogLevel=6;UseThriftClient=0;EnableTokenCache=0;OIDCDiscoveryEndpoint=https://google.com";
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants