Bug 2224570 - 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: MODIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: ipa
Version: 9.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: anuja
URL:
Whiteboard:
Depends On:
Blocks: 2224572
TreeView+ depends on / blocked
 
Reported: 2023-07-21 13:56 UTC by Varun Mylaraiah
Modified: 2023-08-14 09:41 UTC (History)
5 users (show)

Fixed In Version: ipa-4.10.2-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2224572 (view as bug list)
Environment:
Last Closed:
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-21 14:06:31 UTC
Red Hat Issue Tracker FREEIPA-10177 0 None None None 2023-07-21 13:57:58 UTC
Red Hat Issue Tracker RHELPLAN-162974 0 None None None 2023-07-21 13:58:02 UTC

Description Varun Mylaraiah 2023-07-21 13:56:56 UTC
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 Rafael Jeffman 2023-07-21 14:06:31 UTC
There's a merged fix for this issue, upstream:

Comment 2 Rafael Jeffman 2023-07-21 14:07:50 UTC
There's a merged fix for this issue, upstream: https://github.com/freeipa/freeipa/pull/6916

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

Comment 4 Florence Blanc-Renaud 2023-07-24 06:48:14 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 5 Florence Blanc-Renaud 2023-08-01 07:45:46 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 6 anuja 2023-08-14 09:41:33 UTC
Verified tested using test compose:
ipa-server-4.10.2-3.el9.x86_64

test_xmlrpc/test_stageuser_plugin.py::TestCreateInvalidAttributes::test_create_invalid_idp PASSED [ 90%]
test_xmlrpc/test_stageuser_plugin.py::TestUpdateInvalidAttributes::test_update_invalididp PASSED [ 90%]
test_xmlrpc/test_user_plugin.py::TestUpdate::test_update_invalid_idp PASSED [ 96%]
test_xmlrpc/test_user_plugin.py::TestCreate::test_create_with_invalididp PASSED [ 97%]


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