Bug 34369 - Test case for changing the password on login via UMC
Test case for changing the password on login via UMC
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: UMC
unspecified
Other Linux
: P5 normal (vote)
: UCS 3.2-x
Assigned To: Dmitry Galkin
Philipp Hahn
:
Depends on: 35634
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-19 11:24 CET by Alexander Kläser
Modified: 2023-03-25 06:42 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
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:
klaeser: Patch_Available+


Attachments
sample code (2.14 KB, text/plain)
2014-03-19 11:24 CET, Alexander Kläser
Details
sample code (2.17 KB, text/plain)
2014-03-19 11:25 CET, Alexander Kläser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2014-03-19 11:24:32 CET
Created attachment 5834 [details]
sample code

This has been partly resolved, some sample test code has been attached. However, the specified TODO parts are yet to be adjusted, currently 411 is returned when trying to change the password.
Comment 1 Alexander Kläser univentionstaff 2014-03-19 11:25:26 CET
Created attachment 5835 [details]
sample code
Comment 2 Alexander Kläser univentionstaff 2014-03-19 13:27:54 CET
The script fails currently with 
> cookie: None
> connection response: '{"status": "411 Length Required", "message": "Current Kerberos password: "}'
Comment 3 Florian Best univentionstaff 2014-03-19 15:07:06 CET
IMHO we should implement the following test cases:

UMC-Authentication with:
* correct Password
* incorrect Password
* expired password
* change of password
* change of password fails → multiple reasons
* password containing unicode characters
* modules (UDM) usable after password change
* deactivated user account
* removed user account
Comment 4 Dmitry Galkin univentionstaff 2014-08-05 14:54:38 CEST
r52522:

  * 60_umc-system/31_umc-service-user-authentication: test the UMC user
    authentication and password change (Bug #34369)


Notes:
- test limited to DC-Master as modifying UCR on master node from other nodes is not that convenient;
- regarding the status code 411 opened Bug #35571
- Bug #25279 was reproduced + "Account expiry date" there shows wrong date format in appearing hint message (day.month.year instead of MM/DD/YYYY);
- also opened Bug #35575.
Comment 5 Dmitry Galkin univentionstaff 2014-08-18 17:34:23 CEST
r52779:
  * 60_umc-system/TestUMCSystemModule.py: added method to wait
    for samba replication;
    60_umc-system/samba_repl.sh: a small wrapper for ../lib/samba.sh;
    60_umc-system/31_umc-service-user-authentication: wait for
    samba syncronisation whenever possible (Bug #34369).

Updated as in S4 environment an authentication with a removed (etc.) user may be successful since sync takes some time. (http://jenkins.knut.univention.de:8080/job/UCS%203.2-2%20Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=master/114/testReport/junit/60_umc-system/31_umc-service-user-authentication/test/)

After Bug #35634 is resolved -> should be updated at line 273.
Comment 6 Dmitry Galkin univentionstaff 2014-08-19 14:46:26 CEST
(In reply to Dmitry Galkin from comment #5)

>   * 60_umc-system/TestUMCSystemModule.py: added method to wait
>     for samba replication;
>     60_umc-system/samba_repl.sh: a small wrapper for ../lib/samba.sh;

Came across waiting methods already implemented in Python just by chance:
ucs-test/univention/testing/ucs_samba.py
Comment 7 Philipp Hahn univentionstaff 2014-08-25 17:08:12 CEST
OK: TestUMCSystem.wait_for_samba_replication()
OK: samba_repl.sh
OK: 31_umc-service-user-authentication
OK: ./31_umc-service-user-authentication -vvvf

(In reply to Florian Best from comment #3)
> IMHO we should implement the following test cases:
> 
> UMC-Authentication with:
> * correct Password
OK
> * incorrect Password
OK
> * expired password
OK
> * change of password
OK
> * change of password fails → multiple reasons
> * password containing unicode characters
OK
> * modules (UDM) usable after password change
OK
> * deactivated user account
OK
> * removed user account
OK

FAIL:
> Setting an expiry date in the past for the test user 'umc_test_user_cvevad' account and trying to authenticate:
...
> Waiting for replication:
> OK: replication complete (nid=288 lid=288)
> Done: replication complete.
> ### FAIL ###
> 
> Waiting for Samba replication failed, in stderr:
> 'Kein Paket gefunden, das auf univention-samba4 passt.
> '

@ samba_repl.sh:6
-if checkpkg "univention-samba4"; then
+if checkpkg "univention-samba4" 2>/dev/null; then
Comment 8 Dmitry Galkin univentionstaff 2014-08-25 17:19:09 CEST
(In reply to Philipp Hahn from comment #7)
> @ samba_repl.sh:6
> -if checkpkg "univention-samba4"; then
> +if checkpkg "univention-samba4" 2>/dev/null; then

r53010:

  * 60_umc-system/samba_repl.sh: checkpkg output > /dev/null
    60_umc-system/31_umc-service-user-authentication: wait bit more
    after user is being deleted (Bug #34369)
Comment 9 Philipp Hahn univentionstaff 2014-08-25 17:46:29 CEST
OK: r53010
OK: /usr/share/ucs-test/60_umc-system/31_umc-service-user-authentication -vvvf