Skip to content

Use different auth procedures for different endpoints#601

Merged
tieneupin merged 28 commits intomainfrom
auth-procedures
Jun 5, 2025
Merged

Use different auth procedures for different endpoints#601
tieneupin merged 28 commits intomainfrom
auth-procedures

Conversation

@d-j-hatton
Copy link
Contributor

@d-j-hatton d-j-hatton commented May 30, 2025

Eu Pin's summary:

With the API router refactoring work completed, this PR now assigns different authentication measures to the routes used by the frontend and by the instrument. The logic for authenticating using a token and via cookies has also been rectified such that both methods should now properly work.

Some tests broke as a result of the refactor and authentication measures, and were fixed as part of this PR as a result.

@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 41.37931% with 119 lines in your changes missing coverage. Please review.

Project coverage is 31.86%. Comparing base (d64446c) to head (1cdae65).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #601      +/-   ##
==========================================
+ Coverage   31.73%   31.86%   +0.13%     
==========================================
  Files          89       91       +2     
  Lines       10674    10737      +63     
  Branches     1420     1425       +5     
==========================================
+ Hits         3387     3421      +34     
- Misses       7175     7203      +28     
- Partials      112      113       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tieneupin added 4 commits June 2, 2025 15:11
…purpose and splitting the authentication of instrument and frontend tokens into separate functions; created new annotated ints for type hinting in endpoints receiving requests from frontend and instrument server; updates the other server routers to use the newly created annotated ints
…'file_io_frontend', and 'file_io_shared' due to frontened and instrument accessing the same functions; moved 'process_gain()' into 'file_io_shared' so that it can be called from both with proper validation; updated route manifest and client-side URL lookups to reflect this
tieneupin added 8 commits June 3, 2025 18:41
…n_control'; updated route manifest and module where it's called
…laced 'test_pypi_proxy' URL with URl constructor as well
…d of homebrew method; split session access validation function for instrument server and frontend into separate functions; instrument validation function was incorrectly calling oauth2 scheme for frontend instead of backend; fixed logic for 'create_access_token' and 'generate_token' for handling authentication using either 'password' or 'cookie'; 'simple_token_validation()' should be using instrument server validation function instead
@tieneupin tieneupin merged commit a6fc956 into main Jun 5, 2025
17 checks passed
@tieneupin tieneupin deleted the auth-procedures branch June 5, 2025 16:53
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.

2 participants