← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1980058] [NEW] Openstack keystone LDAP integration | openstack user list --domain domain.com | Internal server error (HTTP 500)

 

Public bug reported:

Description of problem:
I am trying to integrate AD server in keystone and facing 'Internal server error'
domain configuration:
 [stack@hkg2director ~]$ cat workplace/keystone_domain_specific_ldap_backend.yaml
# This is an example template on how to configure keystone domain specific LDAP
# backends. This will configure a domain called tripleoldap will the attributes
# specified.
parameter_defaults:
  KeystoneLDAPDomainEnable: true
  KeystoneLDAPBackendConfigs:
    domain.com:
      url: ldap://172.25.161.211
      user: cn=Openstack,ou=Admins,dc=domain,dc=com
      password: password
      suffix: dc=domain,dc=com
      user_tree_dn: ou=APAC,dc=domain,dc=com
      user_filter: "(|(memberOf=cn=openstackadmin,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackeditor,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackviewer,ou=Groups,dc=domain,dc=com)"
      user_objectclass: person
      user_id_attribute: cn

      group_tree_dn: ou=Groups,dc=domain,dc=com
      group_objectclass: Groups
      group_id_attribute: cn

When i issue the command:
$ openstack user list --domain domain.com
Output: Internal server error  (HTTP 500)

Keystone_wsgi_error.log:
[Tue Jun 28 06:46:49.112848 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] mod_wsgi (pid=45): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/keystone'.
[Tue Jun 28 06:46:49.121797 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] Traceback (most recent call last):
[Tue Jun 28 06:46:49.122202 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2464, in __call__
[Tue Jun 28 06:46:49.122218 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.wsgi_app(environ, start_response)
[Tue Jun 28 06:46:49.122231 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 187, in __call__
[Tue Jun 28 06:46:49.122238 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.app(environ, start_response)
[Tue Jun 28 06:46:49.122248 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
[Tue Jun 28 06:46:49.122254 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
[Tue Jun 28 06:46:49.122264 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
[Tue Jun 28 06:46:49.122270 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
[Tue Jun 28 06:46:49.122284 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/base.py", line 124, in __call__
[Tue Jun 28 06:46:49.122294 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
[Tue Jun 28 06:46:49.122304 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
[Tue Jun 28 06:46:49.122310 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
[Tue Jun 28 06:46:49.122320 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
[Tue Jun 28 06:46:49.122326 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
[Tue Jun 28 06:46:49.122337 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 143, in __call__
[Tue Jun 28 06:46:49.122344 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return resp(environ, start_response)
[Tue Jun 28 06:46:49.122354 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
[Tue Jun 28 06:46:49.122364 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
[Tue Jun 28 06:46:49.122374 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
[Tue Jun 28 06:46:49.122382 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
[Tue Jun 28 06:46:49.122392 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/base.py", line 124, in __call__
[Tue Jun 28 06:46:49.122400 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
[Tue Jun 28 06:46:49.122413 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
[Tue Jun 28 06:46:49.122421 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
[Tue Jun 28 06:46:49.122432 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
[Tue Jun 28 06:46:49.122439 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
[Tue Jun 28 06:46:49.122463 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
[Tue Jun 28 06:46:49.122470 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
[Tue Jun 28 06:46:49.122481 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
[Tue Jun 28 06:46:49.122490 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
[Tue Jun 28 06:46:49.122500 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/osprofiler/web.py", line 112, in __call__
[Tue Jun 28 06:46:49.122507 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return request.get_response(self.application)
[Tue Jun 28 06:46:49.122517 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
[Tue Jun 28 06:46:49.122525 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
[Tue Jun 28 06:46:49.122535 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
[Tue Jun 28 06:46:49.122542 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
[Tue Jun 28 06:46:49.122552 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
[Tue Jun 28 06:46:49.122562 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
[Tue Jun 28 06:46:49.122572 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
[Tue Jun 28 06:46:49.122579 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
[Tue Jun 28 06:46:49.122589 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/request_id.py", line 58, in __call__
[Tue Jun 28 06:46:49.122596 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
[Tue Jun 28 06:46:49.122605 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
[Tue Jun 28 06:46:49.122612 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
[Tue Jun 28 06:46:49.122622 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
[Tue Jun 28 06:46:49.122630 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
[Tue Jun 28 06:46:49.122670 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/server/flask/request_processing/middleware/url_normalize.py", line 38, in __call__
[Tue Jun 28 06:46:49.122696 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.app(environ, start_response)
[Tue Jun 28 06:46:49.122729 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
[Tue Jun 28 06:46:49.122743 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
[Tue Jun 28 06:46:49.122753 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
[Tue Jun 28 06:46:49.122761 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
[Tue Jun 28 06:46:49.122772 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystonemiddleware/auth_token/__init__.py", line 341, in __call__
[Tue Jun 28 06:46:49.122786 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self._app)
[Tue Jun 28 06:46:49.122800 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
[Tue Jun 28 06:46:49.122807 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
[Tue Jun 28 06:46:49.122817 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
[Tue Jun 28 06:46:49.122824 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
[Tue Jun 28 06:46:49.122835 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/werkzeug/middleware/dispatcher.py", line 78, in __call__
[Tue Jun 28 06:46:49.122845 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return app(environ, start_response)
[Tue Jun 28 06:46:49.122856 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2450, in wsgi_app
[Tue Jun 28 06:46:49.122863 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = self.handle_exception(e)
[Tue Jun 28 06:46:49.122874 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
[Tue Jun 28 06:46:49.122883 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
[Tue Jun 28 06:46:49.122893 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
[Tue Jun 28 06:46:49.122900 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
[Tue Jun 28 06:46:49.122910 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
[Tue Jun 28 06:46:49.122921 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
[Tue Jun 28 06:46:49.122932 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   [Previous line repeated 27 more times]
[Tue Jun 28 06:46:49.122943 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1867, in handle_exception
[Tue Jun 28 06:46:49.122952 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, tb)
[Tue Jun 28 06:46:49.122964 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise
[Tue Jun 28 06:46:49.122971 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise value.with_traceback(tb)
[Tue Jun 28 06:46:49.122981 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
[Tue Jun 28 06:46:49.122988 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = self.full_dispatch_request()
[Tue Jun 28 06:46:49.122998 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
[Tue Jun 28 06:46:49.123007 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     rv = self.handle_user_exception(e)
[Tue Jun 28 06:46:49.123018 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
[Tue Jun 28 06:46:49.123025 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
[Tue Jun 28 06:46:49.123035 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
[Tue Jun 28 06:46:49.123044 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
[Tue Jun 28 06:46:49.123059 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
[Tue Jun 28 06:46:49.123066 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
[Tue Jun 28 06:46:49.123077 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   [Previous line repeated 27 more times]
[Tue Jun 28 06:46:49.123089 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
[Tue Jun 28 06:46:49.123097 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, tb)
[Tue Jun 28 06:46:49.123107 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise
[Tue Jun 28 06:46:49.123118 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise value.with_traceback(tb)
[Tue Jun 28 06:46:49.123129 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
[Tue Jun 28 06:46:49.123137 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     rv = self.dispatch_request()
[Tue Jun 28 06:46:49.123147 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
[Tue Jun 28 06:46:49.123154 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.view_functions[rule.endpoint](**req.view_args)
[Tue Jun 28 06:46:49.123165 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 468, in wrapper
[Tue Jun 28 06:46:49.123175 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = resource(*args, **kwargs)
[Tue Jun 28 06:46:49.123186 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/views.py", line 89, in view
[Tue Jun 28 06:46:49.123193 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.dispatch_request(*args, **kwargs)
[Tue Jun 28 06:46:49.123204 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 583, in dispatch_request
[Tue Jun 28 06:46:49.123211 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = meth(*args, **kwargs)
[Tue Jun 28 06:46:49.123222 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/api/users.py", line 183, in get
[Tue Jun 28 06:46:49.123232 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self._list_users()
[Tue Jun 28 06:46:49.123245 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/api/users.py", line 215, in _list_users
[Tue Jun 28 06:46:49.123252 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     domain_scope=domain, hints=hints)
[Tue Jun 28 06:46:49.123263 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/common/manager.py", line 115, in wrapped
[Tue Jun 28 06:46:49.123273 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     __ret_val = __f(*args, **kwargs)
[Tue Jun 28 06:46:49.123282 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 414, in wrapper
[Tue Jun 28 06:46:49.123289 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, *args, **kwargs)
[Tue Jun 28 06:46:49.123299 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 424, in wrapper
[Tue Jun 28 06:46:49.123308 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, *args, **kwargs)
[Tue Jun 28 06:46:49.123327 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 1108, in list_users
[Tue Jun 28 06:46:49.123337 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     ref_list = self._handle_shadow_and_local_users(driver, hints)
[Tue Jun 28 06:46:49.123351 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 1091, in _handle_shadow_and_local_users
[Tue Jun 28 06:46:49.123358 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return driver.list_users(hints) + fed_res
[Tue Jun 28 06:46:49.123368 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 85, in list_users
[Tue Jun 28 06:46:49.123376 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.user.get_all_filtered(hints)
[Tue Jun 28 06:46:49.123387 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 328, in get_all_filtered
[Tue Jun 28 06:46:49.123394 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     for user in self.get_all(query, hints)]
[Tue Jun 28 06:46:49.123406 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 320, in get_all
[Tue Jun 28 06:46:49.123413 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     hints=hints)
[Tue Jun 28 06:46:49.123425 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1949, in get_all
[Tue Jun 28 06:46:49.123432 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return super(EnabledEmuMixIn, self).get_all(ldap_filter, hints)
[Tue Jun 28 06:46:49.123443 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1637, in get_all
[Tue Jun 28 06:46:49.123453 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     for x in self._ldap_get_all(hints, ldap_filter)]
[Tue Jun 28 06:46:49.123464 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/common/driver_hints.py", line 42, in wrapper
[Tue Jun 28 06:46:49.123472 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, hints, *args, **kwargs)
[Tue Jun 28 06:46:49.123482 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1590, in _ldap_get_all
[Tue Jun 28 06:46:49.123489 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrs)
[Tue Jun 28 06:46:49.123500 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 986, in search_s
[Tue Jun 28 06:46:49.123507 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrlist, attrsonly)
[Tue Jun 28 06:46:49.123517 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 679, in wrapper
[Tue Jun 28 06:46:49.123524 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return func(self, conn, *args, **kwargs)
[Tue Jun 28 06:46:49.123535 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 814, in search_s
[Tue Jun 28 06:46:49.123542 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrsonly)
[Tue Jun 28 06:46:49.123552 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 870, in search_s
[Tue Jun 28 06:46:49.123559 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
[Tue Jun 28 06:46:49.123578 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 1286, in search_ext_s
[Tue Jun 28 06:46:49.123586 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
[Tue Jun 28 06:46:49.123596 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 1224, in _apply_method_s
[Tue Jun 28 06:46:49.123603 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return func(self,*args,**kwargs)
[Tue Jun 28 06:46:49.123613 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 863, in search_ext_s
[Tue Jun 28 06:46:49.123621 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
[Tue Jun 28 06:46:49.123631 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 859, in search_ext
[Tue Jun 28 06:46:49.123650 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     timeout,sizelimit,
[Tue Jun 28 06:46:49.123664 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 340, in _ldap_call
[Tue Jun 28 06:46:49.123672 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, exc_traceback)
[Tue Jun 28 06:46:49.123690 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/compat.py", line 46, in reraise
[Tue Jun 28 06:46:49.123701 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise exc_value
[Tue Jun 28 06:46:49.123713 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 324, in _ldap_call
[Tue Jun 28 06:46:49.123720 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     result = func(*args,**kwargs)
[Tue Jun 28 06:46:49.123754 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] ldap.FILTER_ERROR: {'result': -7, 'desc': 'Bad search filter', 'ctrls': []}

Version-Release number of selected component (if applicable):

How reproducible:
Configure domain in keystone.

Steps to Reproduce:
1. setup 3 groups in ldap
2. create a user
3. configure ldap in keystone

Actual results:
When i issue the command:
$ openstack user list --domain domain.com
Output: Internal server error  (HTTP 500)

Expected results:
When i issue the command:
$ openstack user list --domain domain.com
Output: should display users in the groups

Additional info:

** Affects: keystone
     Importance: Undecided
         Status: New

** Description changed:

  Description of problem:
  I am trying to integrate AD server in keystone and facing 'Internal server error'
  domain configuration:
-  [stack@hkg2director ~]$ cat workplace/keystone_domain_specific_ldap_backend.yaml
+  [stack@hkg2director ~]$ cat workplace/keystone_domain_specific_ldap_backend.yaml
  # This is an example template on how to configure keystone domain specific LDAP
  # backends. This will configure a domain called tripleoldap will the attributes
  # specified.
  parameter_defaults:
-   KeystoneLDAPDomainEnable: true
-   KeystoneLDAPBackendConfigs:
-     inbdxworld.com:
-       url: ldap://172.25.161.211
-       user: cn=Openstack,ou=Admins,dc=domain,dc=com
-       password: password
-       suffix: dc=domain,dc=com
-       user_tree_dn: ou=APAC,dc=domain,dc=com
-       user_filter: "(|(memberOf=cn=openstackadmin,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackeditor,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackviewer,ou=Groups,dc=domain,dc=com)"
-       user_objectclass: person
-       user_id_attribute: cn
- 
-       group_tree_dn: ou=Groups,dc=domain,dc=com
-       group_objectclass: Groups
-       group_id_attribute: cn
+   KeystoneLDAPDomainEnable: true
+   KeystoneLDAPBackendConfigs:
+     domain.com:
+       url: ldap://172.25.161.211
+       user: cn=Openstack,ou=Admins,dc=domain,dc=com
+       password: password
+       suffix: dc=domain,dc=com
+       user_tree_dn: ou=APAC,dc=domain,dc=com
+       user_filter: "(|(memberOf=cn=openstackadmin,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackeditor,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackviewer,ou=Groups,dc=domain,dc=com)"
+       user_objectclass: person
+       user_id_attribute: cn
+ 
+       group_tree_dn: ou=Groups,dc=domain,dc=com
+       group_objectclass: Groups
+       group_id_attribute: cn
  
  When i issue the command:
  $ openstack user list --domain domain.com
  Output: Internal server error  (HTTP 500)
  
  Keystone_wsgi_error.log:
  [Tue Jun 28 06:46:49.112848 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] mod_wsgi (pid=45): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/keystone'.
  [Tue Jun 28 06:46:49.121797 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] Traceback (most recent call last):
  [Tue Jun 28 06:46:49.122202 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2464, in __call__
  [Tue Jun 28 06:46:49.122218 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.wsgi_app(environ, start_response)
  [Tue Jun 28 06:46:49.122231 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 187, in __call__
  [Tue Jun 28 06:46:49.122238 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.app(environ, start_response)
  [Tue Jun 28 06:46:49.122248 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122254 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122264 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122270 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122284 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/base.py", line 124, in __call__
  [Tue Jun 28 06:46:49.122294 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
  [Tue Jun 28 06:46:49.122304 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122310 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122320 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122326 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122337 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 143, in __call__
  [Tue Jun 28 06:46:49.122344 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return resp(environ, start_response)
  [Tue Jun 28 06:46:49.122354 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122364 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122374 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122382 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122392 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/base.py", line 124, in __call__
  [Tue Jun 28 06:46:49.122400 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
  [Tue Jun 28 06:46:49.122413 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122421 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122432 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122439 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122463 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122470 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122481 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122490 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122500 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/osprofiler/web.py", line 112, in __call__
  [Tue Jun 28 06:46:49.122507 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return request.get_response(self.application)
  [Tue Jun 28 06:46:49.122517 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122525 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122535 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122542 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122552 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122562 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122572 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122579 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122589 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/request_id.py", line 58, in __call__
  [Tue Jun 28 06:46:49.122596 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
  [Tue Jun 28 06:46:49.122605 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122612 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122622 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122630 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122670 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/server/flask/request_processing/middleware/url_normalize.py", line 38, in __call__
  [Tue Jun 28 06:46:49.122696 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.app(environ, start_response)
  [Tue Jun 28 06:46:49.122729 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122743 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122753 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122761 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122772 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystonemiddleware/auth_token/__init__.py", line 341, in __call__
  [Tue Jun 28 06:46:49.122786 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self._app)
  [Tue Jun 28 06:46:49.122800 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122807 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122817 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122824 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122835 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/werkzeug/middleware/dispatcher.py", line 78, in __call__
  [Tue Jun 28 06:46:49.122845 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return app(environ, start_response)
  [Tue Jun 28 06:46:49.122856 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2450, in wsgi_app
  [Tue Jun 28 06:46:49.122863 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = self.handle_exception(e)
  [Tue Jun 28 06:46:49.122874 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.122883 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.122893 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.122900 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.122910 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.122921 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.122932 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   [Previous line repeated 27 more times]
  [Tue Jun 28 06:46:49.122943 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1867, in handle_exception
  [Tue Jun 28 06:46:49.122952 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, tb)
  [Tue Jun 28 06:46:49.122964 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise
  [Tue Jun 28 06:46:49.122971 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise value.with_traceback(tb)
  [Tue Jun 28 06:46:49.122981 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
  [Tue Jun 28 06:46:49.122988 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = self.full_dispatch_request()
  [Tue Jun 28 06:46:49.122998 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
  [Tue Jun 28 06:46:49.123007 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     rv = self.handle_user_exception(e)
  [Tue Jun 28 06:46:49.123018 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.123025 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.123035 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.123044 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.123059 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.123066 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.123077 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   [Previous line repeated 27 more times]
  [Tue Jun 28 06:46:49.123089 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
  [Tue Jun 28 06:46:49.123097 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, tb)
  [Tue Jun 28 06:46:49.123107 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise
  [Tue Jun 28 06:46:49.123118 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise value.with_traceback(tb)
  [Tue Jun 28 06:46:49.123129 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
  [Tue Jun 28 06:46:49.123137 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     rv = self.dispatch_request()
  [Tue Jun 28 06:46:49.123147 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
  [Tue Jun 28 06:46:49.123154 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.view_functions[rule.endpoint](**req.view_args)
  [Tue Jun 28 06:46:49.123165 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 468, in wrapper
  [Tue Jun 28 06:46:49.123175 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = resource(*args, **kwargs)
  [Tue Jun 28 06:46:49.123186 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/views.py", line 89, in view
  [Tue Jun 28 06:46:49.123193 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.dispatch_request(*args, **kwargs)
  [Tue Jun 28 06:46:49.123204 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 583, in dispatch_request
  [Tue Jun 28 06:46:49.123211 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = meth(*args, **kwargs)
  [Tue Jun 28 06:46:49.123222 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/api/users.py", line 183, in get
  [Tue Jun 28 06:46:49.123232 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self._list_users()
  [Tue Jun 28 06:46:49.123245 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/api/users.py", line 215, in _list_users
  [Tue Jun 28 06:46:49.123252 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     domain_scope=domain, hints=hints)
  [Tue Jun 28 06:46:49.123263 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/common/manager.py", line 115, in wrapped
  [Tue Jun 28 06:46:49.123273 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     __ret_val = __f(*args, **kwargs)
  [Tue Jun 28 06:46:49.123282 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 414, in wrapper
  [Tue Jun 28 06:46:49.123289 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, *args, **kwargs)
  [Tue Jun 28 06:46:49.123299 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 424, in wrapper
  [Tue Jun 28 06:46:49.123308 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, *args, **kwargs)
  [Tue Jun 28 06:46:49.123327 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 1108, in list_users
  [Tue Jun 28 06:46:49.123337 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     ref_list = self._handle_shadow_and_local_users(driver, hints)
  [Tue Jun 28 06:46:49.123351 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 1091, in _handle_shadow_and_local_users
  [Tue Jun 28 06:46:49.123358 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return driver.list_users(hints) + fed_res
  [Tue Jun 28 06:46:49.123368 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 85, in list_users
  [Tue Jun 28 06:46:49.123376 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.user.get_all_filtered(hints)
  [Tue Jun 28 06:46:49.123387 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 328, in get_all_filtered
  [Tue Jun 28 06:46:49.123394 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     for user in self.get_all(query, hints)]
  [Tue Jun 28 06:46:49.123406 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 320, in get_all
  [Tue Jun 28 06:46:49.123413 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     hints=hints)
  [Tue Jun 28 06:46:49.123425 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1949, in get_all
  [Tue Jun 28 06:46:49.123432 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return super(EnabledEmuMixIn, self).get_all(ldap_filter, hints)
  [Tue Jun 28 06:46:49.123443 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1637, in get_all
  [Tue Jun 28 06:46:49.123453 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     for x in self._ldap_get_all(hints, ldap_filter)]
  [Tue Jun 28 06:46:49.123464 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/common/driver_hints.py", line 42, in wrapper
  [Tue Jun 28 06:46:49.123472 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, hints, *args, **kwargs)
  [Tue Jun 28 06:46:49.123482 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1590, in _ldap_get_all
  [Tue Jun 28 06:46:49.123489 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrs)
  [Tue Jun 28 06:46:49.123500 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 986, in search_s
  [Tue Jun 28 06:46:49.123507 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrlist, attrsonly)
  [Tue Jun 28 06:46:49.123517 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 679, in wrapper
  [Tue Jun 28 06:46:49.123524 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return func(self, conn, *args, **kwargs)
  [Tue Jun 28 06:46:49.123535 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 814, in search_s
  [Tue Jun 28 06:46:49.123542 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrsonly)
  [Tue Jun 28 06:46:49.123552 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 870, in search_s
  [Tue Jun 28 06:46:49.123559 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  [Tue Jun 28 06:46:49.123578 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 1286, in search_ext_s
  [Tue Jun 28 06:46:49.123586 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  [Tue Jun 28 06:46:49.123596 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 1224, in _apply_method_s
  [Tue Jun 28 06:46:49.123603 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return func(self,*args,**kwargs)
  [Tue Jun 28 06:46:49.123613 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 863, in search_ext_s
  [Tue Jun 28 06:46:49.123621 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
  [Tue Jun 28 06:46:49.123631 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 859, in search_ext
  [Tue Jun 28 06:46:49.123650 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     timeout,sizelimit,
  [Tue Jun 28 06:46:49.123664 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 340, in _ldap_call
  [Tue Jun 28 06:46:49.123672 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, exc_traceback)
  [Tue Jun 28 06:46:49.123690 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/compat.py", line 46, in reraise
  [Tue Jun 28 06:46:49.123701 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise exc_value
  [Tue Jun 28 06:46:49.123713 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 324, in _ldap_call
  [Tue Jun 28 06:46:49.123720 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     result = func(*args,**kwargs)
  [Tue Jun 28 06:46:49.123754 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] ldap.FILTER_ERROR: {'result': -7, 'desc': 'Bad search filter', 'ctrls': []}
  
- 
  Version-Release number of selected component (if applicable):
- 
  
  How reproducible:
  Configure domain in keystone.
  
  Steps to Reproduce:
  1. setup 3 groups in ldap
  2. create a user
  3. configure ldap in keystone
  
  Actual results:
  When i issue the command:
  $ openstack user list --domain domain.com
  Output: Internal server error  (HTTP 500)
  
  Expected results:
  When i issue the command:
  $ openstack user list --domain domain.com
  Output: should display users in the groups
  
  Additional info:

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1980058

Title:
  Openstack keystone LDAP integration | openstack user list --domain
  domain.com | Internal server error (HTTP 500)

Status in OpenStack Identity (keystone):
  New

Bug description:
  Description of problem:
  I am trying to integrate AD server in keystone and facing 'Internal server error'
  domain configuration:
   [stack@hkg2director ~]$ cat workplace/keystone_domain_specific_ldap_backend.yaml
  # This is an example template on how to configure keystone domain specific LDAP
  # backends. This will configure a domain called tripleoldap will the attributes
  # specified.
  parameter_defaults:
    KeystoneLDAPDomainEnable: true
    KeystoneLDAPBackendConfigs:
      domain.com:
        url: ldap://172.25.161.211
        user: cn=Openstack,ou=Admins,dc=domain,dc=com
        password: password
        suffix: dc=domain,dc=com
        user_tree_dn: ou=APAC,dc=domain,dc=com
        user_filter: "(|(memberOf=cn=openstackadmin,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackeditor,ou=Groups,dc=domain,dc=com)(memberOf=cn=openstackviewer,ou=Groups,dc=domain,dc=com)"
        user_objectclass: person
        user_id_attribute: cn

        group_tree_dn: ou=Groups,dc=domain,dc=com
        group_objectclass: Groups
        group_id_attribute: cn

  When i issue the command:
  $ openstack user list --domain domain.com
  Output: Internal server error  (HTTP 500)

  Keystone_wsgi_error.log:
  [Tue Jun 28 06:46:49.112848 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] mod_wsgi (pid=45): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/keystone'.
  [Tue Jun 28 06:46:49.121797 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] Traceback (most recent call last):
  [Tue Jun 28 06:46:49.122202 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2464, in __call__
  [Tue Jun 28 06:46:49.122218 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.wsgi_app(environ, start_response)
  [Tue Jun 28 06:46:49.122231 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 187, in __call__
  [Tue Jun 28 06:46:49.122238 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.app(environ, start_response)
  [Tue Jun 28 06:46:49.122248 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122254 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122264 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122270 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122284 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/base.py", line 124, in __call__
  [Tue Jun 28 06:46:49.122294 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
  [Tue Jun 28 06:46:49.122304 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122310 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122320 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122326 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122337 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 143, in __call__
  [Tue Jun 28 06:46:49.122344 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return resp(environ, start_response)
  [Tue Jun 28 06:46:49.122354 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122364 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122374 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122382 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122392 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/base.py", line 124, in __call__
  [Tue Jun 28 06:46:49.122400 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
  [Tue Jun 28 06:46:49.122413 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122421 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122432 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122439 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122463 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122470 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122481 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122490 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122500 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/osprofiler/web.py", line 112, in __call__
  [Tue Jun 28 06:46:49.122507 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return request.get_response(self.application)
  [Tue Jun 28 06:46:49.122517 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122525 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122535 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122542 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122552 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122562 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122572 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122579 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122589 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/oslo_middleware/request_id.py", line 58, in __call__
  [Tue Jun 28 06:46:49.122596 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self.application)
  [Tue Jun 28 06:46:49.122605 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122612 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122622 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122630 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122670 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/server/flask/request_processing/middleware/url_normalize.py", line 38, in __call__
  [Tue Jun 28 06:46:49.122696 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.app(environ, start_response)
  [Tue Jun 28 06:46:49.122729 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 129, in __call__
  [Tue Jun 28 06:46:49.122743 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = self.call_func(req, *args, **kw)
  [Tue Jun 28 06:46:49.122753 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/dec.py", line 193, in call_func
  [Tue Jun 28 06:46:49.122761 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.func(req, *args, **kwargs)
  [Tue Jun 28 06:46:49.122772 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystonemiddleware/auth_token/__init__.py", line 341, in __call__
  [Tue Jun 28 06:46:49.122786 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = req.get_response(self._app)
  [Tue Jun 28 06:46:49.122800 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1314, in send
  [Tue Jun 28 06:46:49.122807 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     application, catch_exc_info=False)
  [Tue Jun 28 06:46:49.122817 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/webob/request.py", line 1278, in call_application
  [Tue Jun 28 06:46:49.122824 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     app_iter = application(self.environ, start_response)
  [Tue Jun 28 06:46:49.122835 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/werkzeug/middleware/dispatcher.py", line 78, in __call__
  [Tue Jun 28 06:46:49.122845 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return app(environ, start_response)
  [Tue Jun 28 06:46:49.122856 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2450, in wsgi_app
  [Tue Jun 28 06:46:49.122863 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = self.handle_exception(e)
  [Tue Jun 28 06:46:49.122874 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.122883 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.122893 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.122900 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.122910 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.122921 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.122932 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   [Previous line repeated 27 more times]
  [Tue Jun 28 06:46:49.122943 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1867, in handle_exception
  [Tue Jun 28 06:46:49.122952 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, tb)
  [Tue Jun 28 06:46:49.122964 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise
  [Tue Jun 28 06:46:49.122971 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise value.with_traceback(tb)
  [Tue Jun 28 06:46:49.122981 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
  [Tue Jun 28 06:46:49.122988 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     response = self.full_dispatch_request()
  [Tue Jun 28 06:46:49.122998 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
  [Tue Jun 28 06:46:49.123007 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     rv = self.handle_user_exception(e)
  [Tue Jun 28 06:46:49.123018 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.123025 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.123035 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.123044 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.123059 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 272, in error_router
  [Tue Jun 28 06:46:49.123066 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return original_handler(e)
  [Tue Jun 28 06:46:49.123077 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   [Previous line repeated 27 more times]
  [Tue Jun 28 06:46:49.123089 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
  [Tue Jun 28 06:46:49.123097 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, tb)
  [Tue Jun 28 06:46:49.123107 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise
  [Tue Jun 28 06:46:49.123118 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise value.with_traceback(tb)
  [Tue Jun 28 06:46:49.123129 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
  [Tue Jun 28 06:46:49.123137 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     rv = self.dispatch_request()
  [Tue Jun 28 06:46:49.123147 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
  [Tue Jun 28 06:46:49.123154 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.view_functions[rule.endpoint](**req.view_args)
  [Tue Jun 28 06:46:49.123165 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 468, in wrapper
  [Tue Jun 28 06:46:49.123175 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = resource(*args, **kwargs)
  [Tue Jun 28 06:46:49.123186 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask/views.py", line 89, in view
  [Tue Jun 28 06:46:49.123193 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.dispatch_request(*args, **kwargs)
  [Tue Jun 28 06:46:49.123204 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/flask_restful/__init__.py", line 583, in dispatch_request
  [Tue Jun 28 06:46:49.123211 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     resp = meth(*args, **kwargs)
  [Tue Jun 28 06:46:49.123222 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/api/users.py", line 183, in get
  [Tue Jun 28 06:46:49.123232 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self._list_users()
  [Tue Jun 28 06:46:49.123245 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/api/users.py", line 215, in _list_users
  [Tue Jun 28 06:46:49.123252 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     domain_scope=domain, hints=hints)
  [Tue Jun 28 06:46:49.123263 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/common/manager.py", line 115, in wrapped
  [Tue Jun 28 06:46:49.123273 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     __ret_val = __f(*args, **kwargs)
  [Tue Jun 28 06:46:49.123282 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 414, in wrapper
  [Tue Jun 28 06:46:49.123289 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, *args, **kwargs)
  [Tue Jun 28 06:46:49.123299 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 424, in wrapper
  [Tue Jun 28 06:46:49.123308 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, *args, **kwargs)
  [Tue Jun 28 06:46:49.123327 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 1108, in list_users
  [Tue Jun 28 06:46:49.123337 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     ref_list = self._handle_shadow_and_local_users(driver, hints)
  [Tue Jun 28 06:46:49.123351 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/core.py", line 1091, in _handle_shadow_and_local_users
  [Tue Jun 28 06:46:49.123358 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return driver.list_users(hints) + fed_res
  [Tue Jun 28 06:46:49.123368 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 85, in list_users
  [Tue Jun 28 06:46:49.123376 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.user.get_all_filtered(hints)
  [Tue Jun 28 06:46:49.123387 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 328, in get_all_filtered
  [Tue Jun 28 06:46:49.123394 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     for user in self.get_all(query, hints)]
  [Tue Jun 28 06:46:49.123406 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/core.py", line 320, in get_all
  [Tue Jun 28 06:46:49.123413 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     hints=hints)
  [Tue Jun 28 06:46:49.123425 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1949, in get_all
  [Tue Jun 28 06:46:49.123432 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return super(EnabledEmuMixIn, self).get_all(ldap_filter, hints)
  [Tue Jun 28 06:46:49.123443 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1637, in get_all
  [Tue Jun 28 06:46:49.123453 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     for x in self._ldap_get_all(hints, ldap_filter)]
  [Tue Jun 28 06:46:49.123464 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/common/driver_hints.py", line 42, in wrapper
  [Tue Jun 28 06:46:49.123472 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return f(self, hints, *args, **kwargs)
  [Tue Jun 28 06:46:49.123482 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 1590, in _ldap_get_all
  [Tue Jun 28 06:46:49.123489 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrs)
  [Tue Jun 28 06:46:49.123500 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 986, in search_s
  [Tue Jun 28 06:46:49.123507 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrlist, attrsonly)
  [Tue Jun 28 06:46:49.123517 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 679, in wrapper
  [Tue Jun 28 06:46:49.123524 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return func(self, conn, *args, **kwargs)
  [Tue Jun 28 06:46:49.123535 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib/python3.6/site-packages/keystone/identity/backends/ldap/common.py", line 814, in search_s
  [Tue Jun 28 06:46:49.123542 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     attrsonly)
  [Tue Jun 28 06:46:49.123552 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 870, in search_s
  [Tue Jun 28 06:46:49.123559 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  [Tue Jun 28 06:46:49.123578 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 1286, in search_ext_s
  [Tue Jun 28 06:46:49.123586 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  [Tue Jun 28 06:46:49.123596 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 1224, in _apply_method_s
  [Tue Jun 28 06:46:49.123603 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     return func(self,*args,**kwargs)
  [Tue Jun 28 06:46:49.123613 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 863, in search_ext_s
  [Tue Jun 28 06:46:49.123621 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
  [Tue Jun 28 06:46:49.123631 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 859, in search_ext
  [Tue Jun 28 06:46:49.123650 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     timeout,sizelimit,
  [Tue Jun 28 06:46:49.123664 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 340, in _ldap_call
  [Tue Jun 28 06:46:49.123672 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     reraise(exc_type, exc_value, exc_traceback)
  [Tue Jun 28 06:46:49.123690 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/compat.py", line 46, in reraise
  [Tue Jun 28 06:46:49.123701 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     raise exc_value
  [Tue Jun 28 06:46:49.123713 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]   File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 324, in _ldap_call
  [Tue Jun 28 06:46:49.123720 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080]     result = func(*args,**kwargs)
  [Tue Jun 28 06:46:49.123754 2022] [wsgi:error] [pid 45] [remote 172.25.201.201:58080] ldap.FILTER_ERROR: {'result': -7, 'desc': 'Bad search filter', 'ctrls': []}

  Version-Release number of selected component (if applicable):

  How reproducible:
  Configure domain in keystone.

  Steps to Reproduce:
  1. setup 3 groups in ldap
  2. create a user
  3. configure ldap in keystone

  Actual results:
  When i issue the command:
  $ openstack user list --domain domain.com
  Output: Internal server error  (HTTP 500)

  Expected results:
  When i issue the command:
  $ openstack user list --domain domain.com
  Output: should display users in the groups

  Additional info:

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1980058/+subscriptions



Follow ups