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-VenafiCertificate Does not get all certs for my venafi instance #234

Closed aprajitapriya closed 8 months ago

aprajitapriya commented 9 months ago

I am using below code to get the details for all certs in my venafi instance but I see that few certs are missed by this call

Install-Module VenafiPS Import-Module VenafiPS $SecureStringPwd = $ApiKey | ConvertTo-SecureString -AsPlainText -Force $Creds = New-Object System.Management.Automation.PSCredential($VenafiUserEmail, $SecureStringPwd)

$sessionobject = New-VenafiSession -VaasKey $Creds $today = Get-Date $mycert = Find-VenafiCertificate

gdbarron commented 9 months ago

Hi @aprajitapriya. Can you please provide the following info that was requested in the bug report template:

Operating System: VenafiPS version: PowerShell version:

How many should there be and how many are missing?

As you are using Find-VenafiCertificate, you have not upgraded to v6. Can you please upgrade to the latest and try again? Note, the function names have changed and you should now use Find-VcCertificate.

aprajitapriya commented 9 months ago

Hi @gdbarron,

Thanks for your response. Using the latest version I am getting all the certs. But a lot of properties have changed. I had my report running that used application.name property for some filters. I don't see that property anymore.

Thanks, Aprajita

aprajitapriya commented 9 months ago

When I use the Find-VcCertificate -ApplicationDetail I get an error that parameter cannot be found

gdbarron commented 9 months ago

I'm not seeing any issues with application.name not being available as long as -ApplicationDetail is provided. Otherwise, it will just be the application IDs. Can you please provide a screenshot/text of the command you are running and the error?

aprajitapriya commented 9 months ago

Thanks for your responses. I have been able to get the info that I need using VenafiPS module. Can you let me know the command for downloading cert in pkcs12 format using VenafiPS module?

aprajitapriya commented 9 months ago

In order to download the certificate I am passing certificate ID, output path and private key to the cmdlet Export-VcCertificate. But it errors out saying "Cannot bind argument to parameter 'Path' because it is null."

gdbarron commented 9 months ago

can you please provide a screenshot of the command and error?

aprajitapriya commented 9 months ago

image

aprajitapriya commented 9 months ago

If the -ID parameter actually needs the full path to certificate, where or how can I find that Path?

aprajitapriya commented 9 months ago

@gdbarron I saw you pushed a fix for this. Do you have an ETA by when I can see this in a new VenafiPS version?

gdbarron commented 8 months ago

Should be out today. Also, pkcs12 export for TLSPC isn't supported quite yet, but PEM is and you can always use openssl to convert for now.

aprajitapriya commented 8 months ago

Sure thanks for fixing this.

aprajitapriya commented 8 months ago

I see the 6.0.6 version out but looks like its not registered yet. image

gdbarron commented 8 months ago

@aprajitapriya you should be all set. GitLab, where signing and deployments are done, had a pipeline outage and only part of it was successful. This has now been resolved.