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 Thu 2024-01-25 00:38:33 UTC, end at Thu 2024-01-25 00:38:36 UTC. -- Jan 25 00:38:33.354640 osdx systemd-journald[1486]: Runtime journal (/run/log/journal/6c43fcb6d98c40f095ee4a4601056b4b) is 2.0M, max 16.0M, 14.0M free. Jan 25 00:38:33.373468 osdx OSDxCLI[28118]: User 'admin' executed a new command: 'system journal clear'. Jan 25 00:38:33.962600 osdx osdx-coredump[4982]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... Jan 25 00:38:33.972278 osdx OSDxCLI[28118]: User 'admin' executed a new command: 'system coredump delete all'. Jan 25 00:38:34.948920 osdx OSDxCLI[28118]: User 'admin' entered the configuration menu. Jan 25 00:38:35.093717 osdx OSDxCLI[28118]: User 'admin' added a new cfg line: 'set system console log-level info'. Jan 25 00:38:35.185028 osdx OSDxCLI[28118]: User 'admin' added a new cfg line: 'set system strong-password level 0'. Jan 25 00:38:35.275886 osdx OSDxCLI[28118]: User 'admin' added a new cfg line: 'set system strong-password display'. Jan 25 00:38:35.375511 osdx cfgd[1112]: [28118]Completed change to active configuration Jan 25 00:38:35.380136 osdx OSDxCLI[28118]: User 'admin' committed the configuration. Jan 25 00:38:35.405688 osdx OSDxCLI[28118]: User 'admin' left the configuration menu. Jan 25 00:38:35.584084 osdx zebra[1048]: [RZ3YY-GPH41][EC 100663310] snmp[warning]: Warning: Failed to connect to the agentx master agent ([NIL]): Jan 25 00:38:35.656966 osdx OSDxCLI[28118]: User 'admin' entered the configuration menu. Jan 25 00:38:35.790615 osdx OSDxCLI[28118]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 qwER43@!'. Jan 25 00:38:35.895007 osdx WARNING[5023]: Short keyboard patterns are easy to guess. Jan 25 00:38:35.895427 osdx INFO[5023]: Suggestions: Jan 25 00:38:35.895545 osdx INFO[5023]: Add another word or two. Uncommon words are better. Jan 25 00:38:35.895655 osdx INFO[5023]: Use a longer keyboard pattern with more turns. Jan 25 00:38:35.895755 osdx INFO[5023]: Crack times (passwords per time): Jan 25 00:38:35.895872 osdx INFO[5023]: 100 per hour: centuries Jan 25 00:38:35.895987 osdx INFO[5023]: 10 per second: 3.0 months Jan 25 00:38:35.896086 osdx INFO[5023]: 10.000 per second: 3.0 hours Jan 25 00:38:35.896184 osdx INFO[5023]: 10.000.000.000 per second: less than a second Jan 25 00:38:35.940521 osdx systemd[1]: Starting Network Time Service... Jan 25 00:38:35.950060 osdx ntpd[5030]: ntpd 4.2.8p12@1.3728-o (1): Starting Jan 25 00:38:35.950478 osdx ntpd[5030]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:112 Jan 25 00:38:35.951131 osdx systemd[1]: Started Network Time Service. Jan 25 00:38:35.954024 osdx cfgd[1112]: [28118]Completed change to active configuration Jan 25 00:38:35.958919 osdx ntpd[5036]: proto: precision = 0.070 usec (-24) Jan 25 00:38:35.959610 osdx ntpd[5036]: Listen and drop on 0 v6wildcard [::]:123 Jan 25 00:38:35.959723 osdx ntpd[5036]: Listen and drop on 1 v4wildcard 0.0.0.0:123 Jan 25 00:38:35.960451 osdx ntpd[5036]: Listen normally on 2 lo 127.0.0.1:123 Jan 25 00:38:35.960573 osdx ntpd[5036]: Listen normally on 3 lo [::1]:123 Jan 25 00:38:35.960689 osdx ntpd[5036]: Listening on routing socket on fd #20 for interface updates Jan 25 00:38:35.960788 osdx ntpd[5036]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Jan 25 00:38:35.961079 osdx ntpd[5036]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Jan 25 00:38:35.963026 osdx OSDxCLI[28118]: User 'admin' committed the configuration. Jan 25 00:38:36.002090 osdx OSDxCLI[28118]: User 'admin' left the configuration menu.