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

Enable Kibana to Rate Limit Login Attempts #18491

Open
elasticmachine opened this issue Apr 25, 2017 · 10 comments
Open

Enable Kibana to Rate Limit Login Attempts #18491

elasticmachine opened this issue Apr 25, 2017 · 10 comments
Labels
enhancement New value added to drive a business result Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@elasticmachine
Copy link
Contributor

Original comment by @epixa:

Taken from #11335


Feature Request and Motivation

Is it possible to rate limit the logins of users who've made a certain number of failed login attempts to Kibana (or Elasticsearch)? LDAP and ActiveDirectory login attempts can be rate limited externally, but I don't see any options for rate limiting the file or native realms.

The threat here is that a malicious user who has access to Kibana (or Elasticsearch) can attempt to brute-force the credentials of users in the file or native realms. This password guessing may be even more effective due to the fact that there are a number of known, built-in usernames, like elastic or kibana.

A malicious person gaining access to one of these users could be especially dangerous, as in practice they may be used for service-type accounts, which tend to be highly privileged.

My Search for Existing Support

I see that X-Pack can log a number of relevant auditing events, such as authentication_failed or realm_authentication_failed. It seems like X-Pack already has access to the type of information needed to rate limit failed login attempts.

However, I don't see any security settings that an administrator can configure for Elastic Stack to actively change how it responds to a large number of failed login attempts for a particular user account.

Desired Feature Usage

Ideally there'd be several additional security settings for Kibana and Elasticsearch that Elastic Stack administrators could configure. The exact details require more thought, but a first pass might look something like the following (overall structure borrowed from the LINK REDACTED docs):

xpack.security.authc:
  realms:

    file:
      type: file
      order: 0
      # More than this number of consecutive failed login attempts causes the account to 
      # be locked, requiring action by an admin user to unlock it.
      max_failed_login_attempts: 15

      # After this many failed consecutive logins, either make the user wait a finite 
      # amount of time, such as 1 minute or 5 minutes before they can login again, or, 
      # cause the server to respond increasingly slowly with each additional failed login 
      # (such as exponential backoff timing).
      rate_limit_after_n_failed_logins: 5

    native:
      # Same additional options as described above.
@elasticmachine
Copy link
Contributor Author

elasticmachine commented Aug 18, 2017

Original comment by @MorrieAtElastic:

A user is also requesting logon-error limitation to Kibana. They additionally request a "human being verification" facility be installed on the Kibana login screen so that users must prove that they are no robots when logging into Kibana. Let me know if I need to provide a separate enhancement request for this facility.

@elasticmachine
Copy link
Contributor Author

Original comment by @epixa:

A separate enhancement request would be good for that

@elasticmachine elasticmachine added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Security/Authentication Platform Security - Authentication release_note:enhancement labels Apr 25, 2018
@mfeldmanBT
Copy link

When upgrading the Native Realm, please add the ability to force the user to change the password at first login.

@jesuslinares
Copy link

Hey guys, any update on this?. This is a requirement for compliance regulation like PCI DSS.

Thanks.

@Jim1975
Copy link

Jim1975 commented Sep 30, 2019

Hey guys, any update this ?

@kobelb kobelb added enhancement New value added to drive a business result and removed release_note:enhancement labels Jan 14, 2020
@kunisen
Copy link
Contributor

kunisen commented May 21, 2020

any update on this?

@legrego
Copy link
Member

legrego commented May 21, 2020

The requirements here seem a bit "squishy". There are asks for rate limiting in Kibana and/or Elasticsearch, but it would be good to understand exactly where we want this rate limiting to happen.

If we want Elasticsearch to perform the rate limiting, then we should transfer this issue to the Elasticsearch repo so that we can discuss and prioritize with the appropriate teams.

If we want Kibana to perform the rate limiting, then we can continue the discussion here. We haven't done much analysis on this recently, but I expect that we wouldn't be able to investigate this on the Kibana side until we implement #17870

It's important to note that if Kibana performs the rate limiting, that this won't prevent users from trying to brute-force passwords by authenticating against Elasticsearch directly. This might be fine for some users, but I imagine others would prefer a more holistic, stack-wide solution. In other words, if Elasticsearch performs the rate limiting, then Kibana will get this for "free", as well as any other stack component which authenticates to the stack.

@wolframhaussig
Copy link
Contributor

@legrego Your last paragraph is the important one: I do not care on which application the login happens - we want to prevent brute force attacks. Therefore, ElasticSearch is the only place this can happen.
I guess this will be true for API keys too?

@legrego
Copy link
Member

legrego commented Jul 15, 2020

@legrego Your last paragraph is the important one: I do not care on which application the login happens - we want to prevent brute force attacks. Therefore, ElasticSearch is the only place this can happen.
I guess this will be true for API keys too?

API Keys are a bit different in that you don't provide a corresponding username when you attempt to authenticate with an API Key. The mechanism for detecting a brute-force attack would have to be different. Rate-limiting an invalid API Key is not very useful, because there's nothing you can do to make that key valid.

With user/pass combinations, you can try various passwords for the same user, so we at least have a username to track authentication attempts for in this scenario. This wouldn't prevent password spraying attacks, but multi-factor authentication is a good mitigation for that.

@gcrompton-novetta
Copy link

I will follow up periodically to check for updates.

@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 Aug 5, 2021
@legrego legrego removed Feature:Security/Authentication Platform Security - Authentication loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. EnableJiraSync labels Aug 11, 2022
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 Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

9 participants