@skip_if_github_validation
Feature: 0114 - Password Policy Management
Description: As an organization administrator,
I want to configure and enforce password complexity requirements,
So that user accounts comply with security policies
File name: srv_password_restriction.feature
Relative path: secondary/srv_password_restriction.feature
@skip_if_github_validation
Scenario: Configure password complexity restrictions
When
I set the minimum password length to "5"
00:00:00.057
And
I set the maximum password length to "12"
00:00:00.061
And
I enable the following restrictions:
00:00:00.374
And
I click on "Save"
00:00:00.067
And
I should see a "Password Policy Changed" text
00:00:00.302
@skip_if_github_validation
Scenario: Update special characters list and maximum character occurrence
When
I set the special characters list to "$@?"
00:00:00.080
And
I set the maximum allowed occurrence of any character to "3"
00:00:00.061
And
I click on "Save"
00:00:00.066
And
I should see a "Password Policy Changed" text
00:00:00.225
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "aB$1" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:11.100
+ Show Info
Failed to create user password_policy_user: unknown error - API failure: Passwords must be at least 5 characters.
Then
the user creation should fail with error containing "Passwords must be at least 5 characters"
00:00:00.000
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "ab$123" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:10.889
+ Show Info
Failed to create user password_policy_user: unknown error - API failure: Passwords must contain at least one upper case character.
Then
the user creation should fail with error containing "Passwords must contain at least one upper case character"
00:00:00.000
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "AB$123" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:10.437
+ Show Info
Failed to create user password_policy_user: unknown error - API failure: Passwords must contain at least one lower case character.
Then
the user creation should fail with error containing "Passwords must contain at least one lower case character"
00:00:00.000
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "aB$cde" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:11.055
+ Show Info
Failed to create user password_policy_user: unknown error - API failure: Passwords must contain at least one digit.
Then
the user creation should fail with error containing "Passwords must contain at least one digit"
00:00:00.000
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "aBc123" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:11.714
+ Show Info
Failed to create user password_policy_user: unknown error - API failure: Passwords must contain at least one special character, allowed special characters are: !$%&()*+,./:;<=>?[]^_{|}~$@?.
Then
the user creation should fail with error containing "Passwords must contain at least one special character"
00:00:00.000
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "aB:123" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:15.918
+ Show Info
New user password_policy_user created with roles: config_admin, system_group_admin, activation_key_admin, image_admin
Then
the user creation should fail with error containing "Passwords must contain at least one special character, allowed special characters are: $@?"
00:00:00.000
+ Show Error
+ Screenshot
Expected user creation to fail, but status was 'success' (RuntimeError) ./features/step_definitions/common_steps.rb:377:in `/^the user creation should fail with error containing "([^"]*)"$/' features/secondary/srv_password_restriction.feature:58:49:in `the user creation should fail with error containing "Passwords must contain at least one special character, allowed special characters are: $@?"'
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "aaB$123" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:10.756
Then
the user creation should fail with error containing "consecutive_characters_presents"
00:00:00.000
+ Show Error
+ Screenshot
Expected user creation to fail, but status was 'success' (RuntimeError) ./features/step_definitions/common_steps.rb:377:in `/^the user creation should fail with error containing "([^"]*)"$/' features/secondary/srv_password_restriction.feature:59:49:in `the user creation should fail with error containing "consecutive_characters_presents"'
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "aB$a12aa3" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:10.780
Then
the user creation should fail with error containing "Password characters occurrences exceeded maximum allowed 3"
00:00:00.000
+ Show Error
+ Screenshot
Expected user creation to fail, but status was 'success' (RuntimeError) ./features/step_definitions/common_steps.rb:377:in `/^the user creation should fail with error containing "([^"]*)"$/' features/secondary/srv_password_restriction.feature:60:49:in `the user creation should fail with error containing "Password characters occurrences exceeded maximum allowed 3"'
@skip_if_github_validation
Scenario Outline: Reject invalid passwords based on policy enforcement
When
I create a user with name "password_policy_user" and password "aBcdef$123456" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:10.418
Then
the user creation should fail with error containing "Passwords cannot be more than 12 characters"
00:00:00.000
+ Show Error
+ Screenshot
Expected user creation to fail, but status was 'success' (RuntimeError) ./features/step_definitions/common_steps.rb:377:in `/^the user creation should fail with error containing "([^"]*)"$/' features/secondary/srv_password_restriction.feature:61:49:in `the user creation should fail with error containing "Passwords cannot be more than 12 characters"'
@skip_if_github_validation
Scenario: Accept valid password complying with policy
When
I create a user with name "password_policy_user" and password "aB$123" with roles "config_admin,system_group_admin,activation_key_admin,image_admin"
00:00:10.244
Then
the user creation should succeed
00:00:00.000
@skip_if_github_validation
Scenario: Reset password policy to default settings
When
I follow the left menu "Admin > Manager Configuration > Password Policy"
00:00:10.007
+ Show Error
+ Screenshot
Unable to find xpath "//aside/div[@id='nav']/nav/ul/li/div/a[contains(.,'Admin')]/parent::div/parent::li" (Capybara::ElementNotFound) ./features/step_definitions/navigation_steps.rb:441:in `block (2 levels) in (top (required))' ./features/step_definitions/navigation_steps.rb:433:in `each' ./features/step_definitions/navigation_steps.rb:433:in `each_with_index' ./features/step_definitions/navigation_steps.rb:433:in `/^I follow the left menu "([^"]*)"$/' features/secondary/srv_password_restriction.feature:68:in `I follow the left menu "Admin ) Manager Configuration ) Password Policy"'
And
I click on "Reset"
0s
And
I should see a "Password Policy Reset to Default" text
0s
And
I refresh the page
0s
Then
the following restrictions should be disabled:
0s