Strong Password
Test suite to check the OSDx password strong-password level
Test Strong Password
Description
A password strength level and a strong password are configured and then attempting to configure a weak password fails.
Scenario
Step 1: Set the following configuration in DUT0 :
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp authentication-key 1 encrypted-key U2FsdGVkX1/zipYF1nzIvewyqYAV9z7ivTSMROw/v4g= set system strong-password level 2
Note
This password has a score of 4.
Step 2: Expect a failure in the following command:
Modify the following configuration lines in DUT0 :
set system ntp authentication-key 1 encrypted-key U2FsdGVkX1/zipYF1nzIvbhwZXPbsCLLbIhJv8XYiJg=
Note
This password has a score of 0, which is lower than the strong-password level.
Test Password Display
Description
Check that additional information from the strong-password is displayed correctly
Scenario
Step 1: Set the following configuration in DUT0 :
set system cli configuration logging global info set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system strong-password display set system strong-password level 0
Step 2: Modify the following configuration lines in DUT0 :
set system ntp authentication-key 1 encrypted-key U2FsdGVkX1+oyUejX5IB5ItHaFfcc3wpYDZJpKXt8XE=
Step 3: Run command system journal show | tail -n 1000 at DUT0 and expect this output:
Show output
Nov 25 13:20:52.000193 osdx systemd-timedated[546103]: Changed local time to Tue 2025-11-25 13:20:52 UTC Nov 25 13:20:52.001702 osdx systemd-journald[542263]: Time jumped backwards, rotating. Nov 25 13:20:52.001844 osdx OSDxCLI[546931]: User 'admin' executed a new command: 'set date 2025-11-25 13:20:52'. Nov 25 13:20:52.338859 osdx sudo[548346]: pam_limits(sudo:session): invalid line '@200:215 hard maxlogins ' - skipped Nov 25 13:20:52.343257 osdx systemd-journald[542263]: Runtime Journal (/run/log/journal/3dabd6c33b8e497d9fdbc41689ab0c32) is 1.9M, max 13.8M, 11.8M free. Nov 25 13:20:52.345721 osdx systemd-journald[542263]: Received client request to rotate journal, rotating. Nov 25 13:20:52.345787 osdx systemd-journald[542263]: Vacuuming done, freed 0B of archived journals from /run/log/journal/3dabd6c33b8e497d9fdbc41689ab0c32. Nov 25 13:20:52.348779 osdx sudo[548345]: pam_limits(sudo:session): invalid line '@200:215 hard maxlogins ' - skipped Nov 25 13:20:52.356421 osdx OSDxCLI[546931]: User 'admin' executed a new command: 'system journal clear'. Nov 25 13:20:52.577463 osdx OSDxCLI[546931]: User 'admin' executed a new command: 'system coredump delete all'. Nov 25 13:20:52.806563 osdx OSDxCLI[546931]: User 'admin' entered the configuration menu. Nov 25 13:20:52.868667 osdx OSDxCLI[546931]: User 'admin' added a new cfg line: 'set system console log-level info'. Nov 25 13:20:52.968161 osdx OSDxCLI[546931]: User 'admin' added a new cfg line: 'set system strong-password level 0'. Nov 25 13:20:53.027023 osdx OSDxCLI[546931]: User 'admin' added a new cfg line: 'set system strong-password display'. Nov 25 13:20:53.134462 osdx OSDxCLI[546931]: User 'admin' added a new cfg line: 'show working'. Nov 25 13:20:53.194208 osdx ubnt-cfgd[548367]: inactive Nov 25 13:20:53.209581 osdx INFO[548375]: FRR daemons did not change Nov 25 13:20:53.210484 osdx modulelauncher[1478]: + Received data: ['546931', 'osdx.utils.xos', 'set_console_log_level', 'info'] Nov 25 13:20:53.228006 osdx OSDxCLI[546931]: Signal 10 received Nov 25 13:20:53.242951 osdx cfgd[1655]: [546931]Completed change to active configuration Nov 25 13:20:53.244627 osdx OSDxCLI[546931]: User 'admin' committed the configuration. Nov 25 13:20:53.262461 osdx OSDxCLI[546931]: User 'admin' left the configuration menu. Nov 25 13:20:53.444442 osdx OSDxCLI[546931]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Nov 25 13:20:53.445169 osdx OSDxCLI[546931]: pam_unix(cli:session): session closed for user admin Nov 25 13:20:53.445585 osdx OSDxCLI[546931]: User 'admin' entered the configuration menu. Nov 25 13:20:53.508823 osdx OSDxCLI[546931]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Nov 25 13:20:53.509167 osdx cfgd[1655]: Execute action [syntax] for node [system ntp authentication-key 1] Nov 25 13:20:53.522006 osdx OSDxCLI[546931]: pam_unix(cli:session): session closed for user admin Nov 25 13:20:53.522347 osdx OSDxCLI[546931]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 ******'. Nov 25 13:20:53.605334 osdx OSDxCLI[546931]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Nov 25 13:20:53.608643 osdx OSDxCLI[546931]: pam_unix(cli:session): session closed for user admin Nov 25 13:20:53.608978 osdx OSDxCLI[546931]: User 'admin' added a new cfg line: 'show changes'. Nov 25 13:20:53.664913 osdx OSDxCLI[546931]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Nov 25 13:20:53.673772 osdx ubnt-cfgd[548401]: inactive Nov 25 13:20:53.686246 osdx cfgd[1655]: [546931]must validation for [system strong-password] was skipped Nov 25 13:20:53.686322 osdx cfgd[1655]: [546931]must validation for [system login user admin role] was skipped Nov 25 13:20:53.698331 osdx WARNING[548407]: Short keyboard patterns are easy to guess. Nov 25 13:20:53.698632 osdx INFO[548407]: Suggestions: Nov 25 13:20:53.698705 osdx INFO[548407]: Add another word or two. Uncommon words are better. Nov 25 13:20:53.698756 osdx INFO[548407]: Use a longer keyboard pattern with more turns. Nov 25 13:20:53.698800 osdx INFO[548407]: Crack times (passwords per time): Nov 25 13:20:53.698846 osdx INFO[548407]: 100 per hour: centuries Nov 25 13:20:53.698886 osdx INFO[548407]: 10 per second: 3 months Nov 25 13:20:53.698964 osdx INFO[548407]: 10.000 per second: 3 hours Nov 25 13:20:53.699010 osdx INFO[548407]: 10.000.000.000 per second: less than a second Nov 25 13:20:53.704175 osdx INFO[548409]: FRR daemons did not change Nov 25 13:20:53.704560 osdx cfgd[1655]: Execute action [end] for node [system ntp] Nov 25 13:20:53.738019 osdx systemd[1]: Starting ntpsec.service - Network Time Service... Nov 25 13:20:53.743311 osdx ntpd[548416]: INIT: ntpd ntpsec-1.2.2+1-g8bf3d37: Starting Nov 25 13:20:53.743479 osdx ntp-systemd-wrapper[548416]: 2025-11-25T13:20:53 ntpd[548416]: INIT: ntpd ntpsec-1.2.2+1-g8bf3d37: Starting Nov 25 13:20:53.743509 osdx ntpd[548416]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec Nov 25 13:20:53.743536 osdx ntp-systemd-wrapper[548416]: 2025-11-25T13:20:53 ntpd[548416]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec Nov 25 13:20:53.744060 osdx systemd[1]: Started ntpsec.service - Network Time Service. Nov 25 13:20:53.745245 osdx cfgd[1655]: [546931]Completed change to active configuration Nov 25 13:20:53.746773 osdx OSDxCLI[546931]: pam_unix(cli:session): session closed for user admin Nov 25 13:20:53.746992 osdx OSDxCLI[546931]: User 'admin' committed the configuration. Nov 25 13:20:53.747167 osdx ntpd[548418]: INIT: precision = 0.074 usec (-24) Nov 25 13:20:53.747754 osdx ntpd[548418]: INIT: successfully locked into RAM Nov 25 13:20:53.747768 osdx ntpd[548418]: CONFIG: readconfig: parsing file: /etc/ntpsec/ntp.conf Nov 25 13:20:53.747803 osdx ntpd[548418]: AUTH: authreadkeys: reading /etc/ntp.keys Nov 25 13:20:53.747996 osdx ntpd[548418]: AUTH: authreadkeys: added 1 keys Nov 25 13:20:53.748043 osdx ntpd[548418]: INIT: Using SO_TIMESTAMPNS(ns) Nov 25 13:20:53.748055 osdx ntpd[548418]: IO: Listen and drop on 0 v6wildcard [::]:123 Nov 25 13:20:53.748069 osdx ntpd[548418]: IO: Listen and drop on 1 v4wildcard 0.0.0.0:123 Nov 25 13:20:53.748504 osdx ntpd[548418]: IO: Listen normally on 2 lo 127.0.0.1:123 Nov 25 13:20:53.748525 osdx ntpd[548418]: IO: Listen normally on 3 lo [::1]:123 Nov 25 13:20:53.748548 osdx ntpd[548418]: IO: Listening on routing socket on fd #20 for interface updates Nov 25 13:20:53.748555 osdx ntpd[548418]: INIT: MRU 10922 entries, 13 hash bits, 65536 bytes Nov 25 13:20:53.748613 osdx ntpd[548418]: INIT: Built with OpenSSL 3.0.14 4 Jun 2024, 300000e0 Nov 25 13:20:53.748617 osdx ntpd[548418]: INIT: Running with OpenSSL 3.0.16 11 Feb 2025, 30000100 Nov 25 13:20:53.749049 osdx ntpd[548418]: NTSc: Using system default root certificates. Nov 25 13:20:53.769987 osdx OSDxCLI[546931]: User 'admin' left the configuration menu. Nov 25 13:20:53.885388 osdx OSDxCLI[546931]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)