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

PADV-729 - Support user session timeout #105

Open
wants to merge 1 commit into
base: pearson-release/olive.stage
Choose a base branch
from

Conversation

Jacatove
Copy link

@Jacatove Jacatove commented Oct 17, 2023

Description

This PR is intended to allow the platform to control the user session expiration time by introducing a new setting. The need for this support comes from the fact that a session timeout is a security mechanism whereby a connection to an application or service
is forcibly disconnected after a specified period of inactivity. This is intended to prevent an
unattended or forgotten management session from being used by an unauthorised or
malicious user. Any valid, current session that is discovered presents the risk of accidental or
malicious configuration changes being made within the context of the hijacked session’s
privilege level.

Changes.

  • Add new SESSION_EXPIRY_SECONDS setting to set the user session expiration time.

How to test?

In devstack:

  1. Get the devstack up and running
  2. Get in the lms shell make lms-shell
  3. Add the SESSION_EXPIRY_SECONDS variable to /edx/etc/lms.yml
  4. Check if setting was taken into account, open a djago shell /edx/bin/edxapp-shell-lms and execute:
from django.conf import settings
settings.SESSION_EXPIRY_SECONDS
  1. Remove cookies in case you previously had a session and log in again an check the lms_sessionid cookie and validate if its expiration matches with the new setting.
    image

@Jacatove Jacatove marked this pull request as ready for review October 23, 2023 15:29
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.

1 participant