Skip to content

Added Password Hardening tests cases - #1

Open
davidpil2002 wants to merge 10 commits into
masterfrom
passw_hardening
Open

Added Password Hardening tests cases#1
davidpil2002 wants to merge 10 commits into
masterfrom
passw_hardening

Conversation

@davidpil2002

@davidpil2002 davidpil2002 commented Mar 31, 2022

Copy link
Copy Markdown
Owner

Description of PR

Summary:
Added Password Hardening Tests according to HLD Test Plan

Context: By enabling the new Password Hardening feature and configured policies, the user will be enforce to use "strong" passwords according to the policies configured.

The new tests cases will cover all the possible password policies with good and bad cases, including:

  • Perform show command
  • Perform config command
  • Verify default values of the feature
  • Enable/Disable the feature
  • Test all passw policies available:
    • Configure passw policy classes of every existing types
    • Configure passw policy min using different valid values
    • Configure passw policy age expiration using different valid values
    • Configure passw policy age warning using different valid values
    • Configure passw policy username-password-match
    • Configure passw policy history using different valid values
      Note
      After creating a new policy is necessary to set a new password for a user to verify that the policy matches the configured.
      The set configuration should be validated using the show command.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • [*] Test case(new/improvement)

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Add new tests cases for testing the feature Password Hardening.

How did you do it?

There are 10 test scenarios each one of them config different policies and test the case with good(strong) passwords and bad(weak) passwords expecting results according to the configuration and the flow.
The configuration is done by using sonic-cli, sending different "config" commands.
In addition, the test is testing that the configuration in PAM files in the system change according to the expected.
The expected files were saved in the directory "sample".

How did you verify/test it?

New tests cases passed

Any platform specific information?

N/A

Supported testbed topology if it's a new test case?

any

Documentation

Link of HLD including feature design and Test plan:
https://github.com/Azure/SONiC/blob/master/doc/passw_hardening/hld_password_hardening.md

Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
…ead try exp, use show_and_parse build-in function instead coding a new one
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/test_passw_hardening.py Outdated
Comment thread tests/passw_hardening/conftest.py Outdated
Comment thread tests/passw_hardening/conftest.py Outdated
Comment thread tests/passw_hardening/conftest.py
@davidpil2002 davidpil2002 changed the title password hardening tests Added Password Hardening tests cases Apr 7, 2022
@davidpil2002
davidpil2002 force-pushed the passw_hardening branch 2 times, most recently from f016452 to 66d3262 Compare May 1, 2022 12:04
davidpil2002 and others added 4 commits September 29, 2022 18:20
…ng explicity the feature disable

Change-Id: Iea5b589290a7900b0585286ff3ef336f612e1b27
… loop when calling fixtures

Change-Id: I43cf89ad498405521723e7fb164ef46929095b6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants