add OAuth 2.0 support to Delta Sharing connector - #58
Open
slimbnsalah wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds OAuth 2.0 client-credentials authentication as an alternative to bearer-token auth for the delta_sharing connector, updating the connector logic and docs so users can choose an auth method via auth_type.
Changes:
- Added OAuth client-credentials token fetching + caching and wired it into the connector’s raw HTTP calls.
- Updated README to document bearer-token vs OAuth configuration and behavior.
- Updated
configuration.jsonto include the new auth selector and OAuth-related fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| delta_sharing/connector.py | Adds OAuth token acquisition/caching and switches version lookups to use a token getter. |
| delta_sharing/README.md | Documents the new auth_type and OAuth client-credentials configuration/usage. |
| delta_sharing/configuration.json | Adds auth_type and OAuth configuration keys to the example configuration. |
Suppressed comments (1)
delta_sharing/README.md:98
- This README uses bold text for emphasis (for example
**activation link**/**recipient**). The doc guidelines for connector example READMEs prohibit bold text unless it's a UI element name; please switch these to plain text.
1. The data provider shares a dataset with you as a **recipient** in their Delta Sharing platform (e.g. Databricks Unity Catalog).
2. They send you an **activation link** — a one-time URL that, when opened, downloads a **profile file** (`.share` or `.json`).
3. The profile file contains:
fivetran-sahilkhirwal
left a comment
Contributor
There was a problem hiding this comment.
changes look good
One minor comment and few copilot comments are added
Please sign the CLA
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (4)
delta_sharing/README.md:59
- The "Configuration file" section should include the standard note reminding users not to check
configuration.jsoninto version control, since it can contain secrets (for exampleclient_secret).
delta_sharing/configuration.json:3 configuration.jsonrequires placeholder values in angle brackets;auth_typeis currently a literal string (and combines two options with "OR"), which violates the repo configuration template rules and is not a valid value for the connector as written.
"auth_type": "bearer_token_OR_oauth_client_credentials",
delta_sharing/connector.py:78
- For OAuth auth,
token_endpointis required but not validated for URL shape (http/https). A malformed value will fail later insiderequests.post()with a less actionable error; validate it here similar toendpoint.
else:
required = ("token_endpoint", "client_id", "client_secret")
missing = [key for key in required if not configuration.get(key)]
if missing:
raise ValueError(
delta_sharing/README.md:71
- Per the repo README style rules, headings below the H1 should be sentence case. "Requirements File" should be "Requirements file".
## Requirements File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Adds OAuth 2.0 client-credentials authentication as a second option to the existing bearer-token auth for the Delta Sharing connector. Using the same single configuration.json file, you'll be able to specify whether to use bearer or oauth.
Testing
Created a share with an OAuth recipient and made initial sync.
Checklist
Some tips and links to help validate your PR:
fivetran debugcommand.