joshcorr / SecretManagement.Hashicorp.Vault.KV

A PowerShell SecretManagement extension for Hashicorp Vault Key Value Engine
MIT License
30 stars 10 forks source link

[Feature]Allow SkipCertificateCheck #29

Closed ryancbutler closed 2 years ago

ryancbutler commented 2 years ago

Is your feature request related to a problem? Please describe. Vault with self-signed certificates currently won't function.

Describe the solution you'd like Allow switch in secretvault config to bypass TLS checks. Can leverage the SkipCertificateCheck switch built into invoke-restmethod for 6.0 and above.

Describe alternatives you've considered Tried some of the workarounds like without luck [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { return $true }

Additional context Add any other context or screenshots about the feature request here.

joshcorr commented 2 years ago

This is a great idea. I can think of one way to implement this would be to put it as an option when the Vault is registered. The likely reason your workaround didn't work is because of the way that the module loads up in a run-space (which also makes it inherently tricky to troubleshoot).

Would you want to give it a go on adding this feature? I can help you work on this if you aren't sure where to start.

ryancbutler commented 2 years ago

Sure! I could take this on.

joshcorr commented 2 years ago

Your Code is now out there on the gallery under 2.0.1-Preview. Please close this issue if the function is working correctly for you.