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+pkXpvHg0TBbQob57hf5Sr+WCOQUO+wYY= 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 U2FsdGVkX18kQ+Y0ZXKV3MseQ6EKayP6Sk0RtrUOWL0=
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/cmhd23HOlW3L+S4AolqnWMHqUg4vtdgs=
Step 3: Run the command system journal show | tail -n 1000 on DUT0 and expect the following output:
Show output
Jul 24 13:37:04.314035 osdx systemd-journald[2180]: Runtime Journal (/run/log/journal/3a8dbab828fc40a183893e468c03e10b) is 2.2M, max 13.8M, 11.6M free. Jul 24 13:37:04.316598 osdx systemd-journald[2180]: Received client request to rotate journal, rotating. Jul 24 13:37:04.316657 osdx systemd-journald[2180]: Vacuuming done, freed 0B of archived journals from /run/log/journal/3a8dbab828fc40a183893e468c03e10b. Jul 24 13:37:04.325663 osdx OSDxCLI[833831]: User 'admin' executed a new command: 'system journal clear'. Jul 24 13:37:04.540133 osdx OSDxCLI[833831]: User 'admin' executed a new command: 'system coredump delete all'. Jul 24 13:37:04.823013 osdx OSDxCLI[833831]: User 'admin' entered the configuration menu. Jul 24 13:37:04.892472 osdx OSDxCLI[833831]: User 'admin' added a new cfg line: 'set system console log-level info'. Jul 24 13:37:05.000296 osdx OSDxCLI[833831]: User 'admin' added a new cfg line: 'set system strong-password level 0'. Jul 24 13:37:05.057889 osdx OSDxCLI[833831]: User 'admin' added a new cfg line: 'set system strong-password display'. Jul 24 13:37:05.188701 osdx OSDxCLI[833831]: User 'admin' added a new cfg line: 'show working'. Jul 24 13:37:05.302762 osdx ubnt-cfgd[848915]: inactive Jul 24 13:37:05.320227 osdx INFO[848924]: FRR daemons did not change Jul 24 13:37:05.321905 osdx modulelauncher[1727]: + Received data: ['833831', 'osdx.utils.xos', 'set_console_log_level', 'info'] Jul 24 13:37:05.340785 osdx OSDxCLI[833831]: Signal 10 received Jul 24 13:37:05.372679 osdx cfgd[1923]: [833831]Completed change to active configuration Jul 24 13:37:05.374207 osdx OSDxCLI[833831]: User 'admin' committed the configuration. Jul 24 13:37:05.419737 osdx OSDxCLI[833831]: User 'admin' left the configuration menu. Jul 24 13:37:05.607771 osdx OSDxCLI[833831]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jul 24 13:37:05.608357 osdx OSDxCLI[833831]: pam_unix(cli:session): session closed for user admin Jul 24 13:37:05.608672 osdx OSDxCLI[833831]: User 'admin' entered the configuration menu. Jul 24 13:37:05.674482 osdx OSDxCLI[833831]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jul 24 13:37:05.674796 osdx cfgd[1923]: Execute action [syntax] for node [system ntp authentication-key 1] Jul 24 13:37:05.697057 osdx OSDxCLI[833831]: pam_unix(cli:session): session closed for user admin Jul 24 13:37:05.697668 osdx OSDxCLI[833831]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 ******'. Jul 24 13:37:05.784276 osdx OSDxCLI[833831]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jul 24 13:37:05.788691 osdx OSDxCLI[833831]: pam_unix(cli:session): session closed for user admin Jul 24 13:37:05.788999 osdx OSDxCLI[833831]: User 'admin' added a new cfg line: 'show changes'. Jul 24 13:37:05.869139 osdx OSDxCLI[833831]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jul 24 13:37:05.878304 osdx ubnt-cfgd[848958]: inactive Jul 24 13:37:05.891063 osdx cfgd[1923]: [833831]must validation for [system strong-password] was skipped Jul 24 13:37:05.891140 osdx cfgd[1923]: [833831]must validation for [system login user admin role] was skipped Jul 24 13:37:05.907244 osdx WARNING[848964]: Short keyboard patterns are easy to guess. Jul 24 13:37:05.907295 osdx INFO[848964]: Suggestions: Jul 24 13:37:05.907343 osdx INFO[848964]: Add another word or two. Uncommon words are better. Jul 24 13:37:05.907371 osdx INFO[848964]: Use a longer keyboard pattern with more turns. Jul 24 13:37:05.907399 osdx INFO[848964]: Crack times (passwords per time): Jul 24 13:37:05.907424 osdx INFO[848964]: 100 per hour: centuries Jul 24 13:37:05.907446 osdx INFO[848964]: 10 per second: 3 months Jul 24 13:37:05.907504 osdx INFO[848964]: 10.000 per second: 3 hours Jul 24 13:37:05.907530 osdx INFO[848964]: 10.000.000.000 per second: less than a second Jul 24 13:37:05.915128 osdx INFO[848967]: FRR daemons did not change Jul 24 13:37:05.915355 osdx cfgd[1923]: Execute action [end] for node [system ntp] Jul 24 13:37:05.965186 osdx systemd[1]: Starting ntpsec.service - Network Time Service... Jul 24 13:37:05.973866 osdx ntpd[848974]: INIT: ntpd ntpsec-1.2.2+2-g1f9c114: Starting Jul 24 13:37:05.974213 osdx ntp-systemd-wrapper[848974]: 2026-07-24T13:37:05 ntpd[848974]: INIT: ntpd ntpsec-1.2.2+2-g1f9c114: Starting Jul 24 13:37:05.974213 osdx ntp-systemd-wrapper[848974]: 2026-07-24T13:37:05 ntpd[848974]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec Jul 24 13:37:05.973886 osdx ntpd[848974]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec Jul 24 13:37:05.974614 osdx systemd[1]: Started ntpsec.service - Network Time Service. Jul 24 13:37:05.976494 osdx ntpd[848976]: INIT: precision = 0.054 usec (-24) Jul 24 13:37:05.977061 osdx ntpd[848976]: INIT: successfully locked into RAM Jul 24 13:37:05.977078 osdx ntpd[848976]: CONFIG: readconfig: parsing file: /etc/ntpsec/ntp.conf Jul 24 13:37:05.977120 osdx ntpd[848976]: AUTH: authreadkeys: reading /etc/ntp.keys Jul 24 13:37:05.977283 osdx ntpd[848976]: AUTH: authreadkeys: added 1 keys Jul 24 13:37:05.977330 osdx ntpd[848976]: INIT: Using SO_TIMESTAMPNS(ns) Jul 24 13:37:05.977345 osdx ntpd[848976]: IO: Listen and drop on 0 v6wildcard [::]:123 Jul 24 13:37:05.977357 osdx ntpd[848976]: IO: Listen and drop on 1 v4wildcard 0.0.0.0:123 Jul 24 13:37:05.977456 osdx ntpd[848976]: IO: Listen normally on 2 lo 127.0.0.1:123 Jul 24 13:37:05.977471 osdx ntpd[848976]: IO: Listen normally on 3 lo [::1]:123 Jul 24 13:37:05.977487 osdx ntpd[848976]: IO: Listening on routing socket on fd #20 for interface updates Jul 24 13:37:05.977492 osdx ntpd[848976]: INIT: MRU 10922 entries, 13 hash bits, 65536 bytes Jul 24 13:37:05.977549 osdx ntpd[848976]: INIT: OpenSSL 3.0.19 27 Jan 2026, 30000130 Jul 24 13:37:05.978032 osdx ntpd[848976]: NTSc: Using system default root certificates. Jul 24 13:37:05.985503 osdx cfgd[1923]: [833831]Completed change to active configuration Jul 24 13:37:05.985933 osdx OSDxCLI[833831]: pam_unix(cli:session): session closed for user admin Jul 24 13:37:05.986369 osdx OSDxCLI[833831]: User 'admin' committed the configuration. Jul 24 13:37:06.030493 osdx OSDxCLI[833831]: User 'admin' left the configuration menu. Jul 24 13:37:06.172550 osdx OSDxCLI[833831]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)