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 strong-password level 2 set system ntp authentication-key 1 md5 a<dqaz!3?sv
Note
This password has a score of 4.
Step 2: Expect a failure in the following command:
Set the following configuration in DUT0
:
set system ntp authentication-key 1 md5 12345678
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 console log-level info set system strong-password level 0 set system strong-password display
Step 2: Set the following configuration in DUT0
:
set system ntp authentication-key 1 md5 qwER43@!
Step 3: Run command system journal show | tail -n 1000
at DUT0
and expect this output:
Show output
-- Logs begin at Tue 2024-02-13 16:16:32 UTC, end at Tue 2024-02-13 16:16:35 UTC. -- Feb 13 16:16:32.373085 osdx systemd-journald[1694]: Runtime journal (/run/log/journal/80d0e0b412184be1883eb13133ae3f69) is 2.0M, max 16.0M, 14.0M free. Feb 13 16:16:32.391630 osdx OSDxCLI[20216]: User 'admin' executed a new command: 'system journal clear'. Feb 13 16:16:32.940092 osdx osdx-coredump[21732]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... Feb 13 16:16:32.948172 osdx OSDxCLI[20216]: User 'admin' executed a new command: 'system coredump delete all'. Feb 13 16:16:33.918387 osdx OSDxCLI[20216]: User 'admin' entered the configuration menu. Feb 13 16:16:34.064452 osdx OSDxCLI[20216]: User 'admin' added a new cfg line: 'set system console log-level info'. Feb 13 16:16:34.181548 osdx OSDxCLI[20216]: User 'admin' added a new cfg line: 'set system strong-password level 0'. Feb 13 16:16:34.330360 osdx OSDxCLI[20216]: User 'admin' added a new cfg line: 'set system strong-password display'. Feb 13 16:16:34.455681 osdx cfgd[1320]: [20216]Completed change to active configuration Feb 13 16:16:34.460591 osdx OSDxCLI[20216]: User 'admin' committed the configuration. Feb 13 16:16:34.513921 osdx OSDxCLI[20216]: User 'admin' left the configuration menu. Feb 13 16:16:34.720761 osdx OSDxCLI[20216]: User 'admin' entered the configuration menu. Feb 13 16:16:34.831829 osdx OSDxCLI[20216]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 qwER43@!'. Feb 13 16:16:34.926965 osdx WARNING[21773]: Short keyboard patterns are easy to guess. Feb 13 16:16:34.927348 osdx INFO[21773]: Suggestions: Feb 13 16:16:34.927465 osdx INFO[21773]: Add another word or two. Uncommon words are better. Feb 13 16:16:34.927570 osdx INFO[21773]: Use a longer keyboard pattern with more turns. Feb 13 16:16:34.927671 osdx INFO[21773]: Crack times (passwords per time): Feb 13 16:16:34.927789 osdx INFO[21773]: 100 per hour: centuries Feb 13 16:16:34.927891 osdx INFO[21773]: 10 per second: 3.0 months Feb 13 16:16:34.927990 osdx INFO[21773]: 10.000 per second: 3.0 hours Feb 13 16:16:34.928088 osdx INFO[21773]: 10.000.000.000 per second: less than a second Feb 13 16:16:34.958939 osdx systemd[1]: Starting Network Time Service... Feb 13 16:16:34.967317 osdx ntpd[21780]: ntpd 4.2.8p12@1.3728-o (1): Starting Feb 13 16:16:34.967586 osdx ntpd[21780]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:112 Feb 13 16:16:34.968019 osdx systemd[1]: Started Network Time Service. Feb 13 16:16:34.969944 osdx cfgd[1320]: [20216]Completed change to active configuration Feb 13 16:16:34.973157 osdx ntpd[21786]: proto: precision = 0.041 usec (-24) Feb 13 16:16:34.973639 osdx ntpd[21786]: Listen and drop on 0 v6wildcard [::]:123 Feb 13 16:16:34.973725 osdx ntpd[21786]: Listen and drop on 1 v4wildcard 0.0.0.0:123 Feb 13 16:16:34.974280 osdx ntpd[21786]: Listen normally on 2 lo 127.0.0.1:123 Feb 13 16:16:34.974373 osdx ntpd[21786]: Listen normally on 3 lo [::1]:123 Feb 13 16:16:34.974455 osdx ntpd[21786]: Listening on routing socket on fd #20 for interface updates Feb 13 16:16:34.974528 osdx ntpd[21786]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Feb 13 16:16:34.974596 osdx ntpd[21786]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Feb 13 16:16:34.976229 osdx OSDxCLI[20216]: User 'admin' committed the configuration. Feb 13 16:16:35.000477 osdx OSDxCLI[20216]: User 'admin' left the configuration menu.