Example #1
0
 def test_failure_on_missing_property(self):
     resource_conf = {
         "require_numbers": True,
         "require_symbols": True,
         "allow_users_to_change_password": True,
     }
     scan_result = check.scan_resource_conf(conf=resource_conf)
     self.assertEqual(CheckResult.FAILED, scan_result)
 def test_failure_on_missing_property(self):
     resource_conf = {
         "minimum_password_length": [15],
         "require_lowercase_characters": [True],
         "require_numbers": [True],
         "require_uppercase_characters": [True],
         "require_symbols": [True],
         "allow_users_to_change_password": [True],
     }
     scan_result = check.scan_resource_conf(conf=resource_conf)
     self.assertEqual(CheckResult.FAILED, scan_result)
Example #3
0
 def test_success(self):
     resource_conf = {
         "minimum_password_length": [15],
         "require_lowercase_characters": [True],
         "require_numbers": [True],
         "require_uppercase_characters": [True],
         "require_symbols": [True],
         "allow_users_to_change_password": [True],
         "max_password_age": [90]
     }
     scan_result = check.scan_resource_conf(conf=resource_conf)
     self.assertEqual(CheckResult.PASSED, scan_result)
Example #4
0
 def test_failure(self):
     resource_conf = {
         "minimum_password_length": 8,
         "require_lowercase_characters": False,
         "require_numbers": True,
         "require_uppercase_characters": True,
         "require_symbols": True,
         "allow_users_to_change_password": True,
         "password_reuse_prevention": 4,
         "max_password_age": 89
     }
     scan_result = check.scan_resource_conf(conf=resource_conf)
     self.assertEqual(CheckResult.FAILED, scan_result)