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

feat: Make SESSION_COOKIE_AGE explicit #36125

Closed
wants to merge 1 commit into from

Conversation

robrap
Copy link
Contributor

@robrap robrap commented Jan 16, 2025

Making SESSION_COOKIE_AGE explicit to make it more clear that we have a session timeout, and how long it is.

Description

Describe what this pull request changes, and why. Include implications for people using this change.
Design decisions and their rationales should be documented in the repo (docstring / ADR), per
OEP-19, and can be
linked here.

Useful information to include:

  • Which edX user roles will this change impact? Common user roles are "Learner", "Course Author",
    "Developer", and "Operator".
  • Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).
  • Provide links to the description of corresponding configuration changes. Remember to correctly annotate these
    changes.

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • If your database migration can't be rolled back easily.

Making SESSION_COOKIE_AGE explicit to make it more clear
that we have a session timeout, and how long it is.
@robrap
Copy link
Contributor Author

robrap commented Jan 16, 2025

@kdmccormick @feanil: How do you feel about making this explicit? Silly me had to chase this down for a while, because I didn't actually get where it was configured, and we looking through code, etc. I'm going to make it explicit in our settings if you don't like the idea of adding it here. I know we wouldn't want to make every default setting in the world explicit, but this seemed ok to note.

Anyway, feel free to thumb-up or reject. It's a proposal. Thanks.

@robrap robrap requested review from kdmccormick and feanil January 16, 2025 20:45
Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

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

Hey @robrap , two pieces of feedback here:

  • Our goal is to push all of the production-ready defaults up into common.py, so I would rather not add new default values here in production.py.
  • I am wary of adding any no-op code. Without a clear criteria to answer the question "when do we redundantly set settings to their django defaults?", I would rather not add these sort of redundant defaults.

@robrap
Copy link
Contributor Author

robrap commented Jan 16, 2025

@kdmccormick: That makes sense. Thanks for saying no to something that doesn't feel right. Docs would be better, but I wasn't certain where to put it. What do you think of this alternative, since I looked at this code: #36126.

Closing this PR as well.

@robrap robrap closed this Jan 16, 2025
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