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 U2FsdGVkX19NyVuJbmBn0ABhuTBprpSJpUPw7Sybybo= 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 U2FsdGVkX19NyVuJbmBn0PzRTTo/GbAQQq6OW6IXyi8=
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 U2FsdGVkX19tV8yQy36x8+p89FjhN7+KMioSouwuKug=
Step 3: Run command system journal show | tail -n 1000
at DUT0
and expect this output:
Show output
Jun 23 10:22:38.000193 osdx systemd-timedated[373628]: Changed local time to Mon 2025-06-23 10:22:38 UTC Jun 23 10:22:38.001791 osdx OSDxCLI[392564]: User 'admin' executed a new command: 'set date 2025-06-23 10:22:38'. Jun 23 10:22:38.003029 osdx systemd-journald[391062]: Time jumped backwards, rotating. Jun 23 10:22:38.316427 osdx systemd-journald[391062]: Runtime Journal (/run/log/journal/76ff399027db4a3db160ed8651bac52f) is 2.0M, max 15.3M, 13.3M free. Jun 23 10:22:38.319042 osdx systemd-journald[391062]: Received client request to rotate journal, rotating. Jun 23 10:22:38.319109 osdx systemd-journald[391062]: Vacuuming done, freed 0B of archived journals from /run/log/journal/76ff399027db4a3db160ed8651bac52f. Jun 23 10:22:38.325869 osdx OSDxCLI[392564]: User 'admin' executed a new command: 'system journal clear'. Jun 23 10:22:38.539060 osdx OSDxCLI[392564]: User 'admin' executed a new command: 'system coredump delete all'. Jun 23 10:22:38.762663 osdx OSDxCLI[392564]: User 'admin' entered the configuration menu. Jun 23 10:22:38.822916 osdx OSDxCLI[392564]: User 'admin' added a new cfg line: 'set system console log-level info'. Jun 23 10:22:38.931448 osdx OSDxCLI[392564]: User 'admin' added a new cfg line: 'set system strong-password level 0'. Jun 23 10:22:39.006721 osdx OSDxCLI[392564]: User 'admin' added a new cfg line: 'set system strong-password display'. Jun 23 10:22:39.116119 osdx OSDxCLI[392564]: User 'admin' added a new cfg line: 'show working'. Jun 23 10:22:39.181974 osdx INFO[393814]: FRR daemons did not change Jun 23 10:22:39.182748 osdx modulelauncher[1302]: + Received data: ['392564', 'osdx.utils.xos', 'set_console_log_level', 'info'] Jun 23 10:22:39.200618 osdx OSDxCLI[392564]: Signal 10 received Jun 23 10:22:39.212694 osdx cfgd[1453]: [392564]Completed change to active configuration Jun 23 10:22:39.214650 osdx OSDxCLI[392564]: User 'admin' committed the configuration. Jun 23 10:22:39.236239 osdx OSDxCLI[392564]: User 'admin' left the configuration menu. Jun 23 10:22:39.401084 osdx OSDxCLI[392564]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jun 23 10:22:39.401669 osdx OSDxCLI[392564]: pam_unix(cli:session): session closed for user admin Jun 23 10:22:39.402027 osdx OSDxCLI[392564]: User 'admin' entered the configuration menu. Jun 23 10:22:39.460650 osdx OSDxCLI[392564]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jun 23 10:22:39.461002 osdx cfgd[1453]: Execute action [syntax] for node [system ntp authentication-key 1] Jun 23 10:22:39.484810 osdx OSDxCLI[392564]: pam_unix(cli:session): session closed for user admin Jun 23 10:22:39.485134 osdx OSDxCLI[392564]: User 'admin' added a new cfg line: 'set system ntp authentication-key 1 md5 ******'. Jun 23 10:22:39.581602 osdx OSDxCLI[392564]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jun 23 10:22:39.589347 osdx OSDxCLI[392564]: pam_unix(cli:session): session closed for user admin Jun 23 10:22:39.589565 osdx OSDxCLI[392564]: User 'admin' added a new cfg line: 'show changes'. Jun 23 10:22:39.651367 osdx OSDxCLI[392564]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000) Jun 23 10:22:39.656066 osdx cfgd[1453]: [392564]must validation for [system strong-password] was skipped Jun 23 10:22:39.656116 osdx cfgd[1453]: [392564]must validation for [system login user admin role] was skipped Jun 23 10:22:39.668180 osdx WARNING[393840]: Short keyboard patterns are easy to guess. Jun 23 10:22:39.668216 osdx INFO[393840]: Suggestions: Jun 23 10:22:39.668240 osdx INFO[393840]: Add another word or two. Uncommon words are better. Jun 23 10:22:39.668259 osdx INFO[393840]: Use a longer keyboard pattern with more turns. Jun 23 10:22:39.668276 osdx INFO[393840]: Crack times (passwords per time): Jun 23 10:22:39.668292 osdx INFO[393840]: 100 per hour: centuries Jun 23 10:22:39.668309 osdx INFO[393840]: 10 per second: 3 months Jun 23 10:22:39.668358 osdx INFO[393840]: 10.000 per second: 3 hours Jun 23 10:22:39.668378 osdx INFO[393840]: 10.000.000.000 per second: less than a second Jun 23 10:22:39.673388 osdx INFO[393842]: FRR daemons did not change Jun 23 10:22:39.673840 osdx cfgd[1453]: Execute action [end] for node [system ntp] Jun 23 10:22:39.711345 osdx systemd[1]: Starting ntpsec.service - Network Time Service... Jun 23 10:22:39.716843 osdx ntpd[393849]: INIT: ntpd ntpsec-1.2.2+2-ga54c8dd: Starting Jun 23 10:22:39.716865 osdx ntpd[393849]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec Jun 23 10:22:39.717016 osdx ntp-systemd-wrapper[393849]: 2025-06-23T10:22:39 ntpd[393849]: INIT: ntpd ntpsec-1.2.2+2-ga54c8dd: Starting Jun 23 10:22:39.717016 osdx ntp-systemd-wrapper[393849]: 2025-06-23T10:22:39 ntpd[393849]: INIT: Command line: /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec Jun 23 10:22:39.717444 osdx systemd[1]: Started ntpsec.service - Network Time Service. Jun 23 10:22:39.718234 osdx cfgd[1453]: [392564]Completed change to active configuration Jun 23 10:22:39.719911 osdx ntpd[393851]: INIT: precision = 0.079 usec (-24) Jun 23 10:22:39.720355 osdx ntpd[393851]: INIT: successfully locked into RAM Jun 23 10:22:39.720369 osdx ntpd[393851]: CONFIG: readconfig: parsing file: /etc/ntpsec/ntp.conf Jun 23 10:22:39.720398 osdx ntpd[393851]: AUTH: authreadkeys: reading /etc/ntp.keys Jun 23 10:22:39.720525 osdx ntpd[393851]: AUTH: authreadkeys: added 1 keys Jun 23 10:22:39.720562 osdx ntpd[393851]: INIT: Using SO_TIMESTAMPNS(ns) Jun 23 10:22:39.720574 osdx ntpd[393851]: IO: Listen and drop on 0 v6wildcard [::]:123 Jun 23 10:22:39.720586 osdx ntpd[393851]: IO: Listen and drop on 1 v4wildcard 0.0.0.0:123 Jun 23 10:22:39.720817 osdx OSDxCLI[392564]: pam_unix(cli:session): session closed for user admin Jun 23 10:22:39.720940 osdx ntpd[393851]: IO: Listen normally on 2 lo 127.0.0.1:123 Jun 23 10:22:39.720954 osdx ntpd[393851]: IO: Listen normally on 3 lo [::1]:123 Jun 23 10:22:39.720970 osdx ntpd[393851]: IO: Listening on routing socket on fd #20 for interface updates Jun 23 10:22:39.720976 osdx ntpd[393851]: INIT: MRU 10922 entries, 13 hash bits, 65536 bytes Jun 23 10:22:39.721026 osdx OSDxCLI[392564]: User 'admin' committed the configuration. Jun 23 10:22:39.721027 osdx ntpd[393851]: INIT: Built with OpenSSL 3.0.11 19 Sep 2023, 300000b0 Jun 23 10:22:39.721029 osdx ntpd[393851]: INIT: Running with OpenSSL 3.0.14 4 Jun 2024, 300000e0 Jun 23 10:22:39.721406 osdx ntpd[393851]: NTSc: Using system default root certificates. Jun 23 10:22:39.737504 osdx OSDxCLI[392564]: User 'admin' left the configuration menu. Jun 23 10:22:39.870658 osdx OSDxCLI[392564]: pam_unix(cli:session): session opened for user admin(uid=1000) by admin(uid=1000)