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

Remove fallback to sub in RAS #969

Merged
merged 2 commits into from
Oct 19, 2021
Merged

Remove fallback to sub in RAS #969

merged 2 commits into from
Oct 19, 2021

Conversation

BinamB
Copy link
Contributor

@BinamB BinamB commented Oct 12, 2021

RAS sometimes not sending the correct userinfo response causes access issues downstream. We should error out instead of falling back to avoid issues on the client-side since some depend on the UserID response to be consistent.

Improvements

  • Remove fallback to other fields from RAS userinfo response when UserID is not provided and return an error instead.

@github-actions
Copy link

The style in this PR agrees with black. ✔️

This formatting comment was generated automatically by a script in uc-cdis/wool.

@coveralls
Copy link

coveralls commented Oct 12, 2021

Pull Request Test Coverage Report for Build 11847

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 72.175%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fence/resources/openid/ras_oauth2.py 0 1 0.0%
Totals Coverage Status
Change from base Build 11706: 0.05%
Covered Lines: 6451
Relevant Lines: 8938

💛 - Coveralls

@BinamB BinamB changed the title remove fallback to sub Remove fallback to sub in RAS Oct 12, 2021
@@ -179,15 +179,6 @@ def get_user_id(self, code):
if userinfo.get("UserID"):
username = userinfo["UserID"]
field_name = "UserID"
elif userinfo.get("userid"):
Copy link
Contributor

Choose a reason for hiding this comment

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

I actually see userid in almost all logs from RAS. We probably still want to support either case, but just not fallback on other fields

Copy link
Contributor

@Avantol13 Avantol13 left a comment

Choose a reason for hiding this comment

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

see comment

@Avantol13 Avantol13 marked this pull request as draft October 14, 2021 20:01
@BinamB BinamB marked this pull request as ready for review October 19, 2021 13:47
@BinamB BinamB merged commit 70c6347 into master Oct 19, 2021
@BinamB BinamB deleted the chore/remove_fallback branch October 19, 2021 13:47
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.

3 participants