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

Add concurrent session limit logout message #152949

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

thomheymann
Copy link
Contributor

Resolves #149532

Summary

Explain logout reason when current session limit has been reached.

Screenshot

Screenshot 2023-03-08 at 18 03 43

Testing

  1. Configure concurrent session limit:
xpack.security.session.concurrentSessions:
  maxSessions: 1
  1. Log into Kibana
  2. Open a private browsing window and login again with the same user
  3. Go back to the first window and navigate to a different page
  4. This will log the user out showing the concurrent session limit message

@thomheymann thomheymann added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.8.0 labels Mar 8, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
security 556.9KB 557.1KB +187.0B

Page load bundle

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

id before after diff
security 60.7KB 60.8KB +49.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 428 430 +2

Total ESLint disabled count

id before after diff
securitySolution 505 507 +2

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@thomheymann thomheymann marked this pull request as ready for review March 9, 2023 09:36
@thomheymann thomheymann requested a review from a team as a code owner March 9, 2023 09:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@thomheymann thomheymann added the release_note:skip Skip the PR/issue when compiling release notes label Mar 9, 2023
Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

LGTM, just a minor question on wording. Apologies if it was already discussed previously.

CONCURRENCY_LIMIT: {
type: LoginFormMessageType.Info,
content: i18n.translate('xpack.security.login.concurrencyLimitDescription', {
defaultMessage: 'You have logged in on another device. Please log in again.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit/question: As the number of concurrent sessions is configurable, should we be more explicit? e.g. "The number of allowable concurrent logins has been exceeded." or "You have logged in on another device, exceeding the concurrent session limit of N."
Not sure this is necessary, but thought I'd mention.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I phrased this intentionally simple as I don't think the technical details / specific settings are important here for the user. As an administrator it might be of value but my thinking was that they can refer to the debug logs which contains more information about the exact logout reason if required.

Copy link
Contributor

Choose a reason for hiding this comment

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

That seems reasonable to me. 👍

@thomheymann thomheymann merged commit 682aee3 into elastic:main Mar 21, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 21, 2023
nkhristinin pushed a commit that referenced this pull request Mar 22, 2023
Resolves #149532

## Summary

Explain logout reason when current session limit has been reached. 

## Screenshot

<img width="498" alt="Screenshot 2023-03-08 at 18 03 43"
src="https://user-images.githubusercontent.com/190132/223793779-b3c0893e-3974-4a07-a81b-a5b0de5086a5.png">

## Testing

1. Configure concurrent session limit:

```yaml
xpack.security.session.concurrentSessions:
  maxSessions: 1
```

2. Log into Kibana
3. Open a private browsing window and login again with the same user
4. Go back to the first window and navigate to a different page
5. This will log the user out showing the concurrent session limit
message
tsullivan pushed a commit to tsullivan/kibana that referenced this pull request Mar 22, 2023
Resolves elastic#149532

## Summary

Explain logout reason when current session limit has been reached. 

## Screenshot

<img width="498" alt="Screenshot 2023-03-08 at 18 03 43"
src="https://user-images.githubusercontent.com/190132/223793779-b3c0893e-3974-4a07-a81b-a5b0de5086a5.png">

## Testing

1. Configure concurrent session limit:

```yaml
xpack.security.session.concurrentSessions:
  maxSessions: 1
```

2. Log into Kibana
3. Open a private browsing window and login again with the same user
4. Go back to the first window and navigate to a different page
5. This will log the user out showing the concurrent session limit
message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain the logout reason to the user when the concurrent session limit is exceeded
5 participants