Skip to content
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

Add California Law HLD #1077

Merged
merged 5 commits into from
Oct 26, 2022
Merged

Add California Law HLD #1077

merged 5 commits into from
Oct 26, 2022

Conversation

andriydnvd
Copy link
Contributor

@andriydnvd andriydnvd commented Sep 6, 2022

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 6, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: andriydnvd / name: Andriy Dobush (8a02c1d)

Copy link
Contributor Author

@andriydnvd andriydnvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added changes accordingly to review comments

Copy link
Contributor Author

@andriydnvd andriydnvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes done

Copy link
Collaborator

@lihuay lihuay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please insert a hyper link to the law being addressed as a reference

https://leginfo.legislature.ca.gov/faces/billTextClient.xhtml?bill_id=201720180SB327

and also update the folder name to California-SB237

Copy link
Contributor Author

@andriydnvd andriydnvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated doc, pls check

@liat-grozovik
Copy link
Collaborator

@lihuay would you mind to merge or should we wait for additional reviewers?

@lihuay lihuay merged commit 36f17e0 into sonic-net:master Oct 26, 2022
@liuh-80
Copy link
Contributor

liuh-80 commented Oct 27, 2022

@andriydnvd, what's the plan implement feature in sonic-buildimage repo?
Currently there are sonic-mgmt test case, and some validation pipelines depends on default password. so you may also need improve those test case and validation pipelines to handle password change.

@zhangyanzhao
Copy link
Collaborator

@andriydnvd can you please add the code PR into this HLD PR by referring to #806 ? Thanks.

@andriydnvd
Copy link
Contributor Author

andriydnvd commented Nov 14, 2022

New password:
Retype new password:
passwd: password updated successfully
Connection to sonic-switch closed.
Copy link
Contributor

@qiluo-msft qiluo-msft Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connection to sonic-switch closed.

Is it true that updated successfully will logout the user immediately? Is it possible to change the behavor and let user continue with normal shell prompt?

- Support several default users
- Force to change password after image update
- Don't affect [Password hardening feature](https://github.com/sonic-net/SONiC/blob/master/doc/passw_hardening/hld_password_hardening.md)
- Expire password only for user that can do login. (login shell is /bin/bash or /bin/sh)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash

how about zsh or fish?

pam_unix_account module retrieves password aging information and verifies that the password and the user's account have not expired.

Note:
See linux [3rd Party Components](#rdPartyComponents) for more description.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(#rdPartyComponents)

This markdown link does not work.


##### Flow diagram:

![California law flow](California-SB237_diagram.jpg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In diagram:
Default user_1 -> user_1


#### 1.15.1. <a name='PWForceExpire'></a>PW Force Expiration

Tool for password expiration:
Copy link
Contributor

@qiluo-msft qiluo-msft Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expiration

I am considering more use cases which requiring CLI:

  1. Force all user password expiring
  2. Force all user password not expiring any more

In real life, the manufactory and customers are login the device for different purpose:

  1. the image is build with CHANGE_DEFAULT_PASSWORD turn on.
  2. the manufactory test team will login and change password, and continue test
  3. (missing) At the end of test, the manufactory test team will force all user password expiring
  4. customers got the device, and login, and change password
  5. customer start use it in normal way.

In step 2, the manufactory team may have no motivation to change to a brand new password, is it possible for them to change password to the same password as previous one?

wangxin pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Mar 17, 2023
…6863)

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?
1. taking a path to an image
2. manufacturing the switch to this image by uploading bin to ONIE and install it from ONIE
3. using Pexpect python module to communicate with the switch and validate expiring password message to appear after the first login.
4. suggesting a new password and then reconnecting to switch and validating that there is no expiring message to reappear
5. As part of clean-up we enforce the original password.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants