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

do not accept middleware address with scheme #1199

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Conversation

sainak
Copy link
Member

@sainak sainak commented Feb 21, 2023

Proposed Changes

  • prefix middleware address with scheme in openid auth
  • update the facility config validator to only accept the domain name without scheme or trailing slash

@coronasafe/code-reviewers

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete

@sainak sainak requested a review from a team as a code owner February 21, 2023 06:23
@sonarcloud
Copy link

sonarcloud bot commented Feb 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

Base: 56.05% // Head: 56.25% // Increases project coverage by +0.19% 🎉

Coverage data is based on head (1775059) compared to base (a55502e).
Patch coverage: 75.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1199      +/-   ##
==========================================
+ Coverage   56.05%   56.25%   +0.19%     
==========================================
  Files         174      174              
  Lines        8788     8796       +8     
  Branches     1515     1516       +1     
==========================================
+ Hits         4926     4948      +22     
+ Misses       3808     3794      -14     
  Partials       54       54              
Impacted Files Coverage Δ
config/authentication.py 34.56% <0.00%> (ø)
care/facility/api/serializers/facility.py 78.26% <50.00%> (+1.44%) ⬆️
config/validators.py 62.50% <100.00%> (+62.50%) ⬆️
care/users/api/viewsets/users.py 51.68% <0.00%> (-0.32%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@khavinshankar khavinshankar left a comment

Choose a reason for hiding this comment

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

@sainak can you recheck the regex, even the valid URLs are failing

image

@sainak
Copy link
Member Author

sainak commented Feb 23, 2023

@sainak can you recheck the regex, even the valid URLs are failing

image

That is the intended behavior because we use the same value for websockets in frontend as well, so saving it with scheme breaks the frontend requirement

valid values:

  • coronasafe.live
  • middleware.coronasafe.live

@mathew-alex mathew-alex merged commit 3105155 into master Feb 23, 2023
@sainak sainak deleted the fix/middleware-auth branch June 2, 2023 16:57
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

4 participants