Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 828909 - Unable to import GPG key to consumer from server
Summary: Unable to import GPG key to consumer from server
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Infrastructure
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On: 1022462
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-05 15:04 UTC by Martin Bacovsky
Modified: 2019-09-26 17:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:06:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
package install success (97.48 KB, image/png)
2013-10-23 09:15 UTC, Sachin Ghai
no flags Details
package installed on client (43.76 KB, image/png)
2014-06-19 12:38 UTC, Sachin Ghai
no flags Details

Description Martin Bacovsky 2012-06-05 15:04:45 UTC
Description of problem:
I tried to install signed package on a consumer system using UI. The install failed with 
  YumBaseError: Didn't install any keys
in the pulp.log

Once the associated GPG key is manually imported (e.g. using yum) to the consumer the install works fine.

Problem is the installpackages method from the Pulp server API does not support
the importKeys parameter (despite the callback __installpackages seems to implement that)

Version-Release number of selected component (if applicable):
pulp-1.1.10-1.el6.noarch
katello-0.2.39-1.el6.noarch


How reproducible:
Always (when the key is not imported on consumer)

Steps to Reproduce:
1. try to install signed package form repo with associated GPG key
 (from UI or CLI [kk system packages --name cons1 --install cow])

  
Actual results:
[root@katest ~]# kk system packages --name cons1 --install cow 
Performing remote action [ 6156e6dc-af1f-11e1-8aff-525400d85dff ]... 
Remote action failed:
Didn't install any keys


Expected results:
Imports missing GPG key and and install succeeds
(I assume it is safe from security perspective)


Additional info:
Change in Pulp API will be necessary before fixing our code

Comment 1 Bryan Kearney 2013-09-23 14:41:31 UTC
I believe this is in.

Comment 2 Sachin Ghai 2013-10-23 09:13:55 UTC
Verified with snap6 compose3

katello-1.4.6-44.el6sat.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-configure-1.4.7-7.el6sat.noarch
katello-glue-elasticsearch-1.4.6-44.el6sat.noarch
katello-foreman-all-1.4.6-44.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
ruby193-rubygem-foreman-katello-engine-0.0.17-6.el6sat.noarch
katello-common-1.4.6-44.el6sat.noarch
pulp-katello-plugins-0.2-1.el6sat.noarch
katello-configure-foreman-1.4.7-7.el6sat.noarch
katello-cli-1.4.3-26.el6sat.noarch
katello-certs-tools-1.4.4-1.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-selinux-1.4.4-4.el6sat.noarch
katello-glue-pulp-1.4.6-44.el6sat.noarch
katello-glue-candlepin-1.4.6-44.el6sat.noarch
katello-cli-common-1.4.3-26.el6sat.noarch
katello-all-1.4.6-44.el6sat.noarch
ruby193-rubygem-katello_api-0.0.3-4.el6sat.noarch
signo-katello-0.0.23-2.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.12-3.el6sat.noarch


I didn't face the reported issue. I installed a package on consumer via UI. And  it imports the gpg-key on client automatically. I did not import it manually on client

gpgcheck was enabled under redhat.repo and  I installed zsh package on client.

Please see the screenshot.

Comment 3 Sachin Ghai 2013-10-23 09:15:44 UTC
Created attachment 815295 [details]
package install success

Comment 4 Sachin Ghai 2013-10-23 10:42:33 UTC
From cli: 

on server:
=============
[root@cloud-qe-8 ~]# katello -u admin -p admin system packages --install zsh --name dhcp201-165.englab.pnq.redhat.com --env DEV --org "Katello Infrastructure"
Performing remote action [ 38f25ded-6434-43d9-bf95-5e9090dfee00 ]... 
Remote action finished:zsh-4.3.10-5.el6.x86_64
[root@cloud-qe-8 ~]# 

on client:
=========
[root@dhcp201-165 ~]# rpm -qa | grep zsh
[root@dhcp201-165 ~]# rpm -qa | grep zsh
zsh-4.3.10-5.el6.x86_64

Comment 5 Sachin Ghai 2013-10-23 10:44:34 UTC
For custom repos, gpgcheck always set to '0', not sure what is expected there. So filed a bz 1022462. Once that clarified, I'll verify this too.

Comment 6 Og Maciel 2013-10-24 23:09:05 UTC
Punting it to MDP3 since this is blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1022462

Comment 7 Sachin Ghai 2014-06-19 12:35:34 UTC
Verified with sat6 beta snap10. For custom repos, if you associate the key with repo while creation then it is set to '1' in redhat.repo on client, otherwise set to '0'

[root@shost yum.repos.d]# yum repolist
Loaded plugins: package_upload, product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
ACME_Corporation_fake_zoo                                                                                                      | 2.1 kB     00:00     
ACME_Corporation_fake_zoo/primary                                                                                              | 3.7 kB     00:00     
ACME_Corporation_fake_zoo                                                                                                                       32/32
repo id                                                                            repo name                                                    status
ACME_Corporation_fake_zoo                                                          zoo                                                          32
repolist: 32
[root@shost yum.repos.d]# cat redhat.repo 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# If this file is empty and this system is subscribed consider 
# a "yum repolist" to refresh available repos
#

[ACME_Corporation_fake_zoo]
name = zoo
baseurl = https://dhcp207-55.lab.eng.pnq.redhat.com/pulp/repos/ACME_Corporation/Library/custom/fake/zoo
enabled = 1
gpgcheck = 1
gpgkey = https://dhcp207-55.lab.eng.pnq.redhat.com/katello/api/repositories/11/gpg_key_content
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-local.pem
sslclientkey = /etc/pki/entitlement/752459387118277068-key.pem
sslclientcert = /etc/pki/entitlement/752459387118277068.pem

Comment 8 Sachin Ghai 2014-06-19 12:37:16 UTC
I installed package from UI and key was auto imported on client. I installed cow package on client.

logs from client:
==================

[root@shost ~]# rpm -qa | grep gpg-pubkey
gpg-pubkey-f78fb195-4f0d5ba1
[root@shost ~]# rpm -qa | grep cow
cow-2.2-3.noarch
[root@shost ~]# 


Please see screenshot for package install from server. It was successfully installed and key is imported on client too.

Comment 9 Sachin Ghai 2014-06-19 12:38:25 UTC
Created attachment 910372 [details]
package installed on client

Comment 10 Bryan Kearney 2014-07-02 14:06:58 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.


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