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 2024-04-03 20:15:33 UTC, end at Wed 2024-04-03 20:15:34 UTC. -- Apr 03 20:15:33.359336 osdx systemd-journald[625]: Runtime journal (/run/log/journal/c88512c9e850498898bc11ea5f3658d6) is 2.0M, max 16.0M, 14.0M free. Apr 03 20:15:33.373173 osdx OSDxCLI[18738]: User 'admin' executed a new command: 'system journal clear'. Apr 03 20:15:33.780076 osdx OSDxCLI[18738]: User 'admin' entered the configuration menu. Apr 03 20:15:33.886679 osdx OSDxCLI[18738]: User 'admin' added a new cfg line: 'set system console log-level info'. Apr 03 20:15:34.006066 osdx OSDxCLI[18738]: User 'admin' added a new cfg line: 'set system strong-password level 0'. Apr 03 20:15:34.099376 osdx OSDxCLI[18738]: User 'admin' added a new cfg line: 'set system strong-password display'. Apr 03 20:15:34.200012 osdx modulelauncher[933]: + Received data: ['18738', 'osdx.utils.xos', 'set_console_log_level', 'info'] Apr 03 20:15:34.211726 osdx OSDxCLI[18738]: Signal 10 received Apr 03 20:15:34.212346 osdx cfgd[1091]: [18738]Completed change to active configuration Apr 03 20:15:34.215498 osdx OSDxCLI[18738]: User 'admin' committed the configuration. Apr 03 20:15:34.242581 osdx OSDxCLI[18738]: User 'admin' left the configuration menu. Apr 03 20:15:34.476439 osdx OSDxCLI[18738]: pam_unix(cli:session): session opened for user admin by admin(uid=1000) Apr 03 20:15:34.477190 osdx OSDxCLI[18738]: pam_unix(cli:session): session closed for user admin Apr 03 20:15:34.477509 osdx OSDxCLI[18738]: User 'admin' entered the configuration menu. Apr 03 20:15:34.585218 osdx OSDxCLI[18738]: pam_unix(cli:session): session opened for user admin by admin(uid=1000) Apr 03 20:15:34.611479 osdx OSDxCLI[18738]: pam_unix(cli:session): session closed for user admin Apr 03 20:15:34.611800 osdx OSDxCLI[18738]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 qwER43@!'. Apr 03 20:15:34.705393 osdx OSDxCLI[18738]: pam_unix(cli:session): session opened for user admin by admin(uid=1000) Apr 03 20:15:34.738593 osdx WARNING[22859]: Short keyboard patterns are easy to guess. Apr 03 20:15:34.739091 osdx INFO[22859]: Suggestions: Apr 03 20:15:34.739246 osdx INFO[22859]: Add another word or two. Uncommon words are better. Apr 03 20:15:34.739385 osdx INFO[22859]: Use a longer keyboard pattern with more turns. Apr 03 20:15:34.739532 osdx INFO[22859]: Crack times (passwords per time): Apr 03 20:15:34.739670 osdx INFO[22859]: 100 per hour: centuries Apr 03 20:15:34.739807 osdx INFO[22859]: 10 per second: 3.0 months Apr 03 20:15:34.739963 osdx INFO[22859]: 10.000 per second: 3.0 hours Apr 03 20:15:34.740097 osdx INFO[22859]: 10.000.000.000 per second: less than a second Apr 03 20:15:34.777420 osdx systemd[1]: Starting Network Time Service... Apr 03 20:15:34.784974 osdx ntpd[22866]: ntpd 4.2.8p12@1.3728-o (1): Starting Apr 03 20:15:34.785229 osdx ntpd[22866]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:112 Apr 03 20:15:34.785641 osdx systemd[1]: Started Network Time Service. Apr 03 20:15:34.787597 osdx cfgd[1091]: [18738]Completed change to active configuration Apr 03 20:15:34.790717 osdx ntpd[22872]: proto: precision = 0.042 usec (-24) Apr 03 20:15:34.791185 osdx ntpd[22872]: Listen and drop on 0 v6wildcard [::]:123 Apr 03 20:15:34.791272 osdx ntpd[22872]: Listen and drop on 1 v4wildcard 0.0.0.0:123 Apr 03 20:15:34.791851 osdx ntpd[22872]: Listen normally on 2 lo 127.0.0.1:123 Apr 03 20:15:34.791955 osdx ntpd[22872]: Listen normally on 3 lo [::1]:123 Apr 03 20:15:34.792037 osdx ntpd[22872]: Listening on routing socket on fd #20 for interface updates Apr 03 20:15:34.792113 osdx ntpd[22872]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Apr 03 20:15:34.792181 osdx ntpd[22872]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Apr 03 20:15:34.793446 osdx OSDxCLI[18738]: pam_unix(cli:session): session closed for user admin Apr 03 20:15:34.793688 osdx OSDxCLI[18738]: User 'admin' committed the configuration. Apr 03 20:15:34.817973 osdx OSDxCLI[18738]: User 'admin' left the configuration menu. Apr 03 20:15:34.966115 osdx OSDxCLI[18738]: pam_unix(cli:session): session opened for user admin by admin(uid=1000)