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

FI-2787: AuthInfo input skeleton #503

Merged
merged 11 commits into from
Jun 24, 2024
Merged

FI-2787: AuthInfo input skeleton #503

merged 11 commits into from
Jun 24, 2024

Conversation

Jammjammjamm
Copy link
Collaborator

Summary

This branch provides an initial skeleton for a new type of input called auth_info. The goals for this input type are to consolidate all of the information needed to perform authorization, use that authorization to access resources, and refresh the authorization into a single location.

The intent is for the UI for this input type to be dynamic so that only the fields necessary for the particular scenario are displayed to the user. This will be accomplished through several means:

  • a mode option with the following possible values:
    • auth - this will present all of the input fields required in order to perform an initial authorization
    • access - this will present the access token, as well as the fields required to refresh that access token, for tests which are accessing resources based on a prior authorization.
  • a use_discovery checkbox in auth mode. When checked, the fields which can be found via a discovery endpoint will not be displayed to the user.
  • the auth_type field allows the user (or the test writer) to select which auth workflow will be used, so that only the fields relevant to that particular workflow are displayed.

This branch does not implement the actual use of the auth_info input type, but exposes examples through the JSON API to support front end development for this feature.

Testing Guidance

There is a new auth info suite which containts tests with default input values for each of the modes and auth types. Since the UI for this input type is not yet implemented, the inputs will appear as text inputs. The tests will verify that the received inputs are what is expected, so as the UI is developed, they can be used to validate the UI behavior.

@Jammjammjamm Jammjammjamm self-assigned this Jun 14, 2024
@Jammjammjamm Jammjammjamm changed the title FI-2787: AuthInfo input FI-2787: AuthInfo input skeleton Jun 14, 2024
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 61.93548% with 59 lines in your changes missing coverage. Please review.

Project coverage is 79.47%. Comparing base (732d0cd) to head (f76ccc0).

Files Patch % Lines
dev_suites/dev_auth_info/auth_info_suite.rb 74.07% 28 Missing ⚠️
lib/inferno/dsl/auth_info.rb 45.83% 13 Missing ⚠️
client/src/components/InputsModal/InputFields.tsx 10.00% 8 Missing and 1 partial ⚠️
lib/inferno/repositories/session_data.rb 25.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
- Coverage   79.70%   79.47%   -0.24%     
==========================================
  Files         240      242       +2     
  Lines       11927    12080     +153     
  Branches     1169     1185      +16     
==========================================
+ Hits         9506     9600      +94     
- Misses       1757     1815      +58     
- Partials      664      665       +1     
Flag Coverage Δ
backend 91.26% <65.27%> (-1.02%) ⬇️
frontend 73.98% <18.18%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@arscan
Copy link
Contributor

arscan commented Jun 20, 2024

I'm ok with this approach for now.

@Jammjammjamm
Copy link
Collaborator Author

@arscan Could you approve the PR then?

@Jammjammjamm Jammjammjamm merged commit 3a489d0 into main Jun 24, 2024
8 of 10 checks passed
@Jammjammjamm Jammjammjamm deleted the fi-2787-auth-input branch June 24, 2024 17:05
@rpassas rpassas mentioned this pull request Jun 25, 2024
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.

None yet

2 participants