Skip to content

feat: add support for using OAuth 2.0 integrations with data connectors#1201

Merged
leafty merged 3 commits intomainfrom
leafty/build-oauth-data-connectors
Feb 18, 2026
Merged

feat: add support for using OAuth 2.0 integrations with data connectors#1201
leafty merged 3 commits intomainfrom
leafty/build-oauth-data-connectors

Conversation

@leafty
Copy link
Copy Markdown
Member

@leafty leafty commented Feb 2, 2026

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 16, 2026

Pull Request Test Coverage Report for Build 22135855406

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 172 of 426 (40.38%) changed or added relevant lines in 20 files are covered.
  • 8 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.7%) to 88.336%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/renku_data_services/k8s/client_interfaces.py 1 2 50.0%
components/renku_data_services/notebooks/api/classes/k8s_client.py 1 2 50.0%
components/renku_data_services/connected_services/external_models.py 1 3 33.33%
components/renku_data_services/migrations/versions/58ad5426c2f3_upgrade_oauth_provider_kind_enum.py 26 28 92.86%
components/renku_data_services/storage/rclone.py 4 6 66.67%
components/renku_data_services/connected_services/blueprints.py 7 10 70.0%
components/renku_data_services/connected_services/models.py 9 12 75.0%
components/renku_data_services/k8s/clients.py 2 5 40.0%
components/renku_data_services/connected_services/apispec_extras.py 12 16 75.0%
components/renku_data_services/connected_services/provider_adapters.py 3 7 42.86%
Files with Coverage Reduction New Missed Lines %
components/renku_data_services/base_api/error_handler.py 1 91.3%
components/renku_data_services/storage/rclone.py 1 79.47%
components/renku_data_services/notebooks/core_sessions.py 1 60.33%
components/renku_data_services/session/models.py 1 94.17%
components/renku_data_services/storage/blueprints.py 2 91.34%
components/renku_data_services/crc/core.py 2 79.73%
Totals Coverage Status
Change from base Build 22135791993: -0.7%
Covered Lines: 23721
Relevant Lines: 26853

💛 - Coveralls

@leafty leafty force-pushed the leafty/build-oauth-data-connectors branch 2 times, most recently from cf71901 to 5bb1cb2 Compare February 16, 2026 13:37
@leafty leafty marked this pull request as ready for review February 18, 2026 10:23
@leafty leafty requested review from a team, SalimKayal and sgaist as code owners February 18, 2026 10:23
Details:
* Rename `drive` -> `google`: do not use the storage service name, use the platform name.
* Remove `onedrive`: not in use at the moment (unfinished code)

Note that the enum lists have been re-ordered alphabetically (sort lines ascending in vscode).
…tials (#1195)

Details:
* Add DataSourceRepository class to handle OAuth 2.0 credentials when mounting data connectors of type `drive` and `dropbox`.
*  When a session start is requested, insert `token` and `token_url` into the `rclone` configuration.
* When a session resume is requested, read the `rclone` configuration from k8s secrets and update the `token` and `token_url` fields.
* Add methods to read k8s secrets (create, patch, delete already exist).
* Add a `POST /oauth2/connections/<connection_id:ulid>/token_endpoint` endpoint: it conforms to [RFC 6749 - Section 6: Refreshing an Access Token](https://datatracker.ietf.org/doc/html/rfc6749#section-6). This is what is used as the `token_url` in the `rclone` configurations. This means that data services handles OAuth 2.0 token refreshes which is critical for platforms which issue single-use refresh tokens.
Update the "testing" endpoint to allow users to test the rclone connection with storage type "google" and "dropbox" which use OAuth 2.0 credentials.
@leafty leafty force-pushed the leafty/build-oauth-data-connectors branch from 5bb1cb2 to 24cff3a Compare February 18, 2026 10:24
@leafty leafty enabled auto-merge (squash) February 18, 2026 10:44
@leafty leafty merged commit c51cccc into main Feb 18, 2026
18 of 19 checks passed
@leafty leafty deleted the leafty/build-oauth-data-connectors branch February 18, 2026 10:44
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