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 782927 - [RFE] Add --sizelimit option to hbactest.
Summary: [RFE] Add --sizelimit option to hbactest.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.3
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-18 21:18 UTC by Dmitri Pal
Modified: 2013-05-23 17:28 UTC (History)
3 users (show)

Fixed In Version: ipa-2.2.0-1.el6
Doc Type: Enhancement
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 13:29:47 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 Dmitri Pal 2012-01-18 21:18:07 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2231


Simulating a user access status on an IPA server with more than 100 hbacrules (where the allow rule does not fall in the first 100) the result is displayed as "Access granted: False". 

We should provide a "--sizelimit" option like we have to "ipa hbacrule-find" which would fetch all the rules specified in the --sizelimit and display the correct status.

Comment 1 Martin Kosek 2012-01-19 09:45:36 UTC
Fixed upstream:

Pushed to ipa-2-2: 7eaf1dc594294688daeba31a87781d299e45f038
Pushed to master: 1e04e9f02978592d861895bd14e8b3a2ee2c7100

Comment 4 Martin Kosek 2012-04-20 11:02:43 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 5 Gowrishankar Rajaiyan 2012-05-30 07:31:48 UTC
1. for i in {1000..1010}; do ipa hbacrule-add $i; done
2. ipa config-mod --searchrecordslimit=5
3. ipa hbacrule-disable allow_all
4. ipa hbacrule-add 782927
5. [root@primenova ~]# ipa hbacrule-show 782927 --all
  dn: ipauniqueid=ff7775d4-aa15-11e1-9fdd-52540063d50e,cn=hbac,dc=lab,dc=eng,dc=pnq,dc=redhat,dc=com
  Rule name: 782927
  Enabled: TRUE
  Users: shanks
  Hosts: primenova.lab.eng.pnq.redhat.com
  Source Hosts: rodimus.lab.eng.pnq.redhat.com
  Services: sshd
  accessruletype: allow
  ipauniqueid: ff7775d4-aa15-11e1-9fdd-52540063d50e
  objectclass: ipaassociation, ipahbacrule
[root@primenova ~]#


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
[root@primenova ~]# ipa hbactest --user=shanks --srchost=rodimus.lab.eng.pnq.redhat.com --host=primenova.lab.eng.pnq.redhat.com --service=sshd 
---------------------
Access granted: False
---------------------
  Warning: Sourcehost value of rule "1000" is ignored
  Warning: Sourcehost value of rule "1001" is ignored
  Warning: Sourcehost value of rule "1002" is ignored
  Warning: Sourcehost value of rule "1003" is ignored
  Not matched rules: 1000
  Not matched rules: 1001
  Not matched rules: 1002
  Not matched rules: 1003
[root@primenova ~]# 
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
[root@primenova ~]# ipa hbactest --user=shanks --srchost=rodimus.lab.eng.pnq.redhat.com --host=primenova.lab.eng.pnq.redhat.com --service=sshd  --sizelimit=15
--------------------
Access granted: True
--------------------
  Warning: Sourcehost value of rule "1000" is ignored
  Warning: Sourcehost value of rule "1001" is ignored
  Warning: Sourcehost value of rule "1002" is ignored
  Warning: Sourcehost value of rule "1003" is ignored
  Warning: Sourcehost value of rule "1004" is ignored
  Warning: Sourcehost value of rule "1005" is ignored
  Warning: Sourcehost value of rule "1006" is ignored
  Warning: Sourcehost value of rule "1007" is ignored
  Warning: Sourcehost value of rule "1008" is ignored
  Warning: Sourcehost value of rule "1009" is ignored
  Warning: Sourcehost value of rule "1010" is ignored
  Warning: Sourcehost value of rule "782927" is ignored
  Matched rules: 782927
  Not matched rules: 1000
  Not matched rules: 1001
  Not matched rules: 1002
  Not matched rules: 1003
  Not matched rules: 1004
  Not matched rules: 1005
  Not matched rules: 1006
  Not matched rules: 1007
  Not matched rules: 1008
  Not matched rules: 1009
  Not matched rules: 1010
[root@primenova ~]# 
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
[root@primenova ~]# ipa hbactest --user=shanks --srchost=rodimus.lab.eng.pnq.redhat.com --host=primenova.lab.eng.pnq.redhat.com --service=sshd  --rule=782927
--------------------
Access granted: True
--------------------
  Warning: Sourcehost value of rule "782927" is ignored
  Matched rules: 782927
[root@primenova ~]# 
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#


Verified: ipa-server-2.2.0-16.el6.x86_64

Comment 6 Jenny Severance 2012-05-30 15:00:47 UTC
automated 

{{{

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hbacsvc-782927: Test --sizelimit option to hbactest
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: kinit as admin with password Secret123 was successful.
:: [   PASS   ] :: Kinit as admin user
:: [   PASS   ] :: Running 'ipa config-mod --searchrecordslimit=5'
:: [   PASS   ] :: Running 'ipa config-show'
:: [   LOG    ] :: ################## No Limit :: use global setting ##############
:: [   PASS   ] :: 5 hbac rules returned as expected with global size limit of 5
:: [   LOG    ] :: #################  Set size limit to 7 #########################
:: [   PASS   ] :: 7 hbac rules returned as expected with size limit of 7
:: [   PASS   ] :: Running 'ipa config-mod --searchrecordslimit=100'
:: [   PASS   ] :: Running 'ipa config-show'
:: [   LOG    ] :: Duration: 1m 0s
:: [   LOG    ] :: Assertions: 7 good, 0 bad
:: [   PASS   ] :: RESULT: ipa-hbacsvc-782927: Test --sizelimit option to hbactest


}}}

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