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

Run Communicator Prepare function during config #63

Merged

Conversation

lomeroe
Copy link
Contributor

@lomeroe lomeroe commented Oct 13, 2022

What this PR does / why we need it: Runs the Communicatore "Prepare" function during config. This function provides additional setup for the communicatore, for example, allowing auth via NTLM (i.e. the winrm_use_ntlm config parameter does not have an effect w/o running the Prepare function).

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

How Has This Been Tested?: Windows images created with/without winrm_use_ntlm boolean set.

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


@tuxtof tuxtof requested a review from wolfganghuse October 14, 2022 05:56
@wolfganghuse
Copy link
Contributor

wolfganghuse commented Oct 25, 2022

Hello @lomeroe I would like to work on your PR and add it to our next release... can you provide some more details how to test that switch ? Any prerequirements on the Windows-Deployment, needs NTLM be enabled through autounattend.xml ?
EDIT: Nevermind... managed to test it in my env by removing basic-auth from unattended.xml

@tuxtof tuxtof added the enhancement New feature or request label Oct 25, 2022
@tuxtof tuxtof merged commit 2be080a into nutanix-cloud-native:main Oct 25, 2022
@lomeroe
Copy link
Contributor Author

lomeroe commented Oct 25, 2022

basically, all that is needed is to ensure the winrm auth config has Basic set to false (which should be the default), and NTLM will be tried instead of cleartext/basic authentication

c:\windows\system32\winrm.cmd winrm/config/service/auth @{Basic="false"}

@wolfganghuse
Copy link
Contributor

Yes, that worked for my test… do you also experience problems (HTTP401) when using NTLM on Windows 2022?

@lomeroe
Copy link
Contributor Author

lomeroe commented Nov 4, 2022 via email

wolfganghuse added a commit to wolfganghuse/packer-plugin-nutanix that referenced this pull request Nov 7, 2022
* Update config.go (nutanix-cloud-native#63)

* fix cve (nutanix-cloud-native#64)

Co-authored-by: Christophe Jauffret <[email protected]>

* Bump aquasecurity/trivy-action from 0.7.1 to 0.8.0 (nutanix-cloud-native#66)

Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.7.1 to 0.8.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](aquasecurity/trivy-action@0.7.1...0.8.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/hashicorp/hcl/v2 from 2.14.0 to 2.14.1 (nutanix-cloud-native#60)

Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.14.0 to 2.14.1.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](hashicorp/hcl@v2.14.0...v2.14.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcl/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* adding force_deregister (nutanix-cloud-native#58)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: lomeroe <[email protected]>
Co-authored-by: Christophe Jauffret <[email protected]>
Co-authored-by: Christophe Jauffret <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tuxtof added a commit that referenced this pull request Nov 18, 2022
* adding force_deregister

* add-source-image-url

* implement source image uri

* merge main (#1)

* Update config.go (#63)

* fix cve (#64)

Co-authored-by: Christophe Jauffret <[email protected]>

* Bump aquasecurity/trivy-action from 0.7.1 to 0.8.0 (#66)

Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.7.1 to 0.8.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](aquasecurity/trivy-action@0.7.1...0.8.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/hashicorp/hcl/v2 from 2.14.0 to 2.14.1 (#60)

Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.14.0 to 2.14.1.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](hashicorp/hcl@v2.14.0...v2.14.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcl/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* adding force_deregister (#58)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: lomeroe <[email protected]>
Co-authored-by: Christophe Jauffret <[email protected]>
Co-authored-by: Christophe Jauffret <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: lomeroe <[email protected]>
Co-authored-by: Christophe Jauffret <[email protected]>
Co-authored-by: Christophe Jauffret <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants