Skip to content
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

Find-VenafiCertificate Does not get all certs for my venafi instance #234

Closed
aprajitapriya opened this issue Nov 30, 2023 · 14 comments · Fixed by #238
Closed

Find-VenafiCertificate Does not get all certs for my venafi instance #234

aprajitapriya opened this issue Nov 30, 2023 · 14 comments · Fixed by #238
Assignees

Comments

@aprajitapriya
Copy link

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
Copy link
Collaborator

gdbarron commented Nov 30, 2023

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
Copy link
Author

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
Copy link
Author

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

@gdbarron
Copy link
Collaborator

gdbarron commented Nov 30, 2023

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
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

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

@aprajitapriya
Copy link
Author

image

@aprajitapriya
Copy link
Author

aprajitapriya commented Dec 12, 2023

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

@gdbarron gdbarron self-assigned this Dec 12, 2023
@gdbarron gdbarron linked a pull request Dec 12, 2023 that will close this issue
@aprajitapriya
Copy link
Author

@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
Copy link
Collaborator

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.

@gdbarron gdbarron reopened this Dec 13, 2023
@aprajitapriya
Copy link
Author

Sure thanks for fixing this.

@aprajitapriya
Copy link
Author

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

@gdbarron
Copy link
Collaborator

@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.

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

Successfully merging a pull request may close this issue.

2 participants