Venafi / VenafiPS

Powershell module to fully automate your Venafi TLS Protect Datacenter and Cloud platforms!
https://venafips.readthedocs.io/
Apache License 2.0
18 stars 7 forks source link

find-tppobject has issues with Onboard discovered virtual server names associated with wildcard certificates #186

Closed DadsVacayShorts closed 1 year ago

DadsVacayShorts commented 1 year ago

Environment

Operating System:Multiple (WS 2016, WS 2019)
VenafiPS version:5.3.1
PowerShell version:5.1
TPP version (if applicable): Multiple (21.4, 22.4)

Steps to reproduce

Expected behavior

Find-tppobject should have no issues pulling apps from a device that has had onboard discovery with wildcard certificates for example, this should work no matter the name of the netscaler apps

Find-TppObject -Class 'netscaler' -Path "\VED\Policy\Installations\Agentless\OnPrem-DMZ\Jedi Knights\Netscalertest2"

Additionally app object names that are compliant with TPP should produce no errors when using the find-tppobject function.

Actual behavior

If the device has had onboard discovery AND Is associated with wildcard certificates, the function is erroring out as it sees the app name as a regular expression. Onboard discovery creates the Netscaler apps like such (similar logic applies to other apps) <Virtual Server Name>_<PortValue> (<certObjectName>)

So a discovered app name looks like this with a wildcard cert.

Netscalervip.galaxylab.private_443 (*.galaxylab.private)

Screenshots

This is the policy showing this app name image This shows the error where it sees the netscaler app with the above values and is treating it like a regular expression

image

The above error has been observed and recreated in multiple environments.