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

Allow to fetch and apply certificates with root user read only access #7678

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

vivekshankar1
Copy link
Collaborator

🔩 Description: What code changed, and why?

Allow to fetch and apply certificates with root user read only access

If the user is trying to fetch a certificate from a root or local location with only read permission for the root, the certificate rotate command will fail to fetch the certificate

chef-automate cert-rotate --public-cert <public_cert> --private-cert <private_cert> --root-ca <root_ca>

In order to be able to get contents even if its readonly we will prefer executing commands over ssh to get the contents rather than doing scp

⛓️ Related Resources

https://chefio.atlassian.net/browse/SHIELD-224

👍 Definition of Done

👟 How to Build and Test the Change

✅ Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

📷 Screenshots, if applicable

Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
@netlify
Copy link

netlify bot commented Jan 20, 2023

👷 Deploy Preview for chef-automate processing.

Name Link
🔨 Latest commit c225d54
🔍 Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/63ca3255d2a1f00008a8b9bd

@sonarcloud
Copy link

sonarcloud bot commented Jan 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@vivek-yadav vivek-yadav merged commit aa7f3b4 into main Jan 27, 2023
@vivek-yadav vivek-yadav deleted the vshankar/rotate-cert-scp-fix-readonly-file branch January 27, 2023 13:16
dishanktiwari2501 pushed a commit that referenced this pull request Jan 30, 2023
…#7678)

* readonly file scp fix error

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* removed sudo

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* added sudo while cat

Signed-off-by: Vivek Shankar <vshankar@progress.com>

Signed-off-by: Vivek Shankar <vshankar@progress.com>
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.

None yet

4 participants