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 1248990 - Specifying a non-existing id in ACL role permission produces an invalid CIB
Summary: Specifying a non-existing id in ACL role permission produces an invalid CIB
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.1
Hardware: x86_64
OS: Linux
low
unspecified
Target Milestone: rc
: ---
Assignee: Ivan Devat
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
: 1249071 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-31 09:39 UTC by Miroslav Lisik
Modified: 2016-11-03 20:55 UTC (History)
2 users (show)

Fixed In Version: pcs-0.9.151-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: pcs do not validate existence of id in cib when setting permission for it Consequence: pcs ends with an invalid cib report Fix: add validation of existence of id in cib Result: pcs exits gracefully with explanatory error message
Clone Of:
Environment:
Last Closed: 2016-11-03 20:55:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2596 0 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2016-11-03 12:11:34 UTC

Description Miroslav Lisik 2015-07-31 09:39:16 UTC
Description of problem:
If you try to create a acl role with permission defined by non-existent id, an invalid cib report is produced instead of a proper error message.


Version-Release number of selected component (if applicable):
pcs-0.9.137-13.el7_1.3.x86_64
pcs-0.9.142-2.el7.x86_64

How reproducible:
always

Steps to Reproduce:

1. Check the pcs's acls:
[root@virt-082 ~]# pcs acl
ACLs are disabled, run 'pcs acl enable' to enable


2. Try to create role using some non-existent id
[root@virt-082 ~]# pcs acl role create test-role read id non-existent-id


Actual results:
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
...

Expected results:
Error: unable to find id: non-existent-id

Comment 3 Tomas Jelinek 2015-11-13 12:31:39 UTC
Description of problem:
If you try to add an acl permission defined by non-existent id to a role, an invalid cib report is produced instead of a proper error message.

Version-Release number of selected component (if applicable):
pcs-0.9.137-13.el7_1.3.x86_64
pcs-0.9.142-2.el7.x86_64

How reproducible:
always


Steps to Reproduce:
1) Run command:
# pcs acl permission add test-role read id non-existent-id

> Id 'non-existend-id' must not be defined in cib xml.


Actual results:

Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
...
> Long cib report truncated


Expected results:

Error: unable to find id: non-existent-id

Comment 4 Tomas Jelinek 2015-11-13 12:32:04 UTC
*** Bug 1249071 has been marked as a duplicate of this bug. ***

Comment 5 Ivan Devat 2016-02-04 15:01:05 UTC
proposed fix:
https://github.com/feist/pcs/commit/e142a3f3d50545e1146e625d81fe04aa844a1546

Setup:
[vm-rhel72-1 ~pcs/pcs] $ pcs acl role create test-role

Test:
[vm-rhel72-1 ~pcs/pcs] $ pcs acl permission add test-role read id missing-id
Error: id "missing-id" does not exist.

Comment 6 Mike McCune 2016-03-28 22:42:18 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 7 Ivan Devat 2016-05-31 12:05:19 UTC
Before fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.143-15.el7.x86_64

[vm-rhel72-1 ~] $ pcs acl enable
[vm-rhel72-1 ~] $ pcs acl role create test-role read id non-existent-id
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
<cib...

After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.151-1.el7.x86_64

[vm-rhel72-1 ~] $ pcs acl role create test-role read id non-existent-id
Error: id 'non-existent-id' does not exist

Comment 11 errata-xmlrpc 2016-11-03 20:55:02 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://rhn.redhat.com/errata/RHSA-2016-2596.html


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