Skip to content

Add support to authenticate with Account-wide token federation #1219

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

Merged
merged 2 commits into from
May 9, 2025

Conversation

renaudhartert-db
Copy link
Contributor

What changes are proposed in this pull request?

This PR adds support to authenticate with Account-wide token federation from the following auth methods: env-oidc, file-oidc, and github-oidc.

The PR also slightly re-organize the code by moving the OIDC token source and Github IDTokenSource in the oidc package.

How is this tested?

Unit test + local validation.

Copy link

github-actions bot commented May 9, 2025

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-go

Inputs:

  • PR number: 1219
  • Commit SHA: ab703f1fbf1f34e15b86f321e014915e99301403

Checks will be approved automatically on success.

Copy link

@emmyzhou-db emmyzhou-db left a comment

Choose a reason for hiding this comment

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

LGTM :)

@@ -59,8 +62,17 @@ func (w *databricksOIDCTokenSource) Token(ctx context.Context) (*oauth2.Token, e
if err != nil {
return nil, err
}

if w.cfg.ClientID == "" {

Choose a reason for hiding this comment

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

This is more of a question than a comment: Should account-wide token federation also be added to the Java SDK? Currently, ClientID is not an optional field in the Java SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question! Yes, we will have to add that in the Java SDK too.

@renaudhartert-db renaudhartert-db changed the title Renaud hartert data/OIDC account wide Add support to authenticate with Account-wide token federation May 9, 2025
Comment on lines +7 to +8
- Add support to authenticate with Account-wide token federation from the
following auth methods: `env-oidc`, `file-oidc`, and `github-oidc`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we document what is env-oidc and file-oidc somewhere?

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 outside of the code as far as I can tell. Though, there is an ongoing effort to document these centrally.

@renaudhartert-db renaudhartert-db added this pull request to the merge queue May 9, 2025
Merged via the queue into main with commit a2a34b9 May 9, 2025
15 checks passed
@renaudhartert-db renaudhartert-db deleted the renaud-hartert_data/oidc-account-wide branch May 9, 2025 12:35
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