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 U2FsdGVkX18gka6SdiaLsdb7uQuFVOYhFrCNfrHIZt8=
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/7nzJokP9/uFUdOLFQYy4gMxJGt+lcSAs=

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 U2FsdGVkX18VSJawT2xBpWDIPuEOe+EJ7dS+0OT+npc=

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

Show output
Sep 16 20:23:26.297059 osdx systemd-journald[2158]: Runtime Journal (/run/log/journal/7ab9d0c6c88d486ab30f6cca192546c5) is 2.1M, max 13.8M, 11.6M free.
Sep 16 20:23:26.298901 osdx systemd-journald[2158]: Received client request to rotate journal, rotating.
Sep 16 20:23:26.298970 osdx systemd-journald[2158]: Vacuuming done, freed 0B of archived journals from /run/log/journal/7ab9d0c6c88d486ab30f6cca192546c5.
Sep 16 20:23:26.307062 osdx OSDxCLI[185195]: User 'admin' executed a new command: 'system journal clear'.
Sep 16 20:23:26.546540 osdx OSDxCLI[185195]: User 'admin' executed a new command: 'system coredump delete all'.
Sep 16 20:23:26.814239 osdx OSDxCLI[185195]: User 'admin' entered the configuration menu.
Sep 16 20:23:26.873429 osdx OSDxCLI[185195]: User 'admin' added a new cfg line: 'set system console log-level info'.
Sep 16 20:23:26.985555 osdx OSDxCLI[185195]: User 'admin' added a new cfg line: 'set system strong-password level 0'.
Sep 16 20:23:27.103047 osdx OSDxCLI[185195]: User 'admin' added a new cfg line: 'set system strong-password display'.
Sep 16 20:23:27.189080 osdx OSDxCLI[185195]: User 'admin' added a new cfg line: 'show working'.
Sep 16 20:23:27.322347 osdx ubnt-cfgd[187015]: inactive
Sep 16 20:23:27.342408 osdx INFO[187024]: FRR daemons did not change
Sep 16 20:23:27.345503 osdx modulelauncher[1704]: + Received data: ['185195', 'osdx.utils.xos', 'set_console_log_level', 'info']
Sep 16 20:23:27.367973 osdx OSDxCLI[185195]: Signal 10 received
Sep 16 20:23:27.411524 osdx cfgd[1899]: [185195]Completed change to active configuration
Sep 16 20:23:27.412165 osdx OSDxCLI[185195]: User 'admin' committed the configuration.
Sep 16 20:23:27.429992 osdx OSDxCLI[185195]: User 'admin' left the configuration menu.
Sep 16 20:23:27.614873 osdx OSDxCLI[185195]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
Sep 16 20:23:27.615435 osdx OSDxCLI[185195]: pam_unix(cli:session): session closed for user admin
Sep 16 20:23:27.615692 osdx OSDxCLI[185195]: User 'admin' entered the configuration menu.
Sep 16 20:23:27.678574 osdx OSDxCLI[185195]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
Sep 16 20:23:27.678944 osdx cfgd[1899]: Execute action [syntax] for node [system ntp authentication-key 1]
Sep 16 20:23:27.692421 osdx OSDxCLI[185195]: pam_unix(cli:session): session closed for user admin
Sep 16 20:23:27.692692 osdx OSDxCLI[185195]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 ******'.
Sep 16 20:23:27.774300 osdx OSDxCLI[185195]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
Sep 16 20:23:27.779580 osdx OSDxCLI[185195]: pam_unix(cli:session): session closed for user admin
Sep 16 20:23:27.779949 osdx OSDxCLI[185195]: User 'admin' added a new cfg line: 'show changes'.
Sep 16 20:23:27.873013 osdx OSDxCLI[185195]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)
Sep 16 20:23:27.882165 osdx ubnt-cfgd[187058]: inactive
Sep 16 20:23:27.897749 osdx cfgd[1899]: [185195]must validation for [system strong-password] was skipped
Sep 16 20:23:27.897828 osdx cfgd[1899]: [185195]must validation for [system login user admin role] was skipped
Sep 16 20:23:27.918738 osdx WARNING[187064]: Short keyboard patterns are easy to guess.
Sep 16 20:23:27.918789 osdx INFO[187064]: Suggestions:
Sep 16 20:23:27.918825 osdx INFO[187064]:   Add another word or two. Uncommon words are better.
Sep 16 20:23:27.918865 osdx INFO[187064]:   Use a longer keyboard pattern with more turns.
Sep 16 20:23:27.918890 osdx INFO[187064]: Crack times (passwords per time):
Sep 16 20:23:27.918913 osdx INFO[187064]:   100 per hour:              centuries
Sep 16 20:23:27.918935 osdx INFO[187064]:   10 per second:             3 months
Sep 16 20:23:27.919000 osdx INFO[187064]:   10.000 per second:         3 hours
Sep 16 20:23:27.919027 osdx INFO[187064]:   10.000.000.000 per second: less than a second
Sep 16 20:23:27.926831 osdx INFO[187067]: FRR daemons did not change
Sep 16 20:23:27.927147 osdx cfgd[1899]: Execute action [end] for node [system ntp]
Sep 16 20:23:27.963219 osdx systemd[1]: Starting ntpsec.service - Network Time Service...
Sep 16 20:23:27.970069 osdx ntpd[187074]: INIT: ntpd ntpsec-1.2.2+2-g1f9c114: Starting
Sep 16 20:23:27.970090 osdx ntpd[187074]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec
Sep 16 20:23:27.970399 osdx ntp-systemd-wrapper[187074]: 2026-09-16T20:23:27 ntpd[187074]: INIT: ntpd ntpsec-1.2.2+2-g1f9c114: Starting
Sep 16 20:23:27.970399 osdx ntp-systemd-wrapper[187074]: 2026-09-16T20:23:27 ntpd[187074]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec
Sep 16 20:23:27.970697 osdx systemd[1]: Started ntpsec.service - Network Time Service.
Sep 16 20:23:27.973653 osdx ntpd[187076]: INIT: precision = 0.078 usec (-24)
Sep 16 20:23:27.974350 osdx ntpd[187076]: INIT: successfully locked into RAM
Sep 16 20:23:27.974368 osdx ntpd[187076]: CONFIG: readconfig: parsing file: /etc/ntpsec/ntp.conf
Sep 16 20:23:27.974407 osdx ntpd[187076]: AUTH: authreadkeys: reading /etc/ntp.keys
Sep 16 20:23:27.974602 osdx ntpd[187076]: AUTH: authreadkeys: added 1 keys
Sep 16 20:23:27.974656 osdx ntpd[187076]: INIT: Using SO_TIMESTAMPNS(ns)
Sep 16 20:23:27.974673 osdx ntpd[187076]: IO: Listen and drop on 0 v6wildcard [::]:123
Sep 16 20:23:27.974688 osdx ntpd[187076]: IO: Listen and drop on 1 v4wildcard 0.0.0.0:123
Sep 16 20:23:27.974807 osdx ntpd[187076]: IO: Listen normally on 2 lo 127.0.0.1:123
Sep 16 20:23:27.974827 osdx ntpd[187076]: IO: Listen normally on 3 lo [::1]:123
Sep 16 20:23:27.974854 osdx ntpd[187076]: IO: Listening on routing socket on fd #20 for interface updates
Sep 16 20:23:27.974862 osdx ntpd[187076]: INIT: MRU 10922 entries, 13 hash bits, 65536 bytes
Sep 16 20:23:27.974927 osdx ntpd[187076]: INIT: Built with OpenSSL 3.0.19 27 Jan 2026, 30000130
Sep 16 20:23:27.974932 osdx ntpd[187076]: INIT: Running with OpenSSL 3.0.20 7 Apr 2026, 30000140
Sep 16 20:23:27.975545 osdx ntpd[187076]: NTSc: Using system default root certificates.
Sep 16 20:23:27.978342 osdx cfgd[1899]: [185195]Completed change to active configuration
Sep 16 20:23:27.978626 osdx OSDxCLI[185195]: pam_unix(cli:session): session closed for user admin
Sep 16 20:23:27.978982 osdx OSDxCLI[185195]: User 'admin' committed the configuration.
Sep 16 20:23:27.999660 osdx OSDxCLI[185195]: User 'admin' left the configuration menu.
Sep 16 20:23:28.121209 osdx OSDxCLI[185195]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)