Bug 1103943 - Product update/create calls not checking for gpg keys correctly
Summary: Product update/create calls not checking for gpg keys correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Kedar Bidarkar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-03 00:32 UTC by Partha Aji
Modified: 2019-09-26 14:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:19:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6027 0 None None None 2016-04-22 15:50:36 UTC

Description Partha Aji 2014-06-03 00:32:58 UTC
It is possible via hammer to associate gpg key belonging to a different org to product. This needs to be fixed.

Comment 1 Partha Aji 2014-06-03 00:32:59 UTC
Created from redmine issue http://projects.theforeman.org/issues/6027

Comment 2 Partha Aji 2014-06-03 00:33:04 UTC
Upstream bug assigned to paji

Comment 5 Kedar Bidarkar 2014-08-13 12:49:59 UTC
This is fixed now in Sat6-GA-snap4

We can no longer attach gpg-key of one org to a product which exists in another org.

[root@xxxx ~]# hammer -u admin -p changeme product update --organization Default_Organization --id 95 --gpg-key rhel65_x86_64
Could not update the product:
  Error: gpg_key not found
[root@xxxx ~]# hammer -u admin -p changeme product update --organization Default_Organization --id 95 --gpg-key-id 2
Could not update the product:
  Couldn't find gpg key '2'
[root@xxxxx ~]# hammer -u admin -p changeme gpg list --organization Default_Organization
No data.
[root@xxxxx ~]# hammer -u admin -p changeme gpg list --organization Default_Organization
---|------------------
ID | NAME             
---|------------------
3  | rhel65_x86_64_new
---|------------------
[root@xxxx ~]# hammer -u admin -p changeme product update --organization Default_Organization --id 95 --gpg-key-id 3
Product updated
[root@xxxx ~]# hammer -u admin -p changeme gpg list --organization ACME_Corp
---|--------------
ID | NAME         
---|--------------
2  | rhel65_x86_64
---|--------------



Installed Packages

    candlepin-0.9.19-1.el6_5.noarch
    candlepin-scl-1-5.el6_4.noarch
    candlepin-scl-quartz-2.1.5-5.el6_4.noarch
    candlepin-scl-rhino-1.7R3-1.el6_4.noarch
    candlepin-scl-runtime-1-5.el6_4.noarch
    candlepin-selinux-0.9.19-1.el6_5.noarch
    candlepin-tomcat6-0.9.19-1.el6_5.noarch
    createrepo-0.9.9-21.2.pulp.el6sat.noarch
    elasticsearch-0.90.10-4.el6sat.noarch
    katello-1.5.0-28.el6sat.noarch
    katello-ca-1.0-1.noarch
    katello-certs-tools-1.5.6-1.el6sat.noarch
    katello-installer-0.0.57-1.el6sat.noarch
    m2crypto-0.21.1.pulp-10.el6sat.x86_64
    mod_wsgi-3.4-1.pulp.el6sat.x86_64
    pulp-katello-0.3-3.el6sat.noarch
    pulp-nodes-common-2.4.0-0.30.beta.el6sat.noarch
    pulp-nodes-parent-2.4.0-0.30.beta.el6sat.noarch
    pulp-puppet-plugins-2.4.0-0.30.beta.el6sat.noarch
    pulp-puppet-tools-2.4.0-0.30.beta.el6sat.noarch
    pulp-rpm-plugins-2.4.0-0.30.beta.el6sat.noarch
    pulp-selinux-2.4.0-0.30.beta.el6sat.noarch
    pulp-server-2.4.0-0.30.beta.el6sat.noarch
    python-gofer-qpid-1.3.0-1.el6sat.noarch
    python-isodate-0.5.0-1.pulp.el6sat.noarch
    python-kombu-3.0.15-12.pulp.el6sat.noarch
    python-pulp-bindings-2.4.0-0.30.beta.el6sat.noarch
    python-pulp-common-2.4.0-0.30.beta.el6sat.noarch
    python-pulp-puppet-common-2.4.0-0.30.beta.el6sat.noarch
    python-pulp-rpm-common-2.4.0-0.30.beta.el6sat.noarch
    python-qpid-0.22-14.el6sat.noarch
    python-qpid-qmf-0.22-33.el6.x86_64
    qpid-cpp-client-0.22-42.el6.x86_64
    qpid-cpp-server-0.22-42.el6.x86_64
    qpid-cpp-server-linearstore-0.22-42.el6.x86_64
    qpid-java-client-0.22-6.el6.noarch
    qpid-java-common-0.22-6.el6.noarch
    qpid-proton-c-0.7-1.el6.x86_64
    qpid-qmf-0.22-33.el6.x86_64
    qpid-tools-0.22-12.el6.noarch
    ruby193-rubygem-katello-1.5.0-78.el6sat.noarch
    rubygem-hammer_cli_katello-0.0.4-10.el6sat.noarch

Comment 6 Kedar Bidarkar 2014-08-13 12:55:52 UTC
For product create calls : Even this too works fine as seen below.

[root@xxxx ~]# hammer -u admin -p changeme gpg list --organization Default_Organization
---|------------------
ID | NAME             
---|------------------
3  | rhel65_x86_64_new
---|------------------

[root@xxxx ~]# hammer -u admin -p changeme gpg list --organization ACME_Corp
---|--------------
ID | NAME         
---|--------------
2  | rhel65_x86_64
---|--------------


[root@xxx ~]# hammer -u admin -p changeme product create --organization Default_Organization --gpg-key-id 2 --name sat6123 
Could not create the product:
  Couldn't find gpg key '2'
[root@xxxx ~]# hammer -u admin -p changeme product create --organization Default_Organization --gpg-key-id 3 --name sat6123 
Product created

Comment 7 Bryan Kearney 2014-09-11 12:19:35 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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