Bug 865527 - Potentially unused fields in the Consumer model
Potentially unused fields in the Consumer model
Product: Pulp
Classification: Community
Component: consumers (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 41
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-10-11 12:56 EDT by Jay Dobies
Modified: 2015-03-22 21:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-01-09 12:09:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jay Dobies 2012-10-11 12:56:13 EDT
In consumer there are the following fields that I don't think belong there:

- unit_profile - these are stored in a separate collection called UnitProfile, there's no reason to reference them here

- certificate - we shouldn't be storing the certificate, it's a security issue; we stopped storing them a while ago, I suspect this field was simply left in from the v1 port
Comment 1 Jay Dobies 2012-10-11 12:57:58 EDT
Ignore the certificate part. That's used in the shared secret to the consumer. Just double check that we're not storing the key too.
Comment 2 Sayli Karmarkar 2012-10-21 19:12:54 EDT
Removed unit_profile reference. Also confirmed that cert_gen_manager.make_cert is returning both key and cert and we are storing only cert part in the db.
Comment 3 Sayli Karmarkar 2012-10-21 19:18:08 EDT
Confirmed no errors in db validation and merged. 

commit acfd78d6e9dcc41567c466aa511083a1cf541d9c
Merge: aeb23c2 38b83d1
Author: skarmark <skarmark@redhat.com>
Date:   Sun Oct 21 16:17:02 2012 -0700

    Merge pull request #110 from pulp/skarmark-865527
    865527 - removed unused unit_profile from consumer model
Comment 4 Jeff Ortel 2012-10-22 11:51:59 EDT
build: 0.333
Comment 5 Preethi Thomas 2012-10-23 14:51:19 EDT

[root@pulp-master ~]# curl -k -u admin:admin  "https://localhost/pulp/api/v2/consumers/pulp-master/" |json_reformat
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1040  100  1040    0     0   5175      0 --:--:-- --:--:-- --:--:--  5226
    "display_name": "pulp-master",
    "description": null,
    "certificate": "-----BEGIN CERTIFICATE-----\nMIICGjCCAQICAQIwDQYJKoZIhvcNAQEFBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0\nMB4XDTEyMTAyMzE4NDUyMVoXDTIyMTAyMTE4NDUyMVowFjEUMBIGA1UEAxMLcHVs\ncC1tYXN0ZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMR5lIjgP0tt6W40\nM8G8r6NYbJ0IqBLVjEVU/aUeDbyk+HdZoFy/A7h/0eehqwM9Enf3r3377qISKLFG\nOtqpKJJwYKyfu17SY+YgVhX8G0dIUPe/o8ctrxWEAsVn7ASWul+fhJtWBQ6+WOhm\nhz3/vI95FCVJyoQ3wIZYPQAmqayRAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAG4+\n3IwFrPaBuhKK2w2v64MnlY0AoYd4Yl4BUbzP1QHl2Fdp+8rC22z/e0pw1GjLoA/7\nvIi6Brp4Ora8uqoXhNoIvO6zoo1RrOaZznGUfwtzZE4AVejNjl0hQ/PcHRn2dx7A\ncaPrVsC61mE/B8iet1OXjWFSmTHwth4tZ69lyOFKnksSVeWxzf9Z2yTZHKC97Jpm\nGmspu2jg5MGOkJDbsJrvAMrIBrN98DORt1obzOaMnR/8bSfkunwSexaAiDIveahi\n232tubK8boIEqKsB7+1OC/qsktLbPjLmQEtOYhAsdoHAdWQIhasUKmCvZUn9By5K\niU1dCyuAiB7XBMjeq4E=\n-----END CERTIFICATE-----",
    "_ns": "consumers",
    "notes": {

    "capabilities": {

    "_id": {
        "$oid": "5086e5c1edfc0642b6001315"
    "id": "pulp-master",
    "_href": "/pulp/api/v2/consumers/pulp-master/"
[root@pulp-master ~]#
Comment 6 Preethi Thomas 2013-01-09 12:09:58 EST
Pulp v2.0 released

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