#9846 openid_login() from python-fedora to id.fedoraproject.org fails with 500 when you forget 2nd factor
Opened 12 days ago by frantisekz. Modified 10 days ago

Describe what you would like us to do:


This might've started with AAA, but I am not absolutely sure.

The simple reproducer I'd came to is:

bc = BodhiClient(username="frantisekz", useragent="Fedora Easy Karma/GIT", retries=3)
bc.csrf()

You'll be asked for password, and if you have two factor auth enabled and forget the 2nd factor, it all blows up with 500:

fedora-easy-karma --fas-username=frantisekz
Password: 
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 833, in urlopen
    return self.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 833, in urlopen
    return self.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 833, in urlopen
    return self.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 819, in urlopen
    retries = retries.increment(method, url, response=response, _pool=self)
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='id.fedoraproject.org', port=443): Max retries exceeded with url: /api/v1/ (Caused by ResponseError('too many 500 error responses'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/fedora-easy-karma", line 851, in <module>
    fek = FedoraEasyKarma()
  File "/usr/bin/fedora-easy-karma", line 500, in __init__
    csrf = bc.csrf()
  File "/usr/lib/python3.9/site-packages/bodhi/client/bindings.py", line 117, in wrapper
    result = method(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/bodhi/client/bindings.py", line 616, in csrf
    self.login(self.username, self.password)
  File "/usr/lib/python3.9/site-packages/fedora/client/openidbaseclient.py", line 303, in login
    response = openid_login(
  File "/usr/lib/python3.9/site-packages/fedora/client/openidproxyclient.py", line 129, in openid_login
    response = session.post(
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 578, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 507, in send
    raise RetryError(e, request=request)
requests.exceptions.RetryError: HTTPSConnectionPool(host='id.fedoraproject.org', port=443): Max retries exceeded with url: /api/v1/ (Caused by ResponseError('too many 500 error responses'))

When do you need this to be done by? (YYYY/MM/DD)



Metadata Update from @smooge:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: authentication, dev, medium-gain, medium-trouble, ops

11 days ago

It's not clear to me where this issue is... I guess ipsilon / id.fedoraproject.org ? Thats whats sending 500's?

Can you share the exact time you got a 500 there so we can check the ipsilon logs against that?

Login to comment on this ticket.

Metadata
Boards 2
ops Status: Backlog
dev Status: Backlog