Bug 858083 - Principal is being incorrectly set
Principal is being incorrectly set
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
high Severity high
: ---
: Sprint 40
Assigned To: Jason Connor
Preethi Thomas
:
Depends On: 855384
Blocks: 855380
  Show dependency treegraph
 
Reported: 2012-09-17 18:52 EDT by Jeff Ortel
Modified: 2014-03-30 21:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 855384
Environment:
Last Closed: 2013-01-07 09:12:10 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 Jeff Ortel 2012-09-17 18:52:19 EDT
+++ This bug was initially created as a clone of Bug #855384 +++

When uploading a unit, the principal is used as the owner of the unit association. This is through the call:

import pulp.server.auth.principal as pulp_principal
pulp_principal.get_principal()['login']

This is always returning SYSTEM, regardless of the fact that I am logged in as admin.

This call is used in a number of places, so my concern is that we're always treating logged in users as SYSTEM.

--- Additional comment from skarmark@redhat.com on 2012-09-10 17:41:06 EDT ---

Basically the problem is that principal information is not propagated to the coordinator. Current principal should be passed to coordinator and manager should access a coordinator function call to access current principal information. 

Assigning to jconnor.

--- Additional comment from jconnor@redhat.com on 2012-09-13 12:48:55 EDT ---

Fixed and merged into master as of revision:

8588c8b04221d04eca4e08c6a7f6b0ab6beb97c3
Comment 1 Jason Connor 2012-09-18 02:38:09 EDT
Fix cherry picked into pulp-cr-2
Comment 2 Jeff Ortel 2012-09-21 14:13:01 EDT
build: 0.328
Comment 3 Preethi Thomas 2012-09-24 15:04:08 EDT
[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.328-1.fc17.noarch

[root@pulp-master ~]# pulp-admin repo units rpm --repo-id 855384 --details
Created:       2012-09-24T22:22:52Z
Id:            5060a4fcedfc065b8b0000f6
Metadata:      
  Arch:         noarch
  Buildhost:    localhost
  Checksum:     f5a0a21227f67089991649e3b3f6aeab9f16838cee3897938a0bbae2eb31f110
  Checksumtype: sha256
  Description:  Gofer provides an extensible, light weight, universal python
                agent. The gofer core agent is a python daemon (service) that
                provides infrastructure for exposing a remote API and for
                running Recurring Actions. The APIs contributed by plug-ins are
                accessible by Remote Method Invocation (RMI). The transport for
                RMI is AMQP using the QPID message broker. Actions are also
                provided by plug-ins and are executed at the specified interval.
  Epoch:        0
  Filename:     gofer-0.70-1.el6.noarch.rpm
  License:      LGPLv2
  Name:         gofer
  Provides:     [[u'gofer', u'EQ', [u'0', u'0.70', u'1.el6']],
                [u'config(gofer)', u'EQ', [u'0', u'0.70', u'1.el6']]]
  Relativepath: gofer-0.70-1.el6.noarch.rpm
  Release:      1.el6
  Requires:     [[u'python-iniparse', None, [None, None, None]],
                [u'python-gofer', u'EQ', [u'0', u'0.70', None]],
                [u'python(abi)', u'EQ', [u'0', u'2.6', None]], [u'/usr/bin/env',
                None, [None, None, None]], [u'/bin/sh', None, [None, None,
                None]], [u'/bin/sh', None, [None, None, None]], [u'/bin/bash',
                None, [None, None, None]]]
  Vendor:       
  Version:      0.70
Owner Id:      admin
Owner Type:    user
Repo Id:       855384
Unit Id:       7c90b835-bff5-4b64-97fa-a5500b76b086
Unit Type Id:  rpm
Updated:       2012-09-24T22:22:52Z


Created:       2012-09-24T22:22:52Z
Id:            5060a4fcedfc065b8b0000f8
Metadata:      
  Arch:         noarch
  Buildhost:    localhost
  Checksum:     b4786acd768a976911742f6a79f4bb4d26aa4b9614c394a5e05038e7e2b9525f
  Checksumtype: sha256
  Description:  Contains gofer python lib modules.
  Epoch:        0
  Filename:     python-gofer-0.70-1.el6.noarch.rpm
  License:      LGPLv2
  Name:         python-gofer
  Provides:     [[u'python-gofer', u'EQ', [u'0', u'0.70', u'1.el6']]]
  Relativepath: python-gofer-0.70-1.el6.noarch.rpm
  Release:      1.el6
  Requires:     [[u'python-simplejson', None, [None, None, None]],
                [u'python-qpid', u'GE', [u'0', u'0.7', None]], [u'python(abi)',
                u'EQ', [u'0', u'2.6', None]], [u'PyPAM', None, [None, None,
                None]]]
  Vendor:       
  Version:      0.70
Owner Id:      admin
Owner Type:    user
Repo Id:       855384
Unit Id:       7f6bc943-e147-43a8-b6e5-d85cd905e1f6
Unit Type Id:  rpm
Updated:       2012-09-24T22:22:52Z


Created:       2012-09-24T22:43:31Z
Id:            5060a9d3edfc065b8b000107
Metadata:      
  Arch:         noarch
  Buildhost:    x86-008.build.bos.redhat.com
  Checksum:     cf97f4c1ab2b98b39780d458cef81826de54d2227067a3f8365019baec7cdb87
  Checksumtype: sha256
  Description:  This is the client for the internal Red Hat ddns system.  It is
                capable of keeping multiple system names updated with a central
                DNS server
  Epoch:        0
  Filename:     redhat-ddns-client-1.3-4.noarch.rpm
  License:      GPL
  Name:         redhat-ddns-client
  Provides:     [[u'config(redhat-ddns-client)'], [u'redhat-ddns-client']]
  Relativepath: redhat-ddns-client-1.3-4.noarch.rpm
  Release:      4
  Requires:     [[u'/bin/bash'], [u'/bin/sh'], [u'/bin/sh'], [u'bash'],
                [u'config(redhat-ddns-client)'],
                [u'rpmlib(CompressedFileNames)'],
                [u'rpmlib(PayloadFilesHavePrefix)'], [u'wget']]
  Vendor:       Red Hat, Inc.
  Version:      1.3
Owner Id:      admin
Owner Type:    user
Repo Id:       855384
Unit Id:       c8148488-1b09-417b-8b0d-50980452056d
Unit Type Id:  rpm
Updated:       2012-09-24T22:43:31Z


[root@pulp-master ~]#
Comment 4 Preethi Thomas 2013-01-07 09:12:10 EST
Pulp 2.0 released.

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