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

[8.15] Fixes session timeout toast countdown (#198266) #198342

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.15:

Questions ?

Please refer to the Backport tool documentation

## Summary

A regression was introduced when upgrading to react-intl v6, and the
`FormattedRelative` component was replaced by the
`FormattedRelativeTime` component. The new component requires an
addition property be specified in order to have the same behavior as the
previous - formatting seconds > 60 as minutes, and counting down when
below 1 minute.

This PR adds the `updateIntervalInSeconds` property to the
`FormattedRelativeTime` component of the session expiration toast. This
PR also adds a unit test case to check the time format when > 60s
remain.

### Testing

1. Add the following Kibana configuration setting
```
xpack.security.session.idleTimeout: "2m" # can be anything over 1m, shorter is better for testing
```
2. Start ES & Kibana, log in
3. Verify the session expiration toast appears and first displays
minutes. Leave the toast open.
4. Verify that after 1 minute, the toast begins counting down seconds
5. Repeat the test from main and verify that the toast only shows the
initial number of seconds

## Release Note
A bug was fixed that caused the session expiration toast to incorrectly
render the remaining time.

(cherry picked from commit e3c0807)
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 30, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
security 69.6KB 69.7KB +26.0B

History

cc @jeramysoucy

@kibanamachine kibanamachine merged commit 16d90d2 into elastic:8.15 Oct 30, 2024
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants