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

Limit the number of concurrent user sessions #18162

Closed
elasticmachine opened this issue Mar 16, 2018 · 15 comments
Closed

Limit the number of concurrent user sessions #18162

elasticmachine opened this issue Mar 16, 2018 · 15 comments
Assignees
Labels
enhancement New value added to drive a business result Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 16, 2018

Problem statement: Allow admins to define a maximum number of concurrent sessions per Kibana user. This builds on top of previous work, that introduced server side sessions .

Detailed approach: [This document|https://docs.google.com/document/d/1TpgCdz-S687s2XjTyTuJDx7Ig-rju_nnXfiefyt3dok/edit?usp=sharing], For [the MVP|https://docs.google.com/document/d/1TpgCdz-S687s2XjTyTuJDx7Ig-rju_nnXfiefyt3dok/edit#bookmark=id.ditlr5w78trc] see final section.

Justification: Example customer Enhancement Requests:

  • [14109|https://github.com/elastic/enhancements/issues/14109]
  • [13049|https://github.com/elastic/enhancements/issues/13049]
  • [12108|https://github.com/elastic/enhancements/issues/12108]
  • [8393|https://github.com/elastic/enhancements/issues/8393]
  • [3676|https://github.com/elastic/enhancements/issues/3676]
  • [997|https://github.com/elastic/enhancements/issues/997] etc..

In addition NIST compliance ([800-53 AC-10|https://csrc.nist.gov/Projects/risk-management/sp800-53-controls/release-search#/control?version=5.1&number=AC-10])

Release: The MVP is aimed for 8.7

@elasticmachine elasticmachine added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Apr 24, 2018
@kobelb kobelb added the enhancement New value added to drive a business result label Jun 19, 2019
@gayleb
Copy link

gayleb commented Oct 16, 2019

General info: Restricting the number of concurrent sessions is a technical control mechanism to enforce that certain accounts/access cannot be shared between multiple or too many users.

@jportner
Copy link
Contributor

This appears to be blocked by #17870, Kibana will need to store session info to be able to limit concurrent sessions.

@jordansissel
Copy link
Contributor

given user by role

Is this intended to limit concurrent sessions by role as in Elasticsearch security role (and not a user)? This doesn't map in my head about the stated objective to limit sharing "accounts" (elasticsearch users?).

@gayleb
Copy link

gayleb commented Dec 13, 2019

@jordansissel - maybe this is helpful?
The information system limits the number of concurrent sessions for each [account and/or account type] to [number].
Supplemental Guidance: Organizations may define the maximum number of concurrent sessions for information system accounts globally, by account type (e.g., privileged user, non-privileged user, domain, specific application), by account, or a combination. For example, organizations may limit the number of concurrent sessions for system administrators or individuals working in particularly sensitive domains or mission-critical applications. This control addresses concurrent sessions for information system accounts and does not address concurrent sessions by single users via multiple system accounts.

@arisonl
Copy link
Contributor

arisonl commented Jan 7, 2020

@gayleb Am I interpreting it correctly:
Ability to configure the maximum number of:

  1. overall concurrent sessions
  2. sessions per user
  3. sessions per role

And three more questions:

  • Is there a timeframe for this feature we should aim for?
  • How much of a prio is this and can we approach it in phases, e.g. per user limit first?
  • Are there any known differences in the requirements for the mobile vs full/desktop?

cc @mbarretta @derickson @m-adams @skearns64 @agup006

@Michael-Angel-Sec
Copy link

+1 Interested in this feature.

These control options are needed to implement DoD Application Server SRG V2R7 V-35070 Requirements. Excerpt:

Check Text: Review the application server product documentation and configuration to determine if the number of concurrent sessions can be limited to the organization-defined number of sessions for all accounts and/or account types.

If a feature to limit the number of concurrent sessions is not available, is not set, or is set to unlimited, this is a finding.

@elastic elastic deleted a comment from gayleb Jan 28, 2020
@azasypkin azasypkin removed the blocked label Jan 26, 2021
@azasypkin azasypkin removed their assignment Apr 22, 2021
@legrego legrego added Feature:Security/Authentication Platform Security - Authentication EnableJiraSync and removed EnableJiraSync labels Aug 3, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Sep 29, 2021
@ES-Takashi
Copy link

ES-Takashi commented Dec 22, 2021

kibanaへのアクセス制御ができるのか教えてください。
例えば、40アクセスまでを可能として40以上アクセスがあった場合は受け付けないようにする

@azasypkin
Copy link
Member

Hi @ES-Takashi ,

kibanaへのアクセス制御ができるのか教えてください。
例えば、40アクセスまでを可能として40以上アクセスがあった場合は受け付けないようにする

Do you mean 40 active sessions in total or 40 active session per user account?

@azasypkin azasypkin self-assigned this Dec 22, 2021
@ES-Takashi
Copy link

Hi@azasypkin

Do you mean 40 active sessions in total or 40 active session per user account?
40 active sessionsを意味します。

@azasypkin
Copy link
Member

40 active sessionsを意味します。

Sorry, not 100% sure which option of the two you meant, but I assume 40 active sessions in total. If so, then would you mind explaining your use case? The more details, the better, feel free to use Japanese - we'll translate if needed.

What if a single user creates 40 active sessions (in different browser windows or browsers)? Would it mean that no one else will be able to log in? That would be an easy DDoS like attack.

Having said that, at the moment we're planning to support 40 active session per user account or per user role since it gives administrators much more flexibility, but happy to hear about your use case.

@JohnKnoepfle
Copy link

JohnKnoepfle commented Jan 10, 2022

Hi @azasypkin,

With the planned approach, will they be able to limit the number to concurrent sessions per user to zero? I.e. I believe they want to configure it so that a given user can only have a single session active at one time.

@azasypkin
Copy link
Member

Hi @JohnKnoepfle ,

I believe they want to configure it so that a given user can only have a single session active at one time.

Yes, this certainly will be possible with the proposal we have (at the RFC stage at the moment). Depending on the configuration, the 2nd session will either be forbidden or it will automatically displace the oldest one. The configuration might look something like this:

xpack.security.session.сoncurrentSessions:
  maxSessions: 1
  exceedAction: displace # Or `forbid`
  roles: [superuser] # Optional. If omitted, the limitation will apply to all users

@JohnKnoepfle
Copy link

HI @azasypkin,

Thank you for the quick reply! That sounds like exactly what they are looking for. They are asking for a status update so I will just let them know engineering is actively working on it and it is in the RFC stage.

@legrego legrego added loe:x-large Extra Large Level of Effort and removed loe:small Small Level of Effort labels Jan 24, 2022
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. and removed loe:x-large Extra Large Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Feb 10, 2022
@legrego legrego removed EnableJiraSync loe:small Small Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Aug 18, 2022
@azasypkin
Copy link
Member

azasypkin commented Nov 14, 2022

We're planning to start working on this functionality in the upcoming weeks. The initial implementation will include only the bare minimum described in the RFC, the rest of the functionality might be added at a later stage once we gather enough feedback for the initial implementation. Here's what we're aiming for in the initial implementation:

  • The global concurrent sessions setting that will apply to all providers. There won't be a provider-specific setting yet.
  • The configuration will only support per-user/account configuration. There won't be a role-based configuration yet.
  • When the concurrent session limit is exceeded, the oldest session will be automatically displaced. The oldest session will be chosen based on the to-be-introduced created_at session field. There won't be a way to prevent login completely yet (e.g. via exceedAction: forbid).

Essentially the configuration we're going to support initially would look like this:

xpack.security.session.сoncurrentSessions:
  maxSessions: 3

Issues to track:

@azasypkin
Copy link
Member

Closing the issue since the implementation has landed in #147442 and will be available starting from Kibana 8.7.0. The remaining tasks are tracked separately:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests