grafana/pkg/services/sqlstore
Marcus Efraimsson 3d1c624c12 WIP: Protect against brute force (frequent) login attempts (#10031)
* db: add login attempt migrations

* db: add possibility to create login attempts

* db: add possibility to retrieve login attempt count per username

* auth: validation and update of login attempts for invalid credentials

If login attempt count for user authenticating is 5 or more the last 5 minutes
we temporarily block the user access to login

* db: add possibility to delete expired login attempts

* cleanup: Delete login attempts older than 10 minutes

The cleanup job are running continuously and triggering each 10 minute

* fix typo: rename consequent to consequent

* auth: enable login attempt validation for ldap logins

* auth: disable login attempts validation by configuration

Setting is named DisableLoginAttemptsValidation and is false by default
Config disable_login_attempts_validation is placed under security section
#7616

* auth: don't run cleanup of login attempts if feature is disabled

#7616

* auth: rename settings.go to ldap_settings.go

* auth: refactor AuthenticateUser

Extract grafana login, ldap login and login attemp validation together
with their tests to separate files.
Enables testing of many more aspects when authenticating a user.
#7616

* auth: rename login attempt validation to brute force login protection

Setting DisableLoginAttemptsValidation => DisableBruteForceLoginProtection
Configuration disable_login_attempts_validation => disable_brute_force_login_protection
#7616
2018-01-26 10:41:41 +01:00
..
migrations WIP: Protect against brute force (frequent) login attempts (#10031) 2018-01-26 10:41:41 +01:00
migrator WIP: Protect against brute force (frequent) login attempts (#10031) 2018-01-26 10:41:41 +01:00
sqlutil WIP: Protect against brute force (frequent) login attempts (#10031) 2018-01-26 10:41:41 +01:00
alert.go style: minor code style changes 2018-01-23 22:28:47 +01:00
alert_notification.go tech: avoid using deprecated functions 2018-01-23 22:30:45 +01:00
alert_notification_test.go
alert_test.go
annotation.go fix: alert list panel now works correctly after adding manual annotation on dashboard, fixes #9951 2017-11-21 11:28:17 +01:00
annotation_test.go fix: alert list panel now works correctly after adding manual annotation on dashboard, fixes #9951 2017-11-21 11:28:17 +01:00
apikey.go
apikey_test.go
dashboard.go db: fix postgres regression when comparing boolean columns/values (#10303) 2017-12-20 12:15:49 +01:00
dashboard_acl.go dashfolder: fix for sqlite test 2018-01-24 11:43:08 +01:00
dashboard_acl_test.go refactor: format files by gofmt 2017-12-11 19:46:05 +03:00
dashboard_snapshot.go snapshots: improve snapshot listing performance, #9314 (#9477) 2017-10-10 14:25:19 +02:00
dashboard_snapshot_test.go
dashboard_test.go dashfolders: create app folder on dashboard import 2017-11-27 17:08:39 +01:00
dashboard_version.go Merge branch 'master' into develop 2017-11-17 15:49:17 +01:00
dashboard_version_test.go fixed unit tests 2017-11-21 11:53:56 +01:00
datasource.go datasource as cfg: support globbing 2017-11-15 14:30:32 +01:00
datasource_test.go Merge branch 'master' into develop 2017-11-17 15:49:17 +01:00
health.go
logger.go
login_attempt.go WIP: Protect against brute force (frequent) login attempts (#10031) 2018-01-26 10:41:41 +01:00
login_attempt_test.go WIP: Protect against brute force (frequent) login attempts (#10031) 2018-01-26 10:41:41 +01:00
org.go
org_test.go
org_users.go refactor: rename User Groups to Teams 2017-12-08 18:25:45 +03:00
playlist.go style: minor code style changes 2018-01-23 22:28:47 +01:00
playlist_test.go
plugin_setting.go
preferences.go
quota.go
quota_test.go
search_builder.go db: fix postgres regression when comparing boolean columns/values (#10303) 2017-12-20 12:15:49 +01:00
search_builder_test.go search: refactor search sql into a builder class 2017-11-17 00:16:33 +01:00
shared.go
sql_test_data.go
sqlstore.go dashboards as cfg: wire up dashboard repo 2017-12-07 15:27:01 +01:00
sqlstore.goconvey
star.go
stars_test.go
stats.go stats: send amount of stars as stats 2018-01-23 22:51:05 +01:00
tables.go
team.go Add avatar to team and team members page (#10305) 2017-12-20 21:20:12 +01:00
team_test.go Add avatar to team and team members page (#10305) 2017-12-20 21:20:12 +01:00
temp_user.go signup: fix email sent logic for tempuser 2017-06-30 20:21:08 +02:00
temp_user_test.go signup: fix email sent logic for tempuser 2017-06-30 20:21:08 +02:00
tls_mysql.go
user.go refactor: rename User Groups to Teams 2017-12-08 18:25:45 +03:00
user_test.go