Skip to content

JWT cookie sometimes contains a different user than the session #381

@robrap

Description

@robrap

Using edx-platform Safe Session monitoring, we've seen cases where the user id related to the LMS session does not match the user id in the JWT cookie. Although this issue is ultimately related to the LMS, which creates both the LMS session and the JWT cookie, this issue is being documented in this repo because this is where the JwtAuthentication class lives, which is a good place for adding observability, and potentially for taking corrective action.

  • The first step is simply to add additional observability.
  • Once we better understand the issue, we can determine what the best corrective action might be. Do we simply go with the JWT even though there there is disagreement on the user id? Do we kill the session and the cookie? Should we simply return an error from JwtAuthenticationl?

Here are some related tickets:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions