-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding new test case for default password change after initial boot #6863
Conversation
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
This pull request introduces 1 alert when merging e361b27 into b2b45b7 - view on LGTM.com new alerts:
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog. |
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
This pull request introduces 1 alert when merging c201990 into b2b45b7 - view on LGTM.com new alerts:
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog. |
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
according to California law.
Copy my comments from sonic-net/sonic-buildimage#12678 : I create following PR to validate this change: As you can see, after enable this feature, every UT failed in 'prepare testbed' stage: I'm didn't check detail of why that step failed, but I think that step failed because current code trying to login but not reset password. I suggest fix UT break issue in sonic-mgmt before this PR merge. the fix can reuse the logic in check_install.py. Current UT PR only add new UT to cover this feature, but existed UTs will break when this feature enabled. |
@liuh-80 , Hi, this test is meant to be standalone, I am adding the support for regression in another PR (the stage of connecting to the engine and handling the password expire) |
.../platform_tests/test_first_time_boot_password_change/test_first_time_boot_password_change.py
Show resolved
Hide resolved
Thanks, please also add that PR to the PR table in HLD PR description: |
according to California law.
according to California law.
according to California law.
according to California law.
according to California law.
according to California law.
according to California law.
according to California law.
according to California law.
@liuh-80, I added an option "feature_enabled" that will be set to False as default and once set to True it will run the test otherwise it will skip the tests :) |
according to California law.
@azmyali98 can you please also go over the pre check failures and try to solve even if not part of your code changes? |
according to California law.
according to California law.
@liat-grozovik it is fixed |
/azp run Azure.sonic-mgmt |
Azure Pipelines successfully started running 1 pipeline(s). |
@azmyali98 please review failures and if not related to the new test please retrigger until we can merge it. |
tests/platform_tests/test_first_time_boot_password_change/conftest.py
Outdated
Show resolved
Hide resolved
tests/platform_tests/test_first_time_boot_password_change/conftest.py
Outdated
Show resolved
Hide resolved
tests/platform_tests/test_first_time_boot_password_change/onie_install.sh
Show resolved
Hide resolved
according to California law.
@wangxin @azmyali98 can you please confirm all comments were addressed and we are good to merge this test? |
Default password change after initial boot.
Description of PR
Summary:
According to a new law passed on California state, users are obligated to change default password to a new more sophisticated password. Passwords for default users such as 'admin' are no longer accepted and must be changed after initial boot.
Test Case:
We are introducing a new test case that validates expiring default passwords after initial boot of the image given to the test. In the test case, we take a path to a binary image from the parameter --restore_to_image that contains a new image to install. We install the given image from ONIE using 'onie-nos-install' and this manufacturing the switch to this new image, after the system is installed from ONIE we validate that the expiring message appears on the first login of the system, we configure a sophisticated password predefined in the test and validating the ability to login with this new password.
As a test clean-up, we reconfigure the original password that the system booted with to allow regression to continue running.
Please read the documentation specified in the head of the test to know more about limitations and prerequisites using this test and plan carefully where to run this test. It is recommended to run it at end of your regression run.
Important Note
we validate the case for the given image in the parameter --restore_to_image not the current installed image!
Requirements to run the test
Type of change
Approach
What is the motivation for this PR?
Validating default password change after initial boot for default user such as admin.
How did you do it?
Supported testbed topology if it's a new test case?
any topology is supported.
Documentation
this test case is relevant for this HLD: sonic-net/SONiC#1077