Bug 865527 - Potentially unused fields in the Consumer model
Summary: Potentially unused fields in the Consumer model
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: consumers
Version: Master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 41
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-11 16:56 UTC by Jay Dobies
Modified: 2015-03-23 01:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:09:58 UTC
Embargoed:


Attachments (Terms of Use)

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


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