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

fix: bug with service user id vs lms user id #414

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

robrap
Copy link
Contributor

@robrap robrap commented Dec 5, 2023

Description:

  • Fixed bug for successful JWTs where the JWT user id was still
    using the service user id, rather than the LMS user id, so comparison
    against the LMS user id would fail.
  • As part of the bug fix, the custom attribute
    failed_jwt_cookie_user_id was renamed to
    jwt_cookie_lms_user_id, and will be set for all JWT cookies.
    Since this is only a breaking change for recently added monitoring,
    this won't be versioned as a breaking change.

This is part of:
edx/edx-arch-experiments#429

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bump if needed
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPi after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)

Copy link
Contributor

@timmc-edx timmc-edx left a comment

Choose a reason for hiding this comment

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

One doc nit, but otherwise looks good.

edx_rest_framework_extensions/auth/jwt/authentication.py Outdated Show resolved Hide resolved
- Fixed bug for successful JWTs where the JWT user id was still
using the service user id, rather than the LMS user id, so comparison
against the LMS user id would fail.
- As part of the bug fix, the custom attribute
``failed_jwt_cookie_user_id`` was renamed to
``jwt_cookie_lms_user_id``, and will be set for all JWT cookies.
Since this is only a breaking change for recently added monitoring,
this won't be versioned as a breaking change.

This is part of:
edx/edx-arch-experiments#429
Fix the readthedocs config.
@robrap robrap force-pushed the robrap/fix-session-jwt-mismatch branch from f7dd5a9 to 09d2079 Compare December 6, 2023 16:28
@robrap robrap merged commit bb2b783 into master Dec 6, 2023
7 checks passed
@robrap robrap deleted the robrap/fix-session-jwt-mismatch branch December 6, 2023 17:00
robrap added a commit to robrap/ecommerce that referenced this pull request Dec 6, 2023
9.0.1 fixes ENABLE_FORGIVING_JWT_COOKIES bug.
This build on the 9.0.0 fix, but applies the fix
to another place where the JWT's LMS user id will
be compared in place of the newly authenticated
service user's id.

For details, see:
openedx/edx-drf-extensions#414

Note that this won't be put into effect until
ENABLE_FORGIVING_JWT_COOKIES is toggled on
separately.

This is part of the rollout of:
edx/edx-arch-experiments#429
christopappas pushed a commit to openedx-unsupported/ecommerce that referenced this pull request Dec 6, 2023
9.0.1 fixes ENABLE_FORGIVING_JWT_COOKIES bug.
This build on the 9.0.0 fix, but applies the fix
to another place where the JWT's LMS user id will
be compared in place of the newly authenticated
service user's id.

For details, see:
openedx/edx-drf-extensions#414

Note that this won't be put into effect until
ENABLE_FORGIVING_JWT_COOKIES is toggled on
separately.

This is part of the rollout of:
edx/edx-arch-experiments#429
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.

2 participants