#17 fedora.upn is not respected
Closed by kparal. Opened by jpbn.

Hello,

On https://fedoraproject.org/wiki/Fedora_Easy_Karma

it says Store your FAS username in |~/.fedora.upn|

|I did, but when I do |

fedora-easy-karma

It uses my computer account name 'jaap' and not my Fas username. jpbn

How to sign in for fedora-easy-karma ?


I know a workaround fedora-easy-karma --fas-username --
but that does not work for me either.

when I login the terminal shows all updates, even if i did not install them. (installed 0 days ago)

@frantisekz I know you're using a different username. Could you please look into this and fix the documentation if it's incorrect?

@jpbn If you want us to help you, you'll need to improve the quality of your comments. What is "done"?

aSBkaWQgY2hhbmdlIHRoZSB0ZXh0IG9uIHRoZSB3aWtpLCBhcyB5b3UgYXNrZWQuCgpTZW50IGZy
b20gUHJvdG9uTWFpbCBtb2JpbGUKCi0tLS0tLS0tIE9yaWdpbmFsIE1lc3NhZ2UgLS0tLS0tLS0K
T24gU2VwIDEwLCAyMDIwLCAzOjUyIFBNLCBLYW1pbCBQw6FyYWwgd3JvdGU6Cgo+IGtwYXJhbCBh
ZGRlZCBhIG5ldyBjb21tZW50IHRvIGFuIGlzc3VlIHlvdSBhcmUgZm9sbG93aW5nOgo+IGBgCj4g
QGpwYm4gSWYgeW91IHdhbnQgdXMgdG8gaGVscCB5b3UsIHlvdSdsbCBuZWVkIHRvIGltcHJvdmUg
dGhlIHF1YWxpdHkgb2YgeW91ciBjb21tZW50cy4gV2hhdCBpcyAiZG9uZSI/Cj4gYGAKPgo+IFRv
IHJlcGx5LCB2aXNpdCB0aGUgbGluayBiZWxvdyBvciBqdXN0IHJlcGx5IHRvIHRoaXMgZW1haWwK
PiBodHRwczovL3BhZ3VyZS5pby9mZWRvcmEtZWFzeS1rYXJtYS9pc3N1ZS8xNw==

@jpbn You've sent your reply encoded in base64. I assume you replied from your email and something broke along the way. Please don't do that, use the website interface.

Also, I did not ask you to change the wiki, I asked @frantisekz . I reverted the change for the moment, because your advice was incorrect. Please just stand by and wait.

Hello @jpbn , thanks for reporting the problem, but please do not change the documentation when the behaviour of the application is different from it. The problem might be in the application itself and needs fixing instead of saying in the documentation that it does not work.

I have tried myself on Fedora 32 and there seems to be two problems:

  1. in incorrect handling of .fedora.upn
  2. in Bodhi communication

I did the following:

  • Created a new user kikina whose login name is different from my FAS account.
  • Created the ~/.fedora.upn file and put name@mail.com (not exactly this, but my FAS has a similar form) in it and ran fedora-easy-karma from the CLI.
  • The script asked me for a password and I put it there.
  • Got Warning: Authentication error for user: kikina which means that the value in .fedora.upn was not taken into account.
  • The script offered to enter another FAS account, so I used my real FAS account and the corresponding password.
  • Got an Python exception raised:
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 833, in urlopen
    return self.urlopen(
  File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 833, in urlopen
    return self.urlopen(
  File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 833, in urlopen
    return self.urlopen(
  File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 819, in urlopen
    retries = retries.increment(method, url, response=response, _pool=self)
  File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='bodhi.fedoraproject.org', port=443): Max retries exceeded with url: /dologin.html?janrain_nonce=2020-09-11T08%3A04%3A47ZlpbrXM (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.8/site-packages/bodhi/client/bindings.py", line 117, in wrapper
    result = method(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/bodhi/client/bindings.py", line 613, in csrf
    self.login(self.username, self.password)
  File "/usr/lib/python3.8/site-packages/fedora/client/openidbaseclient.py", line 287, in login
    response = openid_login(
  File "/usr/lib/python3.8/site-packages/fedora/client/openidproxyclient.py", line 140, in openid_login
    response = session.post(output['response']['openid.return_to'],
  File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 581, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 507, in send
    raise RetryError(e, request=request)
requests.exceptions.RetryError: HTTPSConnectionPool(host='bodhi.fedoraproject.org', port=443): Max retries exceeded with url: /dologin.html?janrain_nonce=2020-09-11T08%3A04%3A47ZlpbrXM (Caused by ResponseError('too many 500 error responses'))

My f-e-k version is fedora-easy-karma-0-0.44.20200427git6fc0f39.fc32.noarch .

@frantisekz , do you need some more info from me?

@frantisekz is now on vacation for the next 8 days or so.
@lbrabec Could you perhaps look into the code instead? Thanks!

@kparal, can you check the PR #18 - I fixed it.

The Bodhi problem was caused by incorrect FAS, because I used name@mail.com where it only accepts name.

@lruzicka So, are you saying that if you fail to authenticate using your current username, FEK asks you to input a new username, and if you provide it correctly, it works just fine? (On current devel branch, without any patch).

@kparal , what is a current devel branch? In the repo, I only see master and three feature branches?

@kparal

on Fedora 33 with updates-testing enabled I installed FEK using dnf install fedora-easy-karma and then ran it with fedora-easy-karma --fas-username username and yes, it is working as expected.

In the PR, I added a feature that looks into the ~/.fedora.upn file and uses the FAS from there, so you can omit the --fas-username switch.

I believe that this is what @jpbn wanted.

See my comments in #18 for details on the ~/.fedora.upn file handling

Thanks,
on Fedora 33 with updates-testing enabled I installed FEK using dnf install fedora-easy-karma and then ran it with fedora-easy-karma --fas-username username and yes, it is working as expected.
That works for me too. So That is a help for me.

Waiting for a solution on the fedora.upn file. (KEF is not updated yet I see)

Thanks again.

Metadata Update from @jpbn:
- Issue status updated to: Closed (was: Open)

Metadata Update from @kparal:
- Issue status updated to: Open (was: Closed)

@jpbn ,
we are currently discussing the way how the feature will be enabled correctly to let you store your FAS in an external file. This will take some time, so you are free to use the --fas-username as a workaround for the time's being.

Commit bd04bd5d fixes this issue

Commit 36408d14 fixes this issue

This is now fixed and will be part of the next program release. FEK will again be able to read ~/.fedora.upn.

Metadata Update from @kparal:
- Issue close_status updated to: None (was: Fixed)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/quality/fedora-easy-karma/issues/17

Please continue any further discussion there.

Metadata