Skip to content

Fix Azure OIDC endpoint selection to support both U2M and M2M authentication flows #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

samikshya-db
Copy link
Contributor

@samikshya-db samikshya-db commented May 28, 2025

What changes are proposed in this pull request?

  • Modified the config checks to make Azure U2M and M2M work. (Currently only Azure M2M works)
  • Background : The OSS JDBC uses SDK and Azure U2M flows are currently broken. After this change is merged, we will consume the new sdk version in OSS JDBC.

How is this tested?

  • Tested with Azure U2M credentials : worked fine
Screenshot 2025-05-28 at 11 23 01 PM
  • Also tested with Azure M2M and it worked fine

Note to the reviewers

We can't work around this by adding a dummy Azure client ID during U2M external browser auth (e.g., .setAzureClientId("test")), because none of these fields are populated for U2M before the OIDC endpoints are fetched.

@samikshya-db samikshya-db changed the title [Draft] Fix azure u2m Fix azure u2m May 28, 2025
@samikshya-db samikshya-db changed the title Fix azure u2m Fix azure configuration checks to make both U2M and M2M work May 28, 2025
@samikshya-db samikshya-db changed the title Fix azure configuration checks to make both U2M and M2M work Fix Azure OIDC endpoint selection to support both U2M and M2M authentication flows May 28, 2025
@samikshya-db samikshya-db marked this pull request as ready for review May 28, 2025 18:15
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: 454
  • Commit SHA: 9729113966310bb31d33cb94ed763dca0f8f3ddc

Checks will be approved automatically on success.

@@ -628,7 +628,8 @@ private OpenIDConnectEndpoints fetchDefaultOidcEndpoints() throws IOException {
if (getHost() == null) {
return null;
}
if (isAzure() && getAzureClientId() != null) {

if (isAzure() && shouldUseAzureOidcEndpoints()) {
Copy link
Contributor

@hectorcast-db hectorcast-db May 30, 2025

Choose a reason for hiding this comment

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

Something to check/test, is whether this breaks Databricks OIDC. If I am reading this correct, Databricks OIDC will also try to connect to Azure endpoints.

Copy link
Contributor Author

@samikshya-db samikshya-db May 30, 2025

Choose a reason for hiding this comment

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

Thanks for the review, Hector!

The flows I have tested for this change is :

  1. U2M for azure databricks workspace
  2. M2M with databricks based credentials for Azure workspace
  3. M2M with Azure service principals for Azure workspace

Is there any other testing that you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Adding context from our offline discussion from the past week) : our product does not use this flow and we will need to build the testing infra to be able to test out the suggested flow.

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.

2 participants