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 2224572 - Improved error messages are needed when attempting to add a non-existing idp to a user
Summary: Improved error messages are needed when attempting to add a non-existing idp ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: Ganna Kaihorodova
URL:
Whiteboard:
Depends On: 2224570
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-21 13:58 UTC by Varun Mylaraiah
Modified: 2023-11-14 16:50 UTC (History)
8 users (show)

Fixed In Version: ipa-4.9.12-6.module+el8.9.0+19634+c162f948
Doc Type: No Doc Update
Doc Text:
Clone Of: 2224570
Environment:
Last Closed: 2023-11-14 15:32:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure freeipa issue 9416 0 None None None 2023-07-24 06:44:07 UTC
Red Hat Issue Tracker FREEIPA-10178 0 None None None 2023-07-21 14:00:02 UTC
Red Hat Issue Tracker RHELPLAN-162975 0 None None None 2023-07-21 14:00:07 UTC
Red Hat Product Errata RHBA-2023:6977 0 None None None 2023-11-14 15:33:01 UTC

Description Varun Mylaraiah 2023-07-21 13:58:17 UTC
+++ This bug was initially created as a clone of Bug #2224570 +++

Description of problem:
Improved error messages are needed when attempting to add a non-existing idp to a user

Steps to Reproduce:
[root@master ~]# ipa user-show 01testuser_idp
  User login: 01testuser_idp
  First name: user1
  Last name: user
  Home directory: /home/01testuser_idp
  Login shell: /bin/sh
  Principal name: 01testuser_idp
  Principal alias: 01testuser_idp
  Email address: 01testuser_idp
  UID: 1434200043
  GID: 1434200043
  Account disabled: False
  Password: False
  Member of groups: ipausers
  Kerberos keys available: False


[root@master ~]# ipa idp-find
--------------------------------------
0 Identity Provider references matched
--------------------------------------
----------------------------
Number of entries returned 0
----------------------------

[root@master ~]# ipa user-mod 01testuser_idp --idp=testidp
ipa: ERROR: no such entry

Actual results:
ipa: ERROR: no such entry

Expected results:
A proper error message is required to indicate that the identity provider(idp) does not exist.

Comment 1 Florence Blanc-Renaud 2023-07-24 06:44:05 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/9416

Comment 2 Florence Blanc-Renaud 2023-07-24 06:46:56 UTC
Fixed upstream:

master:

    https://pagure.io/freeipa/c/f57a7dbf508b9214dc8222ea0ba0acf162025d2e User plugin: improve error related to non existing idp
    https://pagure.io/freeipa/c/7517e2ce217c20651b720b8a5e5a4a134e7cdfbf xmlrpc tests: add a test for user plugin with non-existing idp

ipa-4-10:

    https://pagure.io/freeipa/c/387873080f1bc14aeaad89311b06dc46934be1ab User plugin: improve error related to non existing idp
    https://pagure.io/freeipa/c/caacccc6b92c08f510fba2e31d9c56eb372abddc xmlrpc tests: add a test for user plugin with non-existing idp

ipa-4-9:

    https://pagure.io/freeipa/c/99aa03413421cf2839e89e10ca279ec19233dd01 User plugin: improve error related to non existing idp
    https://pagure.io/freeipa/c/dbcbe9a39c99008c6858bab53e2807b7bf01ba65 xmlrpc tests: add a test for user plugin with non-existing idp

Comment 7 Varun Mylaraiah 2023-08-22 10:20:07 UTC
Verified with ansible-freeipa test

ipa-server-4.9.12-7.module+el8.9.0+19691+766a18cc.x86_64
ansible-core-2.15.3-1.el8.x86_64
ansible-freeipa-1.11.1-1.el8.noarch

Passed	ansible_freeipa_tests/user/test_user.py::TestUserModule::test_user_add_with_nonexisting_idp
INFO     pytest_multihost.host.Host.master.OpenSSHTransport:transport.py:397 RUN ['kdestroy', '-A']
DEBUG    pytest_multihost.host.Host.master.cmd374:transport.py:519 RUN ['kdestroy', '-A']
DEBUG    pytest_multihost.host.Host.master.cmd374:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd374:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd374:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:433 PUT inventory/user.hosts
DEBUG    pytest_multihost.host.Host.ansible.cmd165:transport.py:519 RUN ['tee', 'inventory/user.hosts']
DEBUG    pytest_multihost.host.Host.ansible.cmd165:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:433 PUT user_module.yml
DEBUG    pytest_multihost.host.Host.ansible.cmd166:transport.py:519 RUN ['tee', 'user_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd166:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:397 RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/user.hosts', 'user_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:519 RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/user.hosts', 'user_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 ansible-playbook [core 2.15.3]
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   config file = /etc/ansible/ansible.cfg
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   ansible python module location = /usr/lib/python3.11/site-packages/ansible
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   executable location = /usr/bin/ansible-playbook
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   python version = 3.11.4 (main, Aug 11 2023, 10:41:36) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/usr/bin/python3.11)
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   jinja version = 3.1.2
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563   libyaml = True
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 Using /etc/ansible/ansible.cfg as config file
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 Skipping callback 'default', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 Skipping callback 'minimal', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 Skipping callback 'oneline', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 PLAYBOOK: user_module.yml ******************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 1 plays in user_module.yml
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 PLAY [Playbook to ensure that errors are reported when user add with nonexisting External IdP configuration Bug#2215536/2215539] ***
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 TASK [Gathering Facts] *********************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 task path: /root/user_module.yml:2
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 ok: [master.ipadomain.test]
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 TASK [ipauser] *****************************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 task path: /root/user_module.yml:8
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "user_add: 01testuser_idp: External IdP configuration testidp not found"}
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 PLAY RECAP *********************************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd167:transport.py:563 master.ipadomain.test      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   


Based on the above test result, we can mark the bug as verified.

Comment 11 errata-xmlrpc 2023-11-14 15:32:53 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 (idm:client and idm:DL1 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/RHBA-2023:6977


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