Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for powershell credential to VMware train #540

Open
rlakey opened this issue Nov 28, 2019 · 2 comments
Open

Add support for powershell credential to VMware train #540

rlakey opened this issue Nov 28, 2019 · 2 comments
Labels

Comments

@rlakey
Copy link
Contributor

rlakey commented Nov 28, 2019

Describe the Enhancement:

Using a powershell credential to connect to vCenter/ESXi with the VMware train. PowerCLI already supports this natively with the -Credential option on Connect-VIServer.

Describe the Need:

This will allow more credential options like using a smartcard/token for authentication and would be more secure than using environmental variables or username/password.

Current Alternative

None that i know of

Can We Help You Implement This?:

Yes

@kclinden
Copy link

kclinden commented Mar 5, 2020

It looks like to implement this we could make the following modifications to the vmware transport.

https://github.com/inspec/train/blob/master/lib/train/transports/vmware.rb

Add a credential option after line 13. This might have to be restricted to an environment variable right now since it is a PowerShell construct and ruby won't know what it is. It might also not work if ruby is unable to handle the credential object.

Add a clause for if a credential is defined at line 53 to change the command used to connect.

@rlakey
Copy link
Contributor Author

rlakey commented Mar 5, 2020

Another thought would be to have an option where the vCenter connection was handled outside of inspec.

Say I pre-connected to vCenter before running Inspec which would then handle all the normal authentication options.

So then running inspec would just be something like "inspec exec ./profile -t vmware:// --vcpreauth"

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants