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

TechDebt: Port Auth Changes From SIMS + Refactor Service Client Auth #219

Merged
merged 10 commits into from
Jan 4, 2024

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Jan 2, 2024

Overview

Links to Jira tickets

n/a

Description of relevant changes

Port Auth changes from SIMS (newer keycloak libraries, etc)

Refactor service client authentication

  • No longer relies on any hard-coded keycloak service client values, everything is read in from the database.
  • Added new db-constants.ts file, which is used to load constants from the database during API initialization (currently only loads service client information, but can be updated to support other constants as needed).

Populate submission source_system column from live submission data.

  • Was hard coded before.

Update seed to mark a pseudo-random number of submissions as reviewed, and a subset of those as published.

UI change for Jer: Change default switch case for security review status to UNSECURED (rather than PENDING), so that the user only ever sees either UNSECURED, SECURED, or PARTIAL status.

Testing

Everything related to authentication works as before, including service clients.
You will need to run a clean build to get the latest database changes.

Have tested the submission of SIMS data to Biohub, and it seems to be working as expected as far as I can tell.

Copy link

codecov bot commented Jan 2, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (2ce0c44) 61.75% compared to head (f150a9e) 62.09%.
Report is 2 commits behind head on dataset_security_feature.

Files Patch % Lines
api/src/database/db-constants.ts 88.88% 3 Missing ⚠️
api/src/services/dwc-service.ts 25.00% 3 Missing ⚠️
api/src/app.ts 0.00% 1 Missing ⚠️
api/src/database/db.ts 75.00% 1 Missing ⚠️
api/src/paths/artifact/delete.ts 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           dataset_security_feature     #219      +/-   ##
============================================================
+ Coverage                     61.75%   62.09%   +0.34%     
============================================================
  Files                           262      263       +1     
  Lines                          7130     7147      +17     
  Branches                       1007     1008       +1     
============================================================
+ Hits                           4403     4438      +35     
+ Misses                         2487     2469      -18     
  Partials                        240      240              

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

Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Looks good to me 🛺

Copy link

sonarqubecloud bot commented Jan 3, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

ran this locally, looks good!

@KjartanE KjartanE self-assigned this Jan 3, 2024
Copy link
Contributor

@KjartanE KjartanE left a comment

Choose a reason for hiding this comment

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

🐈 ran locally, functioning properly

@NickPhura NickPhura merged commit 0f6ba8b into dataset_security_feature Jan 4, 2024
21 checks passed
@NickPhura NickPhura deleted the service-client-auth branch January 4, 2024 00:37
NickPhura added a commit that referenced this pull request Jan 4, 2024
Continuation of #219.

Ported over auth/keycloak changes from SIMS but missed some changes that impacted the pipeline (wouldn't be noticed when running locally).
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.

4 participants