Bug 995430 - can't authenticate
can't authenticate
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: packagedb-cli (Show other bugs)
20
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Pierre-YvesChibon
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-09 06:46 EDT by Marcela Mašláňová
Modified: 2013-11-27 16:23 EST (History)
3 users (show)

See Also:
Fixed In Version: packagedb-cli-1.6.0-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-18 09:05:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix a few bugs in get_client_authentified (1.23 KB, patch)
2013-08-28 11:28 EDT, Toshio Ernie Kuratomi
no flags Details | Diff

  None (edit)
Description Marcela Mašláňová 2013-08-09 06:46:44 EDT
Description of problem:
I can't reassign my packages to my colleague. I tried to reassign them by:
pkgdb-cli --user mmaslano unorphan --owner jplesnik name_of_package

I used the same approach for giving her acl on my packages, but the old script didn't work either. Authentication stopped failing, when I removed the .fedora/.fedora-session and run twice:
pkgdb-cli request --user mmaslano --cancel perl-pip watchcommits

I don't think it should work like that. Also time ago worked script with parameters --user mmaslano --password my_password, which is not true anymore even if help insist on using password on commandline. Something is really wrong.

Version-Release number of selected component (if applicable):
packagedb-cli-1.5.0-1.fc19.noarch

How reproducible:
pkgdb-cli --user mmaslano --debug unorphan --owner jplesnik perl-pip
INFO:pkgdb:user    : mmaslano
INFO:pkgdb:package : perl-pip
INFO:pkgdb:branch  : devel
INFO:pkgdb:owner  : jplesnik
DEBUG:pkgdb:Packages: perl-pip
INFO:pkgdb:Unorphaning package perl-pip on branch devel
Error: Auth was requested but no way to perform auth was given.  Please set username and password or session_id before calling this function with auth=True


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Till Maas 2013-08-27 15:42:25 EDT
For me it is broken for a user with a different username than my fedora username, but it works if the usernames match. But it might also be something else, why it works/does not work for the different users:

    $ LANG=C pkgdb-cli --debug orphan --retire mod_mono devel
    INFO:pkgdb:user    : None
    INFO:pkgdb:package : mod_mono
    INFO:pkgdb:branch  : devel
    INFO:pkgdb:all     : False
    INFO:pkgdb:retire  : True
    DEBUG:pkgdb:Orphan mod_mono in devel
    INFO:pkgdb:Orphaning package mod_mono on branch devel
    Error: Auth was requested but no way to perform auth was given.  Please set username and password or session_id before calling this function with auth=True

Would be nice to fix this soon, because fedpkg from testing  already tries to call fedpkg-cli to retire packages.
Comment 2 Toshio Ernie Kuratomi 2013-08-27 16:33:46 EDT
Does pkgdb-cli prompt for username and password in this case and still refuse to authenticate you or does it never give you that chance?  If the latter, pkgd-cli probably needs to catch the AuthError, prompt for (username: optional) and password and then try again with that.

If the former, then it's a bug in python-fedora.  I've heard of that sporadically but haven't been able to diagnose it first hand.  We'll cross that bridge if that's what this is.
Comment 3 Till Maas 2013-08-27 16:45:32 EDT
(In reply to Toshio Ernie Kuratomi from comment #2)
> Does pkgdb-cli prompt for username and password in this case and still
> refuse to authenticate you or does it never give you that chance?  If the
> latter, pkgd-cli probably needs to catch the AuthError, prompt for
> (username: optional) and password and then try again with that.

I do not get a password or username prompt when I try to run it as a different user. The output in comment:1 is all I get.
Comment 4 Marcela Mašláňová 2013-08-28 03:32:10 EDT
I agree, my user on computer is different than FAS name.
Comment 5 Toshio Ernie Kuratomi 2013-08-28 11:28:24 EDT
Created attachment 791436 [details]
Fix a few bugs in get_client_authentified

Well, I found a few bugs that might be this one.  Could you try this patch and see if things work afterwards?
Comment 6 Till Maas 2013-08-28 11:45:45 EDT
(In reply to Toshio Ernie Kuratomi from comment #5)
> Created attachment 791436 [details]
> Fix a few bugs in get_client_authentified
> 
> Well, I found a few bugs that might be this one.  Could you try this patch
> and see if things work afterwards?

Is there any authenticated feature that can be used to test this? There is no package I need to retire right now, but I could unretire and retire a package if there is no other way.
Comment 7 Toshio Ernie Kuratomi 2013-08-28 12:07:57 EDT
Giving the global --test switch should operate on the staging database instead of the production database.  You can try that.
Comment 8 Till Maas 2013-08-28 12:29:08 EDT
(In reply to Toshio Ernie Kuratomi from comment #7)
> Giving the global --test switch should operate on the staging database
> instead of the production database.  You can try that.

With the patch, it asks me for a password then, but I do not know which to use there.
Comment 9 Toshio Ernie Kuratomi 2013-08-28 18:47:04 EDT
You can check and set a different password at https://admin.stg.fedoraproject.org/accounts/ The FAS database in staging is periodically synced from production so initially it would be the same password as you use in production.
Comment 10 Till Maas 2013-08-29 02:45:56 EDT
I was just able to retire a package in production, therefore the patch fixes this issue for me.
Comment 11 Pierre-YvesChibon 2013-09-05 02:19:46 EDT
Thanks for the patch Toshio, I'll make a bugfix release and push an update with this change.
Comment 12 Fedora Update System 2013-09-05 05:27:01 EDT
packagedb-cli-1.5.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/packagedb-cli-1.5.1-1.fc20
Comment 13 Fedora Update System 2013-09-05 05:27:21 EDT
packagedb-cli-1.5.1-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/packagedb-cli-1.5.1-1.fc19
Comment 14 Fedora Update System 2013-09-05 05:27:36 EDT
packagedb-cli-1.5.1-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/packagedb-cli-1.5.1-1.fc18
Comment 15 Fedora Update System 2013-09-05 13:54:02 EDT
Package packagedb-cli-1.5.1-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing packagedb-cli-1.5.1-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15872/packagedb-cli-1.5.1-1.fc20
then log in and leave karma (feedback).
Comment 16 Fedora Update System 2013-09-07 05:20:25 EDT
packagedb-cli-1.6.0-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.el5
Comment 17 Fedora Update System 2013-09-07 05:20:50 EDT
packagedb-cli-1.6.0-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.fc19
Comment 18 Fedora Update System 2013-09-07 05:21:12 EDT
packagedb-cli-1.6.0-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.fc18
Comment 19 Fedora Update System 2013-09-07 05:21:39 EDT
packagedb-cli-1.6.0-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.fc20
Comment 20 Fedora Update System 2013-09-07 05:22:01 EDT
packagedb-cli-1.6.0-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.el6
Comment 21 Fedora End Of Life 2013-09-16 13:11:57 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 22 Fedora Update System 2013-09-18 09:05:14 EDT
packagedb-cli-1.6.0-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2013-09-18 09:08:48 EDT
packagedb-cli-1.6.0-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Fedora Update System 2013-09-22 19:49:20 EDT
packagedb-cli-1.6.0-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 25 Fedora Update System 2013-11-27 16:20:01 EST
packagedb-cli-1.6.0-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 26 Fedora Update System 2013-11-27 16:23:47 EST
packagedb-cli-1.6.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.