-
Notifications
You must be signed in to change notification settings - Fork 8
Include matching attribute in SAML patron ID extraction logging. #2950
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2950 +/- ##
=======================================
Coverage 92.78% 92.78%
=======================================
Files 454 454
Lines 42840 42844 +4
Branches 5975 5976 +1
=======================================
+ Hits 39748 39752 +4
Misses 2021 2021
Partials 1071 1071 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jonathangreen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 🪵
jonathangreen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a minor suggestion
| if patron_id is None: | ||
| self._logger.error( | ||
| f"Failed to extract a unique patron ID {attribute_origin}" | ||
| f"Failed to extract a unique patron ID from {attribute_origin}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very (very) minor suggestion to remove "a" to match the other log message on line 1395.
| f"Failed to extract a unique patron ID from {attribute_origin}" | |
| f"Failed to extract unique patron ID from {attribute_origin}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this on purpose. The sentences aren't parallel because I'm naming the ID on l. 1395 (though they would've been had I mentioned the ID parenthetically there).
Description
Log messages for successful extraction of a patron ID from a SAML Subject will now include the name of the attribute from which the patron ID was extracted. It will instead include the string "NameID" if we did not have an attribute match, but were able to fall back to the
nameID.Motivation and Context
It is helpful to know which attribute provided the patron ID, especially for configurations in which different attributes might sometimes provide the same value.
How Has This Been Tested?
Checklist