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

Merge knife-windows into chef #9354

Closed
wants to merge 58 commits into from
Closed

Merge knife-windows into chef #9354

wants to merge 58 commits into from

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Feb 7, 2020

Ship the knife-windows plugin directly in Chef.

Signed-off-by: Tim Smith tsmith@chef.io

@tas50 tas50 requested review from a team as code owners February 7, 2020 02:38
@tas50 tas50 force-pushed the knife_windows branch 2 times, most recently from c7cd96b to 7df879b Compare February 13, 2020 20:17

begin
ui.info "Adding certificate to the Windows Certificate Store..."
result = `powershell.exe -Command " '#{config[:cert_passphrase]}' | certutil -importPFX '#{file_path}' AT_KEYEXCHANGE"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this something we want to rewrite to use the win32-cert gem instead or is shelling out aceptable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the least we should use a proper shellout

begin
if config[:cert_install]
config[:cert_passphrase] = get_cert_passphrase unless config[:cert_passphrase]
result = `powershell.exe -Command " '#{config[:cert_passphrase]}' | certutil -importPFX '#{config[:cert_install]}' AT_KEYEXCHANGE"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same for this one. Should we do this via the win32-cert or simply refactor it to use a shellout


require_relative "../knife"
require_relative "winrm_knife_base" # WinrmCommandSharedFunctions
require_relative "winrm_session"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These need to get moved into the deps block to match the work I did in knife-windows

@tas50 tas50 added the Status: Waiting on Contributor A pull request that has unresolved requested actions from the author. label Feb 24, 2020
@tas50 tas50 changed the title WIP: Merge knife-windows into chef Merge knife-windows into chef Feb 26, 2020
@tas50 tas50 force-pushed the knife_windows branch 3 times, most recently from b3b01aa to 43951b9 Compare February 28, 2020 05:07
@tas50 tas50 self-assigned this Mar 3, 2020
@tas50 tas50 requested a review from a team as a code owner June 26, 2020 15:56
lib/chef/knife/winrm.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@phiggins phiggins left a comment

Choose a reason for hiding this comment

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

There is a lot here and I didn't look over all of it very closely.

tas50 and others added 26 commits September 25, 2020 18:35
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>
'
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50
Copy link
Contributor Author

tas50 commented Feb 13, 2021

Closing this so we can do it the correct way post #9354

@tas50 tas50 deleted the knife_windows branch April 2, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Windows Status: Waiting on Contributor A pull request that has unresolved requested actions from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants