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 772852 - "Unresolved rules in --rules" error message is displayed even if the hbacrule is specified using the --rules option.
Summary: "Unresolved rules in --rules" error message is displayed even if the hbacrule...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-10 06:40 UTC by Gowrishankar Rajaiyan
Modified: 2013-05-23 17:29 UTC (History)
3 users (show)

Fixed In Version: ipa-2.2.0-1.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 13:29:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0819 0 normal SHIPPED_LIVE ipa bug fix and enhancement update 2012-06-19 20:34:17 UTC

Description Gowrishankar Rajaiyan 2012-01-10 06:40:01 UTC
Description of problem:
"Unresolved rules in --rules" error message is displayed if the hbacrule is not in the first 100 hbacrules list. 

Version-Release number of selected component (if applicable):
ipa-server-2.1.3-9.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create more than 100 hbac rules.
2. Create one hbacrule as:
# ipa hbacrule-show shanks-hbac
  Rule name: shanks-hbac
  Enabled: TRUE
  Users: shanks
  Hosts: ratchet.lab.eng.pnq.redhat.com
  Source Hosts: ratchet.lab.eng.pnq.redhat.com
  Services: sshd

3. "ipa hbacrule-find" displays only the first 100 rules it finds. Make sure your rule in Step2 is not displayed in this 100.

4. ipa hbactest --user=shanks --srchost=ratchet.lab.eng.pnq.redhat.com --host=ratchet.lab.eng.pnq.redhat.com --service=sshd --rules=shanks-hbac
  
Actual results:
---------------------------
Unresolved rules in --rules
---------------------------
  error: shanks-hbac


Expected results:
--------------------
Access granted: True
--------------------
  matched: shanks-hbac


Additional info:

Comment 2 Martin Kosek 2012-01-10 09:08:30 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2233

Comment 3 Martin Kosek 2012-01-10 09:38:03 UTC
I just noticed that the upstream ticket was already created (a link was not placed in the BZ):

https://fedorahosted.org/freeipa/ticket/2230

Comment 4 Jenny Severance 2012-01-10 12:56:43 UTC
Wouldn't this be because the default searchlimit is 100 ?

# ipa config-show
  Max. username length: 32
  Home directory base: /home
  Default shell: /bin/sh
  Default users group: ipausers
  Default e-mail domain for new users: testrelm
  Search time limit: 2
  Search size limit: 100   <================================================
  User search fields: uid,givenname,sn,telephonenumber,ou,title
  Group search fields: cn,description
  Enable migration mode: FALSE
  Certificate Subject base: O=TESTRELM
  Password Expiration Notification (days): 4

Comment 5 Gowrishankar Rajaiyan 2012-01-11 06:00:03 UTC
Sorry for the confusion. There are two cases here:

1. When you explicitly specify --rules option with the rule name. In this case the expected result is "access granted: true" which is irrespective of the search size limit set in config. Bugzilla is against this case and the relevant ticket https://fedorahosted.org/freeipa/ticket/2230. I have update the summary to reflect the actual issue.

2. When you do not specify --rules option, then the default search size limit comes in picture which is 100 by default. Modifying this to a desired value and then running hbactest works fine, however, this would mean modifying the default search limit hence I raised an RFE ticket ( https://fedorahosted.org/freeipa/ticket/2231 ) to add --sizelimit option.

# ipa config-mod --searchrecordslimit=500
  Max. username length: 32
  Home directory base: /home
  Default shell: /bin/sh
  Default users group: ipausers
  Default e-mail domain for new users: lab.eng.pnq.redhat.com
  Search time limit: 2
  Search size limit: 500
  User search fields: uid,givenname,sn,telephonenumber,ou,title
  Group search fields: cn,description
  Enable migration mode: FALSE
  Certificate Subject base: O=LAB.ENG.PNQ.REDHAT.COM
  Password Expiration Notification (days): 4

[root@jetfire ~]# ipa  hbactest --user=shanks --srchost=ratchet.lab.eng.pnq.redhat.com --host=ratchet.lab.eng.pnq.redhat.com --service=sshd 
--------------------
Access granted: True
--------------------
  matched: zrule
  notmatched: rule1
  notmatched: rule10
  notmatched: rule100

Comment 6 Martin Kosek 2012-01-16 09:31:25 UTC
Pushed to ipa-2-2: 7eaf1dc594294688daeba31a87781d299e45f038
Pushed to master: 1e04e9f02978592d861895bd14e8b3a2ee2c7100

Comment 9 Martin Kosek 2012-04-20 09:02:48 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 10 Jenny Severance 2012-05-11 17:53:16 UTC
verified ::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hbacsvc-772852: "Unresolved rules in --rules" error message is displayed even if the hbacrule is specified using the --rules option.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: kinit as admin with password Secret123 was successful.
:: [   PASS   ] :: Kinit as admin user
:: [   PASS   ] :: Running 'ipa config-show'
:: [   PASS   ] :: Running 'ipa config-mod --searchrecordslimit=5'
:: [   PASS   ] :: Running 'ipa config-show'
:: [   PASS   ] :: Running 'ipa hbacrule-disable allow_all'
:: [   PASS   ] :: Running 'ipa hbacrule-add 772852'
:: [   PASS   ] :: Running 'ipa hbacrule-find'
:: [   PASS   ] :: Running 'ipa hbacrule-add-user 772852 --users=user772852'
:: [   PASS   ] :: Running 'ipa hbacrule-add-host 772852 --hosts=intel-s3ea2-03.testrelm.com'
:: [   PASS   ] :: Running 'ipa hbacrule-add-sourcehost 772852 --hosts=ibm-x3650-04.testrelm.com'
:: [   PASS   ] :: Running 'ipa hbacrule-add-service 772852  --hbacsvcs=sshd'
:: [   PASS   ] :: Running 'ipa hbacrule-show 772852 --all'
:: [   PASS   ] :: Running 'ipa hbactest --user=user772852 --srchost=ibm-x3650-04.testrelm.com --host=intel-s3ea2-03.testrelm.com --service=sshd --rules=772852 | grep -Ex '(Access granted: True|  matched: 772852)''
:: [   LOG    ] :: Verifies bug https://bugzilla.redhat.com/show_bug.cgi?id=772852
:: [   PASS   ] :: Running 'ipa hbactest --user=user772852 --srchost=ibm-x3650-04.testrelm.com --host=intel-s3ea2-03.testrelm.com --service=sshd --rules=772852 | grep "Unresolved rules"'
:: [   PASS   ] :: Running 'ipa config-mod --searchrecordslimit=100'
:: [   PASS   ] :: Running 'ipa config-show'
:: [   LOG    ] :: Duration: 50s
:: [   LOG    ] :: Assertions: 16 good, 0 bad
:: [   PASS   ] :: RESULT: ipa-hbacsvc-772852: "Unresolved rules in --rules" error message is displayed even if the hbacrule is specified using the --rules option.


version ::
ipa-server.i686 0:2.2.0-13.el6

Comment 12 errata-xmlrpc 2012-06-20 13:29:00 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.

http://rhn.redhat.com/errata/RHBA-2012-0819.html


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