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 U2FsdGVkX19uRJYBSMgTUtJkcz3UDPmPIaGRJHZml4c=
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 U2FsdGVkX18J5V4SXJL6+QRWNkxsmimClkrEkF/vtbk=

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 U2FsdGVkX184GTjHSROeUotednoSBnz0RnOaSSvScLw=

Step 3: Run the command system journal show | tail -n 1000 on DUT0 and expect the following output:

Show output
May 19 16:08:53.279587 osdx systemd-journald[505760]: Runtime Journal (/run/log/journal/d1b141b298644f3ea5560bad25bf4943) is 2.1M, max 13.8M, 11.6M free.
May 19 16:08:53.280388 osdx systemd-journald[505760]: Received client request to rotate journal, rotating.
May 19 16:08:53.280432 osdx systemd-journald[505760]: Vacuuming done, freed 0B of archived journals from /run/log/journal/d1b141b298644f3ea5560bad25bf4943.
May 19 16:08:53.289712 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system journal clear'.
May 19 16:08:53.483467 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system coredump delete all'.
May 19 16:08:53.689947 osdx OSDxCLI[529748]: User 'admin' entered the configuration menu.
May 19 16:08:53.750748 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'set system console log-level info'.
May 19 16:08:53.840257 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'set system strong-password level 0'.
May 19 16:08:53.892476 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'set system strong-password display'.
May 19 16:08:53.989314 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'show working'.
May 19 16:08:54.041889 osdx ubnt-cfgd[537472]: inactive
May 19 16:08:54.058318 osdx INFO[537481]: FRR daemons did not change
May 19 16:08:54.059813 osdx modulelauncher[1723]: + Received data: ['529748', 'osdx.utils.xos', 'set_console_log_level', 'info']
May 19 16:08:54.076974 osdx OSDxCLI[529748]: Signal 10 received
May 19 16:08:54.102698 osdx cfgd[1918]: [529748]Completed change to active configuration
May 19 16:08:54.103123 osdx OSDxCLI[529748]: User 'admin' committed the configuration.
May 19 16:08:54.118231 osdx OSDxCLI[529748]: User 'admin' left the configuration menu.
May 19 16:08:54.315293 osdx OSDxCLI[529748]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
May 19 16:08:54.315715 osdx OSDxCLI[529748]: pam_unix(cli:session): session closed for user admin
May 19 16:08:54.315895 osdx OSDxCLI[529748]: User 'admin' entered the configuration menu.
May 19 16:08:54.368007 osdx OSDxCLI[529748]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
May 19 16:08:54.368222 osdx cfgd[1918]: Execute action [syntax] for node [system ntp authentication-key 1]
May 19 16:08:54.415575 osdx OSDxCLI[529748]: pam_unix(cli:session): session closed for user admin
May 19 16:08:54.415821 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 ******'.
May 19 16:08:54.459898 osdx OSDxCLI[529748]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
May 19 16:08:54.463162 osdx OSDxCLI[529748]: pam_unix(cli:session): session closed for user admin
May 19 16:08:54.463339 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'show changes'.
May 19 16:08:54.556345 osdx OSDxCLI[529748]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
May 19 16:08:54.562670 osdx ubnt-cfgd[537514]: inactive
May 19 16:08:54.572273 osdx cfgd[1918]: [529748]must validation for [system strong-password] was skipped
May 19 16:08:54.572326 osdx cfgd[1918]: [529748]must validation for [system login user admin role] was skipped
May 19 16:08:54.583951 osdx WARNING[537520]: Short keyboard patterns are easy to guess.
May 19 16:08:54.583994 osdx INFO[537520]: Suggestions:
May 19 16:08:54.584024 osdx INFO[537520]:   Add another word or two. Uncommon words are better.
May 19 16:08:54.584046 osdx INFO[537520]:   Use a longer keyboard pattern with more turns.
May 19 16:08:54.584064 osdx INFO[537520]: Crack times (passwords per time):
May 19 16:08:54.584082 osdx INFO[537520]:   100 per hour:              centuries
May 19 16:08:54.584099 osdx INFO[537520]:   10 per second:             3 months
May 19 16:08:54.584149 osdx INFO[537520]:   10.000 per second:         3 hours
May 19 16:08:54.584170 osdx INFO[537520]:   10.000.000.000 per second: less than a second
May 19 16:08:54.589365 osdx INFO[537523]: FRR daemons did not change
May 19 16:08:54.589520 osdx cfgd[1918]: Execute action [end] for node [system ntp]
May 19 16:08:54.620647 osdx systemd[1]: Starting ntpsec.service - Network Time Service...
May 19 16:08:54.625470 osdx ntpd[537530]: INIT: ntpd ntpsec-1.2.2+1-gc8a7dda: Starting
May 19 16:08:54.625488 osdx ntpd[537530]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec
May 19 16:08:54.625683 osdx ntp-systemd-wrapper[537530]: 2026-05-19T16:08:54 ntpd[537530]: INIT: ntpd ntpsec-1.2.2+1-gc8a7dda: Starting
May 19 16:08:54.625683 osdx ntp-systemd-wrapper[537530]: 2026-05-19T16:08:54 ntpd[537530]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec
May 19 16:08:54.625956 osdx systemd[1]: Started ntpsec.service - Network Time Service.
May 19 16:08:54.627843 osdx ntpd[537532]: INIT: precision = 0.053 usec (-24)
May 19 16:08:54.628335 osdx ntpd[537532]: INIT: successfully locked into RAM
May 19 16:08:54.628348 osdx ntpd[537532]: CONFIG: readconfig: parsing file: /etc/ntpsec/ntp.conf
May 19 16:08:54.628387 osdx ntpd[537532]: AUTH: authreadkeys: reading /etc/ntp.keys
May 19 16:08:54.628530 osdx ntpd[537532]: AUTH: authreadkeys: added 1 keys
May 19 16:08:54.628570 osdx ntpd[537532]: INIT: Using SO_TIMESTAMPNS(ns)
May 19 16:08:54.628588 osdx ntpd[537532]: IO: Listen and drop on 0 v6wildcard [::]:123
May 19 16:08:54.628598 osdx ntpd[537532]: IO: Listen and drop on 1 v4wildcard 0.0.0.0:123
May 19 16:08:54.628686 osdx ntpd[537532]: IO: Listen normally on 2 lo 127.0.0.1:123
May 19 16:08:54.628699 osdx ntpd[537532]: IO: Listen normally on 3 lo [::1]:123
May 19 16:08:54.628714 osdx ntpd[537532]: IO: Listening on routing socket on fd #20 for interface updates
May 19 16:08:54.628719 osdx ntpd[537532]: INIT: MRU 10922 entries, 13 hash bits, 65536 bytes
May 19 16:08:54.628763 osdx ntpd[537532]: INIT: Built with OpenSSL 3.0.14 4 Jun 2024, 300000e0
May 19 16:08:54.628765 osdx ntpd[537532]: INIT: Running with OpenSSL 3.0.19 27 Jan 2026, 30000130
May 19 16:08:54.629149 osdx ntpd[537532]: NTSc: Using system default root certificates.
May 19 16:08:54.630758 osdx cfgd[1918]: [529748]Completed change to active configuration
May 19 16:08:54.630919 osdx OSDxCLI[529748]: pam_unix(cli:session): session closed for user admin
May 19 16:08:54.631133 osdx OSDxCLI[529748]: User 'admin' committed the configuration.
May 19 16:08:54.645033 osdx OSDxCLI[529748]: User 'admin' left the configuration menu.
May 19 16:08:54.766791 osdx OSDxCLI[529748]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)