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

Prevent session extension on indexset details page #18091

Merged
merged 3 commits into from Jan 30, 2024
Merged

Conversation

ousmaneo
Copy link
Contributor

On the IndexSet details page, the session would not expire even when the user sets up a session expiration time. because of the X-Graylog-No-Session-Extension not being set by some of the API calls.

This PR uses fetchPeriodically, which sets the X-Graylog-No-Session-Extension header.

fix #18063

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copy link
Contributor

@gally47 gally47 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this. LGTM!

Copy link
Contributor

@grotlue grotlue left a comment

Choose a reason for hiding this comment

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

Code-wise is good, however for one call listed in the issue the header is not set.

Testing results

The following requests should sent with the request header: X-Graylog-No-Session-Extension: true:

/api/system/indexer/indices/multiple
/api/system/indexer/overview/$INDEX_SET_ID

/api/system/indexer/indices/$INDEX_SET_ID/list
/api/system/cluster_config/org.graylog2.indexer.searches.SearchesClusterConfig

@ousmaneo
Copy link
Contributor Author

Thank you @grotlue for your review,

/api/system/indexer/indices/$INDEX_SET_ID/list

This API call does not need to be changed in this case, it does not create an issue with session timeout. You can test it by setting the session timeout of your user to 1mn and going to the page.

Copy link
Contributor

@grotlue grotlue left a comment

Choose a reason for hiding this comment

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

@ousmaneo Alright, then let's merge this. 👍

@grotlue grotlue merged commit 00835b1 into master Jan 30, 2024
6 checks passed
@grotlue grotlue deleted the issue-18063 branch January 30, 2024 12:04
ousmaneo added a commit that referenced this pull request Jan 30, 2024
Co-authored-by: Laura <grotlue@users.noreply.github.com>
gally47 pushed a commit that referenced this pull request Jan 30, 2024
Co-authored-by: Laura <grotlue@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session does not time out on index set details page
3 participants