2017-10-17 05:38:10 +07:00
|
|
|
@needs-regulation-config
|
2017-09-03 06:25:43 +07:00
|
|
|
Feature: Authelia regulates authentication to avoid brute force
|
|
|
|
|
2017-09-22 03:07:34 +07:00
|
|
|
@need-registered-user-blackhat
|
2017-09-03 06:25:43 +07:00
|
|
|
Scenario: Attacker tries too many authentication in a short period of time and get banned
|
2017-11-03 03:34:07 +07:00
|
|
|
Given I visit "https://login.example.com:8080/"
|
2017-09-03 06:25:43 +07:00
|
|
|
And I set field "username" to "blackhat"
|
|
|
|
And I set field "password" to "bad-password"
|
|
|
|
And I click on "Sign in"
|
2017-10-11 04:03:30 +07:00
|
|
|
And I get a notification of type "error" with message "Authentication failed. Please check your credentials."
|
2017-09-03 06:25:43 +07:00
|
|
|
And I set field "password" to "bad-password"
|
|
|
|
And I click on "Sign in"
|
2017-10-11 04:03:30 +07:00
|
|
|
And I get a notification of type "error" with message "Authentication failed. Please check your credentials."
|
2017-09-03 06:25:43 +07:00
|
|
|
And I set field "password" to "bad-password"
|
|
|
|
And I click on "Sign in"
|
2017-10-11 04:03:30 +07:00
|
|
|
And I get a notification of type "error" with message "Authentication failed. Please check your credentials."
|
2017-09-03 06:25:43 +07:00
|
|
|
When I set field "password" to "password"
|
|
|
|
And I click on "Sign in"
|
2017-10-11 04:03:30 +07:00
|
|
|
Then I get a notification of type "error" with message "Authentication failed. Please check your credentials."
|
2017-09-03 06:25:43 +07:00
|
|
|
|
2017-09-22 03:07:34 +07:00
|
|
|
@need-registered-user-blackhat
|
2017-09-03 06:25:43 +07:00
|
|
|
Scenario: User is unbanned after a configured amount of time
|
2018-04-25 14:30:21 +07:00
|
|
|
Given I visit "https://login.example.com:8080/?rd=https://public.example.com:8080/secret.html"
|
2017-09-03 06:25:43 +07:00
|
|
|
And I set field "username" to "blackhat"
|
|
|
|
And I set field "password" to "bad-password"
|
|
|
|
And I click on "Sign in"
|
2017-10-11 04:03:30 +07:00
|
|
|
And I get a notification of type "error" with message "Authentication failed. Please check your credentials."
|
2017-09-03 06:25:43 +07:00
|
|
|
And I set field "password" to "bad-password"
|
|
|
|
And I click on "Sign in"
|
2017-10-11 04:03:30 +07:00
|
|
|
And I get a notification of type "error" with message "Authentication failed. Please check your credentials."
|
2017-09-03 06:25:43 +07:00
|
|
|
And I set field "password" to "bad-password"
|
|
|
|
And I click on "Sign in"
|
2017-10-11 04:03:30 +07:00
|
|
|
And I get a notification of type "error" with message "Authentication failed. Please check your credentials."
|
2017-09-03 06:25:43 +07:00
|
|
|
When I wait 6 seconds
|
|
|
|
And I set field "password" to "password"
|
|
|
|
And I click on "Sign in"
|
2017-09-22 03:07:34 +07:00
|
|
|
And I use "REGISTERED" as TOTP token handle
|
2017-10-22 06:23:26 +07:00
|
|
|
And I click on "Sign in"
|
2018-04-25 14:30:21 +07:00
|
|
|
Then I'm redirected to "https://public.example.com:8080/secret.html"
|