Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1102236

Summary: unable to turn on messaging authentication between pulp and consumer agent
Product: [Retired] Pulp Reporter: mkovacik
Component: z_otherAssignee: Jeff Ortel <jortel>
Status: CLOSED CURRENTRELEASE QA Contact: mkovacik
Severity: unspecified Docs Contact:
Priority: high    
Version: 2.4 BetaCC: jortel, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-09 06:54:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logging enhancement patch for gofer.messaging.auth
none
Verifying screen log none

Description mkovacik 2014-05-28 15:12:40 UTC
Description of problem:
no matter the /etc/pulp/server.conf:messaging.auth_enabled value, the authentication is not working.
Moreover, function gofer.messaging.auth.validate is always called with None as the authenticator.
As a result, no authentication is performed.


Version-Release number of selected component (if applicable):
pulp-server-2.4.0-0.18.beta.fc20.noarch
python-gofer-1.0.13-1.fc20.noarch


How reproducible:
Always

Steps to Reproduce:
1. change settings to: /etc/pulp/server.conf:messaging.auth_enabled = True
2. apply logging enhancement patch to /usr/lib/python2.7/site-packages/gofer/messaging/auth.py (see attachment) 
3. restart pulp services
4. perform some consumer agent tasks such as bind a repo
5. check the pulp logs for entries like: pulp[31414]: gofer.messaging.auth:INFO: USING authenticator: None (see Additional info)

Actual results:
No authentication is ever applied for amqp communication between pulp and consumer agent

Expected results:
Authentication is applied for amqp communication between pulp and consumer agent

Additional info:
# having applied the patch, this is a log from a 
[root@ec2-79-125-97-56 ~]# journalctl --since  14:56:48 --until 14:56:49 -p 7 SYSLOG_IDENTIFIER=pulp + SYSLOG_IDENTIFIER=goferd  -o cat

# ----%<----------------------------------

gofer.messaging.auth:INFO: USING authenticator: None
gofer.transport.qpid.consumer:DEBUG: read next: {'status': 'accepted', 'replyto': {'routing_key': 'pulp.task', 'exchange': 'pulp.agent.TestConsumer_consumer'}, 'window': {}, 'pam': None, 'secret': '5385f92dbcb62b7ab6ab74c2', 'version': '

# ----%<----------------------------------

Comment 1 mkovacik 2014-05-28 15:16:13 UTC
Created attachment 900044 [details]
logging enhancement patch for gofer.messaging.auth

this patch should be applied just to demonstrate the issue. It isn't a fix.

Comment 2 Jeff Ortel 2014-05-28 16:12:17 UTC
The message Authenticator just needs to be passed to the ReplyConsumer when the ReplyHandler is initialized.

Comment 3 Jeff Ortel 2014-05-29 14:51:35 UTC
https://github.com/pulp/pulp/pull/992

Comment 4 Randy Barlow 2014-05-29 18:07:28 UTC
This was fixed in pulp-2.4.0-0.19.beta.

Comment 5 mkovacik 2014-05-30 21:28:28 UTC
Created attachment 900988 [details]
Verifying screen log

Verified with pulp-automation test case: test_9_consumer [1]

In version:
pulp-server-2.4.0-0.19.beta.fc20.noarch

[1] https://github.com/RedHatQE/pulp-automation/blob/master/tests/test_9_consumer.py

Comment 6 Randy Barlow 2014-08-09 06:54:41 UTC
This has been fixed in Pulp 2.4.0-1.