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 1820045 - [ansible-freeipa] Not able to remove usercat='all'/hostcat='all'/servicecat='all' from hbacrule in HBAC module
Summary: [ansible-freeipa] Not able to remove usercat='all'/hostcat='all'/servicecat='...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ansible-freeipa
Version: 8.2
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Rafael Jeffman
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-02 07:09 UTC by Varun Mylaraiah
Modified: 2020-11-04 02:46 UTC (History)
3 users (show)

Fixed In Version: ansible-freeipa-0.1.11-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:46:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4663 0 None None None 2020-11-04 02:46:46 UTC

Description Varun Mylaraiah 2020-04-02 07:09:09 UTC
Description of problem:
There is option to remove usercat='all'/hostcat='all'/servicecat='all' from hbacrule in HBAC module

Version-Release number of selected component (if applicable):
ansible-freeipa-0.1.8-3.el8.noarch

Steps to Reproduce:
CLI-consule_output
==================
[root@master ~]# ipa hbacrule-mod testrule --usercat="all" --hostcat="all" --servicecat="all"
-----------------------------
Modified HBAC rule "testrule"
-----------------------------
  Rule name: testrule
  User category: all
  Host category: all
  Service category: all
  Enabled: TRUE
[root@master ~]#
[root@master ~]# ipa hbacrule-mod testrule --usercat="" --hostcat="" --servicecat=""
-----------------------------
Modified HBAC rule "testrule"
-----------------------------
  Rule name: testrule
  Enabled: TRUE
[root@master ~]#


Actual results:
no option available in ansible-freeipa HBAC module.

Expected results:
the option should available to reset/remove usercat='all', hostcat='all', servicecat='all'

Comment 1 Rafael Jeffman 2020-04-08 11:49:38 UTC
Pull request is under review in upstream: https://github.com/freeipa/ansible-freeipa/pull/245

Comment 2 Rafael Jeffman 2020-05-13 13:37:12 UTC
PR merged upstream.

Comment 5 anuja 2020-07-27 12:31:17 UTC
Verified using: 
Using version: 
ansible-freeipa-0.1.12-5.el8.noarch
ipa-server-common-4.8.7-7.module+el8.3.0+7376+c83e4fcd.noarch

2020-07-27T12:25:05+0000 ansible_freeipa_tests/hbac_module.py::Testresethbacruleall::test_hbacrule_reset_categories 
2020-07-27T12:25:05+0000 -------------------------------- live log call ---------------------------------
2020-07-27T12:25:05+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipactl', 'status']
2020-07-27T12:25:07+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-07-27T12:25:07+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'hbacrule-add', 'reset_hbac_rule', '--usercat=all', '--hostcat=all', '--servicecat=all']
2020-07-27T12:25:08+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-07-27T12:25:08+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'hbacrule-show', 'reset_hbac_rule']
2020-07-27T12:25:09+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-07-27T12:25:09+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/hbac.hosts
2020-07-27T12:25:09+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT hbac_module.yml
2020-07-27T12:25:09+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/hbac.hosts', 'hbac_module.yml']
2020-07-27T12:25:14+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-07-27T12:25:14+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'hbacrule-show', 'reset_hbac_rule']
2020-07-27T12:25:15+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-07-27T12:25:15+0000 PASSED                                                                   [100%]
2020-07-27T12:25:15+0000 
2020-07-27T12:25:15+0000 ----------- generated xml file: /home/jenkins/tews/trigger/junit.xml -----------
2020-07-27T12:25:15+0000 ------ generated html file: file:///home/jenkins/tews/trigger/report.html ------
2020-07-27T12:25:15+0000 ========================= 36 passed in 692.52 seconds ==========================
2020-07-27T12:25:16+0000 RETURN CODE: 0
2020-07-27T12:25:16+0000 UPSTREAM TESTS STEP END: ansible_freeipa_tests/hbac_module.py

Based on this marking bz as verified.

Comment 9 errata-xmlrpc 2020-11-04 02:46:35 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 (ansible-freeipa bug fix and enhancement update), 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/RHEA-2020:4663


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