fix: restore 9.1.0 JWT vs session check by username #425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note to reviewer
The first commit just restores the reverted code. Review the second commit for the actual fix/changes.
Description:
The fix was to use
preferred_username
in place ofusername
.This also fixes/updates some tests for updated custom attributes.
Squashed commit message below:
Restores and fixes simplified JWT cookie vs session user check by
checking username instead of lms user id (originally introduced in
9.1.0, and removed in 9.1.1).
VERIFY_LMS_USER_ID_PROPERTY_NAME
, which is no longerneeded.
jwt_auth_get_lms_user_id_status
, sincewe no longer attempt to get the lms_user_id from the user object.
jwt_auth_mismatch_session_lms_user_id
to
jwt_auth_mismatch_session_username
.jwt_auth_mismatch_jwt_cookie_username
.jwt_cookie_unsafe_decode_issue
for whena JWT cookie cannot even be unsafely decoded.
preferred_username
,which is configured in each Open edX service.
Ticket:
Part of edx/edx-arch-experiments#429
Merge checklist:
Post merge:
finished.