Skip to content
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

feat: OAuth2 client initial work #29109

Merged
merged 2 commits into from
Jun 10, 2024
Merged

feat: OAuth2 client initial work #29109

merged 2 commits into from
Jun 10, 2024

Conversation

betodealmeida
Copy link
Member

SUMMARY

We're planning to introduce OAuth2 client management to Superset, so the clients can be configured on the app, and assigned to multiple databases.

This PR is a first step in that direction, allowing client configuration to be stored in a the database encrypted_extra parameter. This allows us to add support for OAuth2 to more DB engine specs before starting the work on a full UI solution.

In addition to reading the client configuration from encrypted_extra this PR also refactors the logic for triggering OAuth2, introducing a new method called needs_oauth2 to the DB engine spec. This is needed to give more flexibility to account for different OAuth2 providers.

The PR also introduces a new trigger for OAuth2, when the raw_connection fails due to needing a personal user token.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Added tests.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the authentication Related to authentication label Jun 6, 2024
@betodealmeida betodealmeida force-pushed the client-info-db-extra branch 3 times, most recently from 354f242 to 501baa9 Compare June 6, 2024 23:02
Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

LGTM

@betodealmeida betodealmeida merged commit 5660f8e into master Jun 10, 2024
33 checks passed
@rusackas rusackas deleted the client-info-db-extra branch June 10, 2024 18:33
eschutho pushed a commit that referenced this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication Related to authentication size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants