Bug 842854 - not able to login using the user created with the cli
not able to login using the user created with the cli
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 38
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 14:10 EDT by Preethi Thomas
Modified: 2015-03-22 21:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:07:21 EST
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)

  None (edit)
Description Preethi Thomas 2012-07-24 14:10:45 EDT
Description of problem:
Authentication failure when trying to login using the user created with the cli

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


How reproducible:


Steps to Reproduce:
1.create a user with pulp cli
2. logout from the admin
3. try to login using the newly created user
  
Actual results:

[root@pulp-f16 ~]# pulp-admin login -u test -p redhat
Authentication failed.

Use the login command to authenticate with the server and download a session
certificate for use in future calls to this script. If credentials were
specified, please double check the username and password and attempt the request
again.


Expected results:


Additional info:

admin.log
2012-07-24 14:04:02,089 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 470, in run
    Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 792, in run
    exit_code = command_or_section.execute(remaining_args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 168, in execute
    self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/pulp/admin/extensions/pulp_admin_auth/pulp_cli.py", line 48, in login
    certificate = self.context.server.actions.login(username, password).response_body
  File "/usr/lib/python2.7/site-packages/pulp/bindings/actions.py", line 32, in login
    return self.server.POST(path)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 87, in POST
    return self._request('POST', path, body=body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 111, in _request
    self._handle_exceptions(response_code, response_body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 129, in _handle_exceptions
    raise code_class_mappings[response_code](response_body)
PermissionsException: Permission Denied
Comment 1 Sayli Karmarkar 2012-07-24 19:34:28 EDT
commit 88d44b506c60c9455305936ec260bcb98501cf14
Author: Sayli Karmarkar <skarmark@redhat.com>
Date:   Tue Jul 24 13:40:04 2012 -0700

    842854 - updated automatic user permissions to v2 resources and added v2/actions/ so that user can login and update successfully
Comment 2 Jeff Ortel 2012-07-24 21:22:45 EDT
build: 0.318.
Comment 3 Preethi Thomas 2012-07-25 09:34:22 EDT
verified
[root@preethi-el6-pulp ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.318-1.el6.noarch

user is able to login with a non admin userid. Although please note that no other cli commands work with non admin user. You will get Authentication Failed error and permission error in admin.log

[root@preethi-el6-pulp ~]# pulp-admin login -u preethi  -p redhat
Successfully logged in. Session certificate will expire at Aug  1 13:25:26 2012
GMT.
Comment 4 Sayli Karmarkar 2012-07-26 17:38:49 EDT
Preethi, The only thing this user will be able to do is update itself. That and logout are the only default permissions given to a user. To get other permissions, user either needs to be added to a particular role or explicitly given permissions (through api as there is no cli support for that yet).
Comment 5 Preethi Thomas 2013-01-09 12:07:21 EST
Pulp v2.0 released

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