Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-939

Quay LDAP user login get 500 error page

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 2020.08.20
    • quay-v3.4.0
    • quay
    • 0

    Description

      Description:

      This is an issue found when login quay with LDAP user, get quay 500 error page, checked Quay POD logs, get "TypeError: ord() expected string of length 1, but int found"

      Quay Image: quay.io/projectquay/quay:50ba6130

      Steps:

      1. Open Quay-config app
      2. Provide LDAP required configurations for internal authentication
      3. Save configurations and roll out deployment
      4. Login Quay with LDAP user

      Expected Results:

      Login Quay with LDAP user complete successfully.

      Actual Results:

      Login Quay with LDAP user get quay 500 error page

       

      Quay POD logs:

       gunicorn-web stdout | 2020-08-06 00:38:26,302 [351] [ERROR] [gunicorn.error] Error handling request /api/v1/signin

      gunicorn-web stdout | Traceback (most recent call last):

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 55, in handle

      gunicorn-web stdout |     self.handle_request(listener_name, req, client, addr)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 143, in handle_request

      gunicorn-web stdout |     super().handle_request(listener_name, req, sock, addr)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 106, in handle_request

      gunicorn-web stdout |     respiter = self.wsgi(environ, resp.start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in _call_

      gunicorn-web stdout |     return self.wsgi_app(environ, start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 232, in _call_

      gunicorn-web stdout |     return self.app(environ, start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app

      gunicorn-web stdout |     response = self.handle_exception(e)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 269, in error_router

      gunicorn-web stdout |     return original_handler(e)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception

      gunicorn-web stdout |     reraise(exc_type, exc_value, tb)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise

      gunicorn-web stdout |     raise value.with_traceback(tb)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app

      gunicorn-web stdout |     response = self.full_dispatch_request()

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request

      ......

       

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 458, in wrapper

      gunicorn-web stdout |     resp = resource(*args, **kwargs)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/views.py", line 89, in view

      gunicorn-web stdout |     return self.dispatch_request(*args, **kwargs)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 573, in dispatch_request

      gunicorn-web stdout |     resp = meth(*args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/decorators.py", line 145, in wrapper

      gunicorn-web stdout |     return func(*args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/decorators.py", line 120, in wrapper

      gunicorn-web stdout |     return func(*args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/api/_init_.py", line 416, in wrapped

      gunicorn-web stdout |     return func(self, *args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/api/user.py", line 714, in post

      gunicorn-web stdout |     return conduct_signin(username, password, invite_code=invite_code)

      gunicorn-web stdout |   File "/quay-registry/endpoints/api/user.py", line 585, in conduct_signin

      gunicorn-web stdout |     (found_user, error_message) = authentication.verify_and_link_user(username_or_email, password)

      gunicorn-web stdout |   File "/quay-registry/data/users/_init_.py", line 319, in verify_and_link_user

      gunicorn-web stdout |     (result, err_msg) = self.state.verify_and_link_user(username_or_email, password)

      gunicorn-web stdout |   File "/quay-registry/data/users/federated.py", line 87, in verify_and_link_user

      gunicorn-web stdout |     return self._get_and_link_federated_user_info(credentials.username, credentials.email)

      gunicorn-web stdout |   File "/quay-registry/data/users/federated.py", line 148, in _get_and_link_federated_user_info

      gunicorn-web stdout |     for valid_username in generate_valid_usernames(username):

      gunicorn-web stdout |   File "/quay-registry/util/validation.py", line 71, in generate_valid_usernames

      gunicorn-web stdout |     normalized = unidecode(input_username).strip().lower()

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/text_unidecode/_init_.py", line 11, in unidecode

      gunicorn-web stdout |     codepoint = ord(ch)

      gunicorn-web stdout | TypeError: ord() expected string of length 1, but int found

      gunicorn-web stdout | 2020-08-06 00:38:26,304 [351] [INFO] [gunicorn.access]  - - [06/Aug/2020:00:38:26 +0000] "POST /api/v1/signin HTTP/1.0" 500 0 "" ""

      nginx stdout | 10.128.2.4 () - - [06/Aug/2020:00:38:26 +0000] "POST /api/v1/signin HTTP/2.0" 500 141 "https://demo-quayecosystem-quay-quay-enterprise.apps.quay-281.qe.devcluster.openshift.com/repository/?tab=info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Firefox/68.0" (0.295 103 0.295)

      Attachments

        Activity

          People

            sleesinc Kenny Lee Sin Cheong
            lzha1981 luffy zhang
            luffy zhang luffy zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: