-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: add pscredential and securestring #283
feat: add pscredential and securestring #283
Conversation
89cf38a
to
e8d6616
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please retain the use of camelCase parameters fqdn, username, and password?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes and comments provided.
8f55fd3
to
79f7b82
Compare
9dc5e8a
to
99ee156
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed back to camelcase!
Hi @tenthirtyam, let me know if something else needs refinement before this PR is ready to merge 👍🏻 |
docs/documentation/functions/authentication/Request-VCFToken.md
Outdated
Show resolved
Hide resolved
docs/documentation/functions/authentication/Request-VCFToken.md
Outdated
Show resolved
Hide resolved
docs/documentation/functions/authentication/Request-VCFToken.md
Outdated
Show resolved
Hide resolved
docs/documentation/functions/authentication/Connect-CloudBuilder.md
Outdated
Show resolved
Hide resolved
docs/documentation/functions/authentication/Request-VCFToken.md
Outdated
Show resolved
Hide resolved
docs/documentation/functions/authentication/Request-VCFToken.md
Outdated
Show resolved
Hide resolved
docs/documentation/functions/authentication/Request-VCFToken.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
cd82f5e
to
e64714f
Compare
I've force-pushed a couple more changes to ensure each cmdlet uses the same structure and that the documenation is a match. e64714f Thus far this looks good but I want to run some tests before next steps. |
Enhanced `Request-VCFToken` and `Connect-CloudBuilder` by adding a `PSCredential `parameter set and adding support for `SecureString` or PSCredential object for the `password` parameter. Signed-off-by: Erik Grina Raassum <erik.raassum@gmail.com> Co-Authored-By: Ryan Johnson <ryan@tenthirtyam.org>
e64714f
to
c41652d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've have successfully tested these changes in one of our development environments with the following:
SDDC Manager
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username administrator@vsphere.local -password VMw@re1!
$secureString = Read-Host -AsSecureString 'Password'
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username administrator@vsphere.local -password $secureString
$credential = Get-Credential
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -credential $credential
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username administrator@vsphere.local
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io
Cloud Builder
Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password VMw@re1!VMw@re1!
$secureString = Read-Host -AsSecureString 'Password'
Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password $secureString
$credential = Get-Credential
Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -credential $credential
Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin
Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io
LGTM! 🚀
Summary
Enhanced Request-VCFToken and Connect-CloudBuilder by adding a PSCredential parameter set and adding support for SecureString for the Password parameter.
I've tested the following:
SDDC Manager
SecureString
password.SecureString
as password.PSCredential
object.PSCredential
object (username/password).Cloud Builder
SecureString
password.SecureString
as password.PSCredential
object.PSCredential
object (username/password).Will ask for a PSCredential (username/password).
Type
Please describe:
Breaking Changes?
Test and Documentation
Issue References
A furthering of #116
Additional Information
N/A