Bug 1063787 - Custom info can be added to a system without provisioning entitlement via API and rhn-custom-info tool
Summary: Custom info can be added to a system without provisioning entitlement via API...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks: sat580-low
TreeView+ depends on / blocked
 
Reported: 2014-02-11 12:35 UTC by Lukáš Hellebrandt
Modified: 2018-05-18 14:46 UTC (History)
3 users (show)

Fixed In Version: spacewalk-java-2.5.14-21-sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-18 14:43:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch (2.34 KB, patch)
2014-02-19 16:26 UTC, Dimitar Yordanov
no flags Details | Diff
Updated patch to adjust to code changes (3.95 KB, patch)
2016-02-09 19:30 UTC, Grant Gainey
no flags Details | Diff

Description Lukáš Hellebrandt 2014-02-11 12:35:19 UTC
Description of problem:
Custom info can be added to a system without provisioning entitlement via API and rhn-custom-info tool. It can be read via both API and tool and after adding provisioning entitlement, the value is visible via webUI.

How reproducible:

Always. Have a system registered to the satellite and an existing custom info key.

1. Remove the provisioning entitlement from the system
2. Add the custom value to the system via API or a rhn-custom-info tool

client.system.setCustomValues(session, sysID, {keyLabel: keyValue})
OR
rhn-custom-info -u <user> -p <password> -s http://<hostname>/rpc/api keyLabel keyValue

3. Add the provisioning entitlement to the system

Actual results:
The custom value is set

Expected results:
This shouldn't be possible without the provisioning entitlement

Additional info:
Test RHN-Tools/rhn-custom-info (currently workaround)

Comment 1 Dimitar Yordanov 2014-02-19 16:26:11 UTC
Created attachment 865154 [details]
patch

This patch fixes both issues described.

Comment 2 Grant Gainey 2016-02-09 19:30:09 UTC
Created attachment 1122504 [details]
Updated patch to adjust to code changes

Approach is sound, updated to reflect code changes and to add new reason-for-exception to docs

(NOTE: no matching spacewalk change, as spacewalk-master no longer has provisioning entitlements)

Comment 4 Lukáš Hellebrandt 2016-11-11 09:37:44 UTC
Verified with Satellite 5.8 compose and SW nightly from 2016-11-10 (in SW, you can not remove provisioning entitlement so I just checked custom info works).

Note: After setting custom info, removing Provisioning entitlement and returning it back, the custom info persists. I think that is ok.

Comment 5 Grant Gainey 2018-05-18 14:43:05 UTC
This fix was released as part of 5.8GA - closing


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