Bug 43855 - Test case 60_umc/31_udm_user_authentication fails in UCS 4.2
Test case 60_umc/31_udm_user_authentication fails in UCS 4.2
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: UMC
unspecified
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Florian Best
Florian Best
: interim-4
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-15 06:17 CET by Stefan Gohmann
Modified: 2017-04-04 18:29 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2017-03-15 06:17:03 CET
Please fix the test or fix the product or in case it is not so important disable the test case.

http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/75/SambaVersion=s3,Systemrolle=master/testReport/

*** BEGIN *** ['/usr/bin/python', '31_udm_user_authentication'] ***
*** 60_umc/31_udm_user_authentication *** Test the UMC user authentication and password change ***
*** START TIME: 2017-03-14 16:01:09 ***

Creating a group 'umc_test_group_bhx51g' and a user 'umc_test_user_m7y4xb' in it for the test:

Creating groups/group object with /usr/sbin/udm-test groups/group create --position cn=groups,dc=autotest090,dc=local --set name=umc_test_group_bhx51g
Creating users/user object with /usr/sbin/udm-test users/user create --position cn=users,dc=autotest090,dc=local --set username=umc_test_user_m7y4xb --set firstname=pea4cgj97c --set lastname=wctbpq4e0w --set primaryGroup=cn=umc_test_group_bhx51g,cn=groups,dc=autotest090,dc=local --set password=univention

Trying to authenticate to UMC with username 'umc_test_user_m7y4xb' and a random password:

*** UMC request: "POST auth" (None)
UMC request payload: 
{'options': {'password': 'univentionwjpl', 'username': 'umc_test_user_m7y4xb'}}
UMC request failed: 401 on master090.autotest090.local (auth): {"status": 401, "message": "The authentication has failed, please login again.", "location": "https://master090.autotest090.local/univention/auth"}


Trying to authenticate to UMC with username 'umc_test_user_m7y4xb' and a valid initial password 'univention':

*** UMC request: "POST auth" (None)
UMC request payload: 
{'options': {'password': 'univention', 'username': 'umc_test_user_m7y4xb'}}
*** UMC response: 
{u'message': None,
 u'options': None,
 u'result': {u'username': u'umc_test_user_m7y4xb'},
 u'status': 200}
***


Trying to authenticate to UMC with username 'umc_test_user_m7y4xb' and a password 'univention':

*** UMC request: "POST auth" (None)
UMC request payload: 
{'options': {'password': 'univention', 'username': 'umc_test_user_m7y4xb'}}
*** UMC response: 
{u'message': None,
 u'options': None,
 u'result': {u'username': u'umc_test_user_m7y4xb'},
 u'status': 200}
***


Changing 'uid=umc_test_user_m7y4xb,cn=users,dc=autotest090,dc=local' user password to 'univention1'

*** UMC request: "POST command/udm/put" (users/user)
UMC request payload: 
{'flavor': 'users/user',
 'options': [{'object': {'$dn$': 'uid=umc_test_user_m7y4xb,cn=users,dc=autotest090,dc=local',
                         'password': 'univention1'},
              'options': {}}]}
UMC request failed: 403 on master090.autotest090.local (command/udm/put): {"status": 403, "message": "Verboten", "location": "https://master090.autotest090.local/univention/command"}                                                                                                                                                     

Cleanup after exception: <class 'univention.lib.umc.Forbidden'> 403 on master090.autotest090.local (command/udm/put): {"status": 403, "message": "Verboten", "location": "https://master090.autotest090.local/univention/command"}                                                                                                                                                     
Performing UCSTestUDM cleanup...
UCSTestUDM cleanup done
Traceback (most recent call last):
  File "31_udm_user_authentication", line 231, in <module>
    sys.exit(TestUMC.main())
  File "31_udm_user_authentication", line 225, in main
    self.check_change_old_new_unicode_passwords()
  File "31_udm_user_authentication", line 118, in check_change_old_new_unicode_passwords
    self.change_user_password(self.test_user_dn, self.test_password + '1')
  File "31_udm_user_authentication", line 84, in change_user_password
    request_result = self.request("udm/put", options, "users/user")
  File "./umc.py", line 30, in request
    return self.client.umc_command(*args, **kwargs).result
  File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 58, in umc_command
    return super(Client, self).umc_command(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 272, in umc_command
    return self.request('POST', 'command/%s' % (path,), data, headers)
  File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 69, in request
    response = super(Client, self).request(method, path, data, headers)
  File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 297, in request
    return self.send(request)
  File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 316, in send
    raise HTTPError(request, response, self.hostname)
univention.lib.umc.Forbidden: 403 on master090.autotest090.local (command/udm/put): {"status": 403, "message": "Verboten", "location": "https://master090.autotest090.local/univention/command"}                                                                                                                                                     
*** END TIME: 2017-03-14 16:01:13 ***
*** TEST DURATION (H:MM:SS.ms): 0:00:04.505217 ***
Comment 1 Florian Best univentionstaff 2017-03-16 14:17:38 CET
ucs-test (7.0.18-1):
r77819 | Bug #43855: fix 31_udm_user_authentication
Comment 2 Florian Best univentionstaff 2017-03-17 10:56:15 CET
OK: it doesn't fail anymore in jenkins.
Comment 3 Stefan Gohmann univentionstaff 2017-04-04 18:29:56 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".