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

CFINSPEC-94: Enhance user resource #5959

Merged
merged 22 commits into from
Apr 6, 2022
Merged

Conversation

ahasunos
Copy link
Contributor

Signed-off-by: Sonu Saha sonu.saha@progress.com

Related Issue

CFINSPEC-94: Enhance user resource

Description

Using the user resource
Given that the user has called the user resource
then the resource allows to test with new matchers and properties.

New Matchers:

  • belong_to_group
  • belong_to_primary_group
  • have_uid
  • have_home_directory
  • have_login_shell
  • have_authorized_key

New Properties

  • encrypted_password
  • minimum_days_between_password_change
  • maximum_days_between_password_change

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
…ge and maximum_days_between_password_change

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
@ahasunos ahasunos requested review from a team as code owners March 28, 2022 23:30
@netlify
Copy link

netlify bot commented Mar 28, 2022

Deploy Preview for chef-inspec ready!

Name Link
🔨 Latest commit 9f78156
🔍 Latest deploy log https://app.netlify.com/sites/chef-inspec/deploys/624d8b6e72854e0009b828bd
😎 Deploy Preview https://deploy-preview-5959--chef-inspec.netlify.app/inspec/resources/user
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the Documentation ZH multi-repo label for the docs-team label Mar 28, 2022
@chef-expeditor
Copy link
Contributor

Hello ahasunos! Thanks for the pull request!

Here is what will happen next:

  1. Your PR will be reviewed by the maintainers.
  2. Possible Outcomes
    a. If everything looks good, one of them will approve it, and your PR will be merged.
    b. The maintainer may request follow-on work (e.g. code fix, linting, etc). We would encourage you to address this work in 2-3 business days to keep the conversation going and to get your contribution in sooner.
    c. Cases exist where a PR is neither aligned to Chef InSpec's product roadmap, or something the team can own or maintain long-term. In these cases, the maintainer will provide justification and close out the PR.

Thank you for contributing!

@ahasunos ahasunos self-assigned this Mar 29, 2022
@ahasunos ahasunos added the Component: Core Resources Resources shipped with InSpec. label Mar 29, 2022
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Copy link
Contributor

@clintoncwolfe clintoncwolfe left a comment

Choose a reason for hiding this comment

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

Need to change the way that you are reading the auth keys file, but otherwise looks pretty good.

lib/inspec/resources/users.rb Outdated Show resolved Hide resolved
lib/inspec/resources/users.rb Outdated Show resolved Hide resolved
lib/matchers/matchers.rb Outdated Show resolved Hide resolved
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
…include in user

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
…he file with inspec.file

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
Copy link
Contributor

@clintoncwolfe clintoncwolfe left a comment

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Copy link
Contributor

@dkumaras dkumaras left a comment

Choose a reason for hiding this comment

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

@ahasunos - please check the suggested review changes and confirm.

@ahasunos
Copy link
Contributor Author

ahasunos commented Apr 4, 2022

@dkumaras It seems you missed to sign-off the commit which is leading to the failure of DCO test.

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
@dkumaras
Copy link
Contributor

dkumaras commented Apr 5, 2022

ple

@ahasunos , @Vasu1105 , @Nik08 , @clintoncwolfe - I have introduced a new formatting for the parameters value description following a code block. Pls do check and share your thoughts.

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
Copy link
Contributor

@dkumaras dkumaras left a comment

Choose a reason for hiding this comment

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

Pls confirm the changes

@clintoncwolfe clintoncwolfe merged commit 5b6540c into main Apr 6, 2022
@clintoncwolfe clintoncwolfe deleted the ss/enhance-user-resource branch April 6, 2022 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Resources Resources shipped with InSpec. Documentation ZH multi-repo label for the docs-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants