keystone/keystone/tests/unit
Corey Bryant 6a3888b05b PY3: Ensure LDAP searches use unicode attributes
This is a bug fix that corresponds to changes missed in commit
eca0829c4c.

In Python 3, python-ldap no longer allows bytes for some fields (DNs,
RDNs, attribute names, queries). Instead, text values are represented
as str, the Unicode text type. Compatibility support is provided for
Python 2 by setting bytes_mode=False [1]. This support was provided
in commit eca0829c4c.

In this patch we ensure that attribute names specified in searches
are no longer encoded.

[1] More details about byte/str usage in python-ldap can be found at:
http://www.python-ldap.org/en/latest/bytes_mode.html#bytes-mode

Change-Id: If3398e2d08ea14fa4b8c498b2a9a7c7edb47b9e5
Closes-Bug: #1820333
Depends-On: https://review.openstack.org/#/c/613648
(cherry picked from commit d6df1dff3e)
2019-03-19 12:07:47 -04:00
..
application_credential Add cache invalidation when delete application credential 2018-02-05 14:09:07 +08:00
assignment Add caching on trust role validation to improve performance 2018-10-23 06:01:46 +00:00
auth Move validate_issue_token_auth from controllers 2018-08-01 16:57:16 +00:00
backend Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
catalog Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
common Ensure view args is in policy dict 2018-09-11 16:38:11 -07:00
config_files Remove LDAP write support 2017-01-21 21:32:07 -05:00
contrib Added check to avoid keyerror "user['name']" 2018-06-28 09:52:18 +05:30
credential Revert "Rename fernet_utils to token_utils" 2018-06-06 16:49:27 +12:00
endpoint_policy Fixes remaining nits in endpoint_policy tests 2016-11-15 20:03:47 +00:00
external Replace parse_strtime with datetime.strptime 2017-12-21 12:14:28 -06:00
federation Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
identity PY3: Ensure LDAP searches use unicode attributes 2019-03-19 12:07:47 -04:00
ksfixtures Move keystone.server.common to keystone.server 2018-07-01 10:33:13 -07:00
limit Delete project limits when deleting project 2018-07-19 03:49:45 +00:00
policy Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
resource Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
saml2 Add openstack_user_domain to assertion 2015-05-04 14:33:48 -03:00
server Move unenforced_api decorator to module function 2018-08-01 18:22:52 +00:00
tests Adds a skip method to identify useless skips 2016-06-29 19:48:12 +00:00
token Remove KeystoneToken object 2018-08-01 21:33:59 +00:00
trust Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
__init__.py enable ldap tests for py3 2016-05-18 12:07:23 -04:00
base_classes.py Introduce new TokenModel object 2018-07-13 14:24:32 +00:00
core.py Merge "Move Credentials API to Flask Native" 2018-07-20 06:51:07 +00:00
default_catalog_multi_region.templates Fixing multi-region support in templated v3 catalog 2018-03-13 11:10:08 -07:00
default_catalog.templates Remove/update v2 catalog endpoint tests 2017-10-21 16:45:12 -05:00
default_fixtures.py Force SQLite to properly deal with foreign keys 2018-02-14 16:54:15 +00:00
fakeldap.py PY3: Ensure LDAP searches use unicode attributes 2019-03-19 12:07:47 -04:00
federation_fixtures.py Move existing tests to unit 2015-02-13 15:54:29 -06:00
filtering.py Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
identity_mapping.py Use the new enginefacade from oslo.db 2016-02-24 08:20:12 -08:00
mapping_fixtures.py Update test case for federation 2017-05-19 10:54:15 +08:00
rest.py Keystone adheres to public_endpoint opt only 2018-06-27 09:58:35 -07:00
test_associate_project_endpoint_extension.py Refactor self.*_api out of tests 2018-02-03 00:14:40 +00:00
test_auth_plugin.py Clean up token extra code 2018-08-02 11:52:10 +08:00
test_backend_endpoint_policy_sql.py Fixes the SQL model tests 2015-03-08 05:34:48 +00:00
test_backend_endpoint_policy.py Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
test_backend_federation_sql.py Require domain_id when registering Identity Providers 2017-01-06 16:05:12 +00:00
test_backend_id_mapping_sql.py Increase test coverage of entity_type id mapping query 2018-07-13 21:42:07 +00:00
test_backend_ldap_pool.py PY3: switch to using unicode text values 2019-03-19 12:07:12 -04:00
test_backend_ldap.py Add caching on trust role validation to improve performance 2018-10-23 06:01:46 +00:00
test_backend_rules.py Split policy backend tests 2016-03-04 15:32:42 -03:00
test_backend_sql.py Add project hierarchical tree check when Keystone start 2018-07-19 11:46:00 +08:00
test_backend_templated.py Fixing multi-region support in templated v3 catalog 2018-03-13 11:10:08 -07:00
test_cli.py Clarify deprecation message 2018-10-31 13:30:50 +01:00
test_config.py Remove pastedeploy 2018-06-06 19:30:26 +00:00
test_contrib_ec2_core.py Remove the rest of v2.0 legacy 2018-06-06 19:30:14 +00:00
test_contrib_s3_core.py Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
test_contrib_simple_cert.py Ensure HEAD is supported with simple cert 2017-06-13 16:03:38 +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 Remove pastedeploy 2018-06-06 19:30:26 +00:00
test_exception.py Remove log translations in keystone 2017-03-25 18:17:15 +00:00
test_hacking_checks.py Remove duplicated hacking rule 2017-06-28 07:48:03 +00:00
test_ldap_livetest.py PY3: switch to using unicode text values 2019-03-19 12:07:12 -04:00
test_ldap_pool_livetest.py Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
test_ldap_tls_livetest.py PY3: switch to using unicode text values 2019-03-19 12:07:12 -04:00
test_limits.py Do not allow create limits for domain 2018-08-03 15:33:44 +08:00
test_middleware.py Remove the TokenAuth middleware 2018-05-10 14:40:39 +00:00
test_policy.py Implement base for new RBAC Enforcer 2018-06-27 22:38:06 +00:00
test_revoke.py Cleanup keystone.token.providers.common 2018-07-13 14:49:07 +00:00
test_shadow_users.py Fix user email in federated shadow users 2018-03-22 19:26:08 +08:00
test_sql_banned_operations.py Work around deprecations for opportunistic tests 2018-02-27 13:46:27 +00:00
test_sql_upgrade.py Add registered_limit_id column for limit 2018-07-03 16:28:42 +00:00
test_token_provider.py Cleanup keystone.token.providers.common 2018-07-13 14:49:07 +00:00
test_url_middleware.py Change url in middleware test to v3 2017-11-01 05:09:27 +00:00
test_v3_application_credential.py Add application credential auth plugin 2018-01-27 12:00:19 +01:00
test_v3_assignment.py Exposing ambiguity bug when querying role assignments 2018-06-28 18:09:44 -03:00
test_v3_auth.py Address FIXMEs for listing revoked tokens 2018-08-01 11:46:10 -07:00
test_v3_catalog.py Force SQLite to properly deal with foreign keys 2018-02-14 16:54:15 +00:00
test_v3_credential.py fix self-service credential APIs 2019-02-15 17:14:18 -08:00
test_v3_domain_config.py Finish refactoring self.*_api out of tests 2018-02-05 23:26:08 +00:00
test_v3_endpoint_policy.py Refactor self.*_api out of tests 2018-02-03 00:14:40 +00:00
test_v3_federation.py Mapped Groups don't exist breaks WebSSO 2018-09-24 16:06:08 +00:00
test_v3_filters.py Force SQLite to properly deal with foreign keys 2018-02-14 16:54:15 +00:00
test_v3_identity.py Allow blocking users from self-service password change 2018-04-18 19:15:07 +00:00
test_v3_oauth1.py Convert OS-AUTH1 paths to flask dispatching 2018-08-02 15:11:58 -07:00
test_v3_os_revoke.py Refactor self.*_api out of tests 2018-02-03 00:14:40 +00:00
test_v3_policy.py Refactor self.*_api out of tests 2018-02-03 00:14:40 +00:00
test_v3_protection.py correct the admin_or_target_domain rule 2019-01-28 09:07:34 -08:00
test_v3_resource.py Update project depth check 2018-07-19 11:20:17 +08:00
test_v3_trust.py Implement "no-update" test for trusts 2018-07-26 10:30:24 -07:00
test_v3.py Clean up token extra code 2018-08-02 11:52:10 +08:00
test_validation.py Unified limit update APIs Refactor 2018-06-15 09:05:35 +08:00
test_versions.py Update API version to 3.11 2018-10-17 14:29:41 +02:00
test_wsgi.py Keystone adheres to public_endpoint opt only 2018-06-27 09:58:35 -07:00
utils.py Add new functionality to @wip 2016-05-22 16:06:50 +00:00