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

OAuth UI flow #3819

Merged
merged 51 commits into from
Jul 31, 2023
Merged

OAuth UI flow #3819

merged 51 commits into from
Jul 31, 2023

Conversation

galvana
Copy link
Contributor

@galvana galvana commented Jul 18, 2023

Closes #3620

Description Of Changes

Added UI support for the OAuth2 authorization code flow. We already had all the API endpoints for this workflow but we needed to be able to trigger them from the UI.

Code Changes

  • Updated the connector parameters form to show an Authorize integration button than needs to be clicked before Test integration becomes available.
  • Added a referer field to the authenticationrequest table to be able to redirect the user back to the system page in Fides after the integration is authorized.
  • Added a authorization_required flag to each connection type
  • Added an authorized flag to connectionconfig

Pre-requisites

Follow the setup found here

Steps to Confirm

  • Create a integration with a connector using the oauth2_authorization_code authentication strategy
  • Click on Authorize integration
  • Fill out the 3rd-party's login form
  • Verify you are automatically redirected to the integration tab for your system in Fides

oauth

Pre-Merge Checklist

@cypress
Copy link

cypress bot commented Jul 20, 2023

Passing run #3410 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 3b6bd51 into f6eedab...
Project: fides Commit: 752e790909 ℹ️
Status: Passed Duration: 00:49 💡
Started: Jul 31, 2023 5:25 PM Ended: Jul 31, 2023 5:26 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Patch coverage: 90.90% and project coverage change: +0.11% 🎉

Comparison is base (ed168b3) 87.19% compared to head (3b6bd51) 87.30%.

❗ Current head 3b6bd51 differs from pull request most recent head 6e6c003. Consider uploading reports for the commit 6e6c003 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3819      +/-   ##
==========================================
+ Coverage   87.19%   87.30%   +0.11%     
==========================================
  Files         317      317              
  Lines       19352    19381      +29     
  Branches     2486     2490       +4     
==========================================
+ Hits        16874    16921      +47     
+ Misses       2048     2027      -21     
- Partials      430      433       +3     
Files Changed Coverage Δ
...thentication_strategy_oauth2_authorization_code.py 90.69% <ø> (ø)
src/fides/config/__init__.py 96.15% <ø> (ø)
src/fides/api/util/connection_type.py 88.52% <66.66%> (ø)
src/fides/api/api/v1/endpoints/system.py 89.89% <80.00%> (+11.54%) ⬆️
src/fides/api/models/connectionconfig.py 95.49% <81.81%> (-1.51%) ⬇️
src/fides/api/api/v1/endpoints/oauth_endpoints.py 93.13% <100.00%> (+0.58%) ⬆️
...ides/api/api/v1/endpoints/saas_config_endpoints.py 85.82% <100.00%> (+0.11%) ⬆️
src/fides/api/models/authentication_request.py 86.66% <100.00%> (+0.95%) ⬆️
...emas/connection_configuration/connection_config.py 97.64% <100.00%> (-2.36%) ⬇️
...onnection_configuration/connection_secrets_saas.py 92.18% <100.00%> (ø)
... and 2 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@galvana galvana requested a review from adamsachs July 24, 2023 22:40
@galvana galvana marked this pull request as ready for review July 24, 2023 22:40
Copy link
Contributor

@adamsachs adamsachs left a comment

Choose a reason for hiding this comment

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

BE looks good to me @galvana! relatively straightforward updates, it's nice how cleanly the support has slotted in. can't comment much on the FE code though 😄

i also didn't get a chance to test manually but the video you posted looks 💥 ...that really turns up oauth integrations to the next level!

src/fides/api/api/v1/endpoints/system.py Show resolved Hide resolved
@galvana galvana merged commit 7e3fd3f into main Jul 31, 2023
15 of 18 checks passed
@galvana galvana deleted the 3620-oauth-ui-flow branch July 31, 2023 19:33
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.

UI flow for SaaS Connector authentication via OAuth
3 participants