Bug 865527

Summary: Potentially unused fields in the Consumer model
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: consumersAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: MasterCC: cperry
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 41   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-09 17:09:58 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:

Description Jay Dobies 2012-10-11 16:56:13 UTC
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 16:57:58 UTC
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 23:12:54 UTC
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 23:18:08 UTC
Confirmed no errors in db validation and merged. 

commit acfd78d6e9dcc41567c466aa511083a1cf541d9c
Merge: aeb23c2 38b83d1
Author: skarmark <skarmark>
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 15:51:59 UTC
build: 0.333

Comment 5 Preethi Thomas 2012-10-23 18:51:19 UTC
verified

[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 17:09:58 UTC
Pulp v2.0 released