Bug 1105662 - gofer logs "secret"
Summary: gofer logs "secret"
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: 2.4 Beta
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-06 16:23 UTC by Michael Hrivnak
Modified: 2015-02-28 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:10:00 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 448 0 None None None Never

Description Michael Hrivnak 2014-06-06 16:23:29 UTC
This is based on data reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1104788

Version-Release number of selected component (if applicable):
pulp-server-2.4.0-0.19.beta.fc20.noarch


How reproducible:
always
pulp-automation, test case: tests.test_9_consumer_auth

Steps to Reproduce:
1. ensure authentication=True
2. create rpm repo
3. register consumer with rsa primary's pub key
4. launch consumer agent with another rsa
5. bind consumer agent to the repo distributor


Actual results:
"secret" is logged by gofer

Expected results:
"secret" should not be logged by gofer


Additional info:
# journalctl log entry
gofer.transport.consumer:DEBUG: security.authentication, reason: None {"any": {"action": "bind", "consumer_id": "ConsumerAuthTest_consumer", "distributor_id": "zoo_distributor", "repo_id": "zoo", "task_id": "bb9c9824-33f7-4551-9a2a-d7e3d81ab4f6"}, "pam": null, "replyto": {"exchange": "pulp.agent.ConsumerAuthTest_consumer", "routing_key": "pulp.task"}, "routing": ["", "b0762bb4-a202-4358-984e-ab782fdef865"], "secret": "538f4df6bcb62b512ab4101a", "sn": "18dc9358-86c6-46d0-a8f8-1f70025aac0d", "status": "progress", "version": "0.5", "window": {}}

Comment 1 Jeff Ortel 2014-06-09 21:30:34 UTC
Pulp passes the consumer DB object ID as the secret and is not used for authentication.  Rather, it is used so that when a consumer is registered using the name of a previously unregistered consumer, the agent will not honor requests queued for the previous consumer.  It leverages the gofer shared secret authentication mechanism as a matter of convenience only.  So, logging the secret in this case represents no vulnerability to Pulp.

Long term gofer should mask out this filed when logging messages.  Especially because 1.0+ logs to syslog which means that messages logged at DEBUG can now be viewed by non-root users.

To avoid confusion, Pulp /could/ pass the consumer DB object ID as part of the user defined data that is round-tripped on each request.  The agent code could then explicitly add code to check the pass ID against the ID found in the consumer certificate and reject the request as needed.  The downside is that we'd be writing code to avoid semantic confusion instead of using an existing mechanism.  I think this would be a waste of time.

Pulp could also use the unique DB object ID when constructing the queue name (or gofer agent UUID).  Like: pulp.agent.<_id>.  This way, each registration would use a different queue and ignoring old requests would no longer be an issue.  The pulp consumer certificate has this ID and it would be a straight forward change (though, would require another queue migration).  A big problem with this approach is that candlepin certificates would not have this DB object ID so this would require additional changes to support this for SAT6.  The need for agent queue reaping would be greater as this would potentially increase the rate at which we leak agent queues.

Comment 2 Jeff Ortel 2014-06-09 21:31:15 UTC
This should be cloned to the "gofer" product.

Comment 3 Brian Bouterse 2015-02-28 22:10:00 UTC
Moved to https://pulp.plan.io/issues/448


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