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 Wed 2023-12-13 02:15:20 UTC, end at Wed 2023-12-13 02:15:23 UTC. -- Dec 13 02:15:20.432333 osdx systemd-journald[1450]: Runtime journal (/run/log/journal/fa37e9b1f0b54640986d40edb905b319) is 2.0M, max 16.0M, 14.0M free. Dec 13 02:15:20.449904 osdx OSDxCLI[11272]: User 'admin' executed a new command: 'system journal clear'. Dec 13 02:15:21.074539 osdx osdx-coredump[25886]: Deleting all coredumps in /opt/vyatta/etc/config/coredump... Dec 13 02:15:21.085245 osdx OSDxCLI[11272]: User 'admin' executed a new command: 'system coredump delete all'. Dec 13 02:15:21.513903 osdx zebra[1040]: [RZ3YY-GPH41][EC 100663310] snmp[warning]: Warning: Failed to connect to the agentx master agent ([NIL]): Dec 13 02:15:22.126453 osdx OSDxCLI[11272]: User 'admin' entered the configuration menu. Dec 13 02:15:22.254997 osdx OSDxCLI[11272]: User 'admin' added a new cfg line: 'set system console log-level info'. Dec 13 02:15:22.395495 osdx OSDxCLI[11272]: User 'admin' added a new cfg line: 'set system strong-password level 0'. Dec 13 02:15:22.500474 osdx OSDxCLI[11272]: User 'admin' added a new cfg line: 'set system strong-password display'. Dec 13 02:15:22.624520 osdx cfgd[1102]: [11272]Completed change to active configuration Dec 13 02:15:22.628152 osdx OSDxCLI[11272]: User 'admin' committed the configuration. Dec 13 02:15:22.661753 osdx OSDxCLI[11272]: User 'admin' left the configuration menu. Dec 13 02:15:22.950468 osdx OSDxCLI[11272]: User 'admin' entered the configuration menu. Dec 13 02:15:23.094542 osdx OSDxCLI[11272]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 qwER43@!'. Dec 13 02:15:23.266850 osdx WARNING[25927]: Short keyboard patterns are easy to guess. Dec 13 02:15:23.267433 osdx INFO[25927]: Suggestions: Dec 13 02:15:23.267589 osdx INFO[25927]: Add another word or two. Uncommon words are better. Dec 13 02:15:23.267741 osdx INFO[25927]: Use a longer keyboard pattern with more turns. Dec 13 02:15:23.267873 osdx INFO[25927]: Crack times (passwords per time): Dec 13 02:15:23.268025 osdx INFO[25927]: 100 per hour: centuries Dec 13 02:15:23.268163 osdx INFO[25927]: 10 per second: 3.0 months Dec 13 02:15:23.268296 osdx INFO[25927]: 10.000 per second: 3.0 hours Dec 13 02:15:23.268430 osdx INFO[25927]: 10.000.000.000 per second: less than a second Dec 13 02:15:23.313319 osdx systemd[1]: Starting Network Time Service... Dec 13 02:15:23.324658 osdx ntpd[25934]: ntpd 4.2.8p12@1.3728-o (1): Starting Dec 13 02:15:23.324967 osdx ntpd[25934]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:112 Dec 13 02:15:23.325438 osdx systemd[1]: Started Network Time Service. Dec 13 02:15:23.327442 osdx cfgd[1102]: [11272]Completed change to active configuration Dec 13 02:15:23.330850 osdx ntpd[25940]: proto: precision = 0.042 usec (-24) Dec 13 02:15:23.331383 osdx ntpd[25940]: Listen and drop on 0 v6wildcard [::]:123 Dec 13 02:15:23.331484 osdx ntpd[25940]: Listen and drop on 1 v4wildcard 0.0.0.0:123 Dec 13 02:15:23.332050 osdx ntpd[25940]: Listen normally on 2 lo 127.0.0.1:123 Dec 13 02:15:23.332141 osdx ntpd[25940]: Listen normally on 3 lo [::1]:123 Dec 13 02:15:23.332229 osdx ntpd[25940]: Listening on routing socket on fd #20 for interface updates Dec 13 02:15:23.332304 osdx ntpd[25940]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Dec 13 02:15:23.332374 osdx ntpd[25940]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Dec 13 02:15:23.333964 osdx OSDxCLI[11272]: User 'admin' committed the configuration. Dec 13 02:15:23.372477 osdx OSDxCLI[11272]: User 'admin' left the configuration menu.