Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1418119

Summary: [RFE] Implement Org / Environment level content access
Product: Red Hat Enterprise Linux 7 Reporter: Chris Snyder <csnyder>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: bkearney, redakkan, skallesh
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:20:42 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 Chris Snyder 2017-01-31 23:11:15 UTC
This RFE bug is intended to be a tracker for the implementation of the following design (in both subscription-manager and python-rhsm):

https://docs.google.com/document/d/1fL_BECstpgpH3HGRIiOG6J9hQK6NzeUmmRXDLe2rAwA/edit#heading=h.g5l7o97lgmz7

Comment 1 Chris Snyder 2017-01-31 23:14:41 UTC
Moving this to modified as the attached PRs implementing this feature have been merged upstream. Consequently, this should be pulled in to the first build for rhel 7.4.

Comment 3 Shwetha Kallesh 2017-06-22 08:24:21 UTC
System has access to golden ticket when registered to owner that has contentAccessMode set to org_environment and revoked when contentAccessMode is null


[root@dhcp71-155 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.1.1-1
subscription management rules: 5.23
subscription-manager: 1.19.20-1.el7
python-rhsm: 1.19.9-1.el7


[root@dhcp71-155 ~]# curl --stderr /dev/null --insecure --user admin:admin --request PUT --data '{"contentAccessMode":"org_environment"}' --header 'accept: application/json' --header 'content-type: application/json' https://F21-candlepin.usersys.redhat.com:8443/candlepin/owners/snowwhite
{
  "parentOwner" : null,
  "id" : "8ac6a3625ccedd85015cceddcf0d0003",
  "key" : "snowwhite",
  "displayName" : "Snow White",
  "contentPrefix" : null,
  "defaultServiceLevel" : null,
  "upstreamConsumer" : null,
  "logLevel" : null,
  "autobindDisabled" : null,
  "contentAccessMode" : "org_environment",
  "contentAccessModeList" : "org_environment",
  "href" : "/owners/snowwhite",
  "created" : "2017-06-22T08:14:21+0000",
  "updated" : "2017-06-22T08:17:44+0000"
}

[root@dhcp71-155 ~]# subscription-manager register --serverurl F21-candlepin.usersys.redhat.com:8443/candlepin
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Organization: snowwhite
The system has been registered with ID: 3810ffb4-ed45-435f-850d-e834f2db87ac 
[root@dhcp71-155 ~]# subscription-manager list --consumed
No consumed subscription pools to list
[root@dhcp71-155 ~]# ls /etc/pki/entitlement/
5910486032266321287-key.pem  5910486032266321287.pem
[root@dhcp71-155 ~]# rct cc /etc/pki/entitlement/5910486032266321287.pem --no-content

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: /etc/pki/entitlement/5910486032266321287.pem
	Version: 3.3
	Serial: 5910486032266321287
	Start Date: 2017-06-22 07:18:37+00:00
	End Date: 2018-06-22 07:18:37+00:00
	Pool ID: Not Available

Subject:
	CN: 3810ffb4-ed45-435f-850d-e834f2db87ac
	O: snowwhite

Issuer:
	C: US
	CN: F21-candlepin.usersys.redhat.com
	L: Raleigh

Product:
	ID: content_access
	Name:  Content Access
	Version: 
	Arch: 
	Tags: 
	Brand Type: 
	Brand Name: 

Order:
	Name: Content Access
	Number: 
	SKU: content_access
	Contract: 
	Account: 
	Service Level: 
	Service Type: 
	Quantity: 
	Quantity Used: 1
	Socket Limit: 
	RAM Limit: 
	Core Limit: 
	Virt Only: False
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

[root@dhcp71-155 ~]# curl --stderr /dev/null --insecure --user admin:admin --request PUT --data '{"contentAccessMode":""}' --header 'accept: application/json' --header 'content-type: application/json' https://F21-candlepin.usersys.redhat.com:8443/candlepin/owners/snowwhite
{
  "parentOwner" : null,
  "id" : "8ac6a3625ccedd85015cceddcf0d0003",
  "key" : "snowwhite",
  "displayName" : "Snow White",
  "contentPrefix" : null,
  "defaultServiceLevel" : null,
  "upstreamConsumer" : null,
  "logLevel" : null,
  "autobindDisabled" : null,
  "contentAccessMode" : null,
  "contentAccessModeList" : "org_environment",
  "href" : "/owners/snowwhite",
  "created" : "2017-06-22T08:14:21+0000",
  "updated" : "2017-06-22T08:22:37+0000"
}[root@dhcp71-155 ~]# subscription-manager refresh
1 local certificate has been deleted.
All local data refreshed
[root@dhcp71-155 ~]# ls /etc/pki/entitlement/
[root@dhcp71-155 ~]# rct cc /etc/pki/entitlement/5910486032266321287.pem --no-content
The specified certificate file does not exist.

Comment 4 errata-xmlrpc 2017-08-01 19:20:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2083