keystone/keystone/tests/unit
Mustafa Kemal Gilor ff632a81fb
[PooledLDAPHandler] Ensure result3() invokes message.clean()
result3 does not invoke message.clean() when an exception is thrown
by `message.connection.result3()` call, causing pool connection
associated with the message to be marked active forever. This causes
a denial-of-service on ldappool.

The fix ensures message.clean() is invoked by wrapping the offending
call in try-except-finally and putting the message.clean() in finally
block.

Closes-Bug: #1998789

Change-Id: I59ebf0fa77391d49b2349e918fc55f96318c42a6
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
2022-12-06 17:48:43 +03:00
..
application_credential Re-enable line-length linter 2019-10-21 08:48:47 -07:00
assignment Replace deprecated assertDictContainsSubset 2021-09-01 08:13:48 +09:00
auth Switch from mock to unittest.mock use 2020-03-02 13:40:40 -06:00
backend Don't call .c from select() objects 2019-06-22 11:03:41 -04:00
catalog Replace deprecated assertDictContainsSubset 2021-09-01 08:13:48 +09:00
common sql: Integrate alembic 2022-06-20 13:29:58 +01:00
config_files Remove use of deprecated oslo.db options 2021-07-06 16:22:10 +01:00
contrib Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
credential New config option 'user_limit' in credentials 2020-06-12 13:52:45 +05:30
endpoint_policy Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
external Replace parse_strtime with datetime.strptime 2017-12-21 12:14:28 -06:00
federation Add new attribute to the federation protocol API 2019-07-19 10:46:23 -07:00
identity Merge "Replace assertItemsEqual with assertCountEqual" 2021-12-22 02:44:20 +00:00
ksfixtures Ignore UserWarning for scope checks during test runs 2022-06-17 14:34:32 +01:00
limit Add domain level limit support - Manager 2019-02-19 11:09:13 +08:00
policy Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
receipt Switch from mock to unittest.mock use 2020-03-02 13:40:40 -06:00
resource Replace deprecated assertDictContainsSubset 2021-09-01 08:13:48 +09:00
saml2 Add openstack_groups to assertion 2020-03-19 20:14:41 +05:30
server Check if content-type contains http, not equals 2020-02-17 21:06:13 +00:00
tests Adds a skip method to identify useless skips 2016-06-29 19:48:12 +00:00
token Only log warnings about token length when length exceeds max_token_size 2021-05-03 20:40:31 +00:00
trust Remove six usage 2020-01-30 06:06:51 +00:00
__init__.py Remove i18n.enable_lazy() translation 2018-12-14 10:30:17 +00:00
base_classes.py typo fix in docstring 2022-04-07 12:08:08 +08:00
core.py Merge "using standard library secrets function token_bytes to replace os.urandom" 2022-02-11 18:43:39 +00:00
default_catalog.templates Remove/update v2 catalog endpoint tests 2017-10-21 16:45:12 -05:00
default_catalog_multi_region.templates Fixing multi-region support in templated v3 catalog 2018-03-13 11:10:08 -07:00
default_fixtures.py Implement resource options for roles and projects 2019-09-09 22:07:30 +00:00
fakeldap.py [PooledLDAPHandler] Ensure result3() invokes message.clean() 2022-12-06 17:48:43 +03:00
federation_fixtures.py Move existing tests to unit 2015-02-13 15:54:29 -06:00
filtering.py Remove six usage 2020-01-30 06:06:51 +00:00
identity_mapping.py Use the new enginefacade from oslo.db 2016-02-24 08:20:12 -08:00
mapping_fixtures.py Support regexes in whitelists/blacklists 2020-05-26 11:00:21 -05:00
rest.py Remove six usage 2020-01-30 06:06:51 +00:00
test_app_config.py Cleanup test_wsgi 2018-10-11 15:27:46 -07:00
test_associate_project_endpoint_extension.py Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
test_auth_plugin.py Switch from mock to unittest.mock use 2020-03-02 13:40:40 -06:00
test_backend_endpoint_policy.py Remove six usage 2020-01-30 06:06:51 +00:00
test_backend_endpoint_policy_sql.py Enable foreign keys for unit test 2018-10-09 09:50:21 +08:00
test_backend_federation_sql.py Expiring User Group Membership Model 2020-04-07 11:04:38 -04:00
test_backend_id_mapping_sql.py Merge "Replace assertItemsEqual with assertCountEqual" 2021-12-22 02:44:20 +00:00
test_backend_ldap.py Replace deprecated assertDictContainsSubset 2021-09-01 08:13:48 +09:00
test_backend_ldap_pool.py [PooledLDAPHandler] Ensure result3() invokes message.clean() 2022-12-06 17:48:43 +03:00
test_backend_rules.py Split policy backend tests 2016-03-04 15:32:42 -03:00
test_backend_sql.py Merge "Replace assertItemsEqual with assertCountEqual" 2021-12-22 02:44:20 +00:00
test_backend_templated.py Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
test_cli.py tests: Don't monkeypatch functions 2022-06-20 13:29:52 +01:00
test_config.py Remove use of deprecated oslo.db options 2021-07-06 16:22:10 +01:00
test_contrib_ec2_core.py Check timestamp of signed EC2 token request 2020-04-28 11:45:24 -07:00
test_contrib_s3_core.py Accept STS and IAM services from Ceph Obj Gateway 2021-11-24 16:09:21 +00:00
test_contrib_simple_cert.py Remove six usage 2020-01-30 06:06:51 +00:00
test_driver_hints.py Use assertTrue/False instead of assertEqual(T/F) 2015-11-02 09:10:38 +00:00
test_entry_points.py Internally defined middleware don't use stevedore 2018-10-11 15:27:46 -07:00
test_exception.py Remove six usage 2020-01-30 06:06:51 +00:00
test_hacking_checks.py Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
test_healthcheck.py Remove six usage 2020-01-30 06:06:51 +00:00
test_ldap_livetest.py Remove six usage 2020-01-30 06:06:51 +00:00
test_ldap_pool_livetest.py Remove redundant parameter passed to assertTrue 2019-06-28 17:15:55 +08:00
test_ldap_tls_livetest.py Remove six usage 2020-01-30 06:06:51 +00:00
test_limits.py Remove six usage 2020-01-30 06:06:51 +00:00
test_middleware.py Switch from mock to unittest.mock use 2020-03-02 13:40:40 -06:00
test_policy.py Merge "Explicitly check policy name in policy warning tests" 2022-01-22 00:19:12 +00:00
test_receipt_provider.py Implement auth receipts spec 2018-11-02 15:06:19 +01:00
test_revoke.py Switch from mock to unittest.mock use 2020-03-02 13:40:40 -06:00
test_shadow_users.py Fix invalid assertTrue which should be assertEqual 2020-07-30 08:55:10 +08:00
test_sql_banned_operations.py sql: Integrate alembic 2022-06-20 13:29:58 +01:00
test_sql_upgrade.py requirements: Bump linter requirements 2022-10-26 15:14:21 +03:00
test_token_provider.py Remove six usage 2020-01-30 06:06:51 +00:00
test_url_middleware.py Convert Normalizing filter to flask native Middleware 2018-10-11 15:27:46 -07:00
test_v3.py OAuth2.0 Client Credentials Grant Flow Support 2022-06-14 09:09:33 +00:00
test_v3_application_credential.py Fix security issues with EC2 credentials 2020-05-02 12:34:20 -07:00
test_v3_assignment.py Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
test_v3_auth.py Limit token expiration to application credential expiration 2022-10-21 12:36:39 -05:00
test_v3_catalog.py Update hacking for Python3 2020-04-15 07:17:58 +02:00
test_v3_credential.py Disable EC2 credentials access_id update 2020-05-19 17:35:05 +05:30
test_v3_domain_config.py Remove six usage 2020-01-30 06:06:51 +00:00
test_v3_endpoint_policy.py Remove six usage 2020-01-30 06:06:51 +00:00
test_v3_federation.py Replace assertItemsEqual with assertCountEqual 2020-09-17 17:02:35 +08:00
test_v3_filters.py Remove six usage 2020-01-30 06:06:51 +00:00
test_v3_identity.py Merge "Update hacking for Python3" 2020-04-25 10:21:07 +00:00
test_v3_oauth1.py Ensure OAuth1 authorized roles are respected 2020-05-01 15:48:58 -07:00
test_v3_oauth2.py requirements: Bump linter requirements 2022-10-26 15:14:21 +03:00
test_v3_os_revoke.py Switch from mock to unittest.mock use 2020-03-02 13:40:40 -06:00
test_v3_policy.py Remove six usage 2020-01-30 06:06:51 +00:00
test_v3_resource.py Remove six usage 2020-01-30 06:06:51 +00:00
test_v3_trust.py Remove six usage 2020-01-30 06:06:51 +00:00
test_validation.py Update hacking for Python3 2020-04-15 07:17:58 +02:00
test_versions.py OAuth2.0 Client Credentials Grant Flow Support 2022-06-14 09:09:33 +00:00
utils.py Update hacking for Python3 2020-04-15 07:17:58 +02:00