<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic vcert playbook failing with unexpected Private Key type: ENCRYPTED PRIVATE KEY when using csr: service in Network Security Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/network-security-discussions/vcert-playbook-failing-with-unexpected-private-key-type/m-p/1423807#M1027</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am attempting to automate certificate renewals using vcert and vcert playbooks with TPP but am encountering an error and was looking for guidance or troubleshooting steps.&lt;/P&gt;&lt;P&gt;I am using vcert version v5.10.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my testing, I had been using `csr: local`, but it appears at least some of my servers will require me to use `csr: service` as I got this error when running the playbook:&lt;/P&gt;&lt;P&gt;400 Certificate request mismatch. Certificate "&amp;lt;PATH REMOVED&amp;gt;" is originated from a Service Generated CSR, but the request contains a PKSC#10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I set `csr: service` in my playbook, I instead get this output:&lt;/P&gt;&lt;CODE&gt;2025-07-07T09:35:52.178-0500	INFO	vcert/playbook.go:103	running playbook file	{"file": "/path/to/my/playbook.yml"}
2025-07-07T09:35:52.179-0500	INFO	parser/reader.go:59	playbook successfully parsed
2025-07-07T09:35:52.179-0500	INFO	vcert/playbook.go:133	using Venafi Platform	{"platform": "TPP"}
2025-07-07T09:35:52.353-0500	INFO	vcert/playbook.go:146	running playbook task	{"task": "myCertificate"}
2025-07-07T09:35:52.353-0500	INFO	service/service.go:114	Flag [force-renew] is set. All certificates will be requested/renewed regardless of status
2025-07-07T09:35:52.353-0500	INFO	service/service.go:60	certificate needs action	{"certificate": "certificate.name.removed"}
2025-07-07T09:35:52.353-0500	INFO	service/service.go:65	csr option is 'service'. Generating random password for certificate request
2025-07-07T09:35:55.834-0500	INFO	service/service.go:74	successfully enrolled certificate	{"certificate": "certificate.name.removed"}
2025-07-07T09:35:55.834-0500	ERROR	service/service.go:88	error preparing certificate for installation	{"error": "could not prepare certificate and key: unexpected Private Key type: ENCRYPTED PRIVATE KEY"}
2025-07-07T09:35:55.834-0500	ERROR	vcert/playbook.go:151	error running task	{"task": "myCertificate", "error": "error preparing certificate for installation: could not prepare certificate and key: unexpected Private Key type: ENCRYPTED PRIVATE KEY"}&lt;/CODE&gt;&lt;P&gt;It appears that the new certificate is being successfully enrolled, but vcert is not automatically decrypting the certificate correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I came across this GitHub issue and wonder if it's related: &lt;A alt="https://github.com/Venafi/vcert/issues/538" href="https://github.com/Venafi/vcert/issues/538" target="_blank"&gt;https://github.com/Venafi/vcert/issues/538&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In the sample where `luispresuelVenafi` says they were unable to reproduce the issue, their output shows they call vcert with `--csr local` and not `--csr service` as described by the reporter.&lt;/P&gt;&lt;P&gt;CC: @Tim Griffith​&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jul 2025 19:08:47 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2025-07-08T19:08:47Z</dc:date>
    <item>
      <title>vcert playbook failing with unexpected Private Key type: ENCRYPTED PRIVATE KEY when using csr: service</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/vcert-playbook-failing-with-unexpected-private-key-type/m-p/1423807#M1027</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am attempting to automate certificate renewals using vcert and vcert playbooks with TPP but am encountering an error and was looking for guidance or troubleshooting steps.&lt;/P&gt;&lt;P&gt;I am using vcert version v5.10.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my testing, I had been using `csr: local`, but it appears at least some of my servers will require me to use `csr: service` as I got this error when running the playbook:&lt;/P&gt;&lt;P&gt;400 Certificate request mismatch. Certificate "&amp;lt;PATH REMOVED&amp;gt;" is originated from a Service Generated CSR, but the request contains a PKSC#10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I set `csr: service` in my playbook, I instead get this output:&lt;/P&gt;&lt;CODE&gt;2025-07-07T09:35:52.178-0500	INFO	vcert/playbook.go:103	running playbook file	{"file": "/path/to/my/playbook.yml"}
2025-07-07T09:35:52.179-0500	INFO	parser/reader.go:59	playbook successfully parsed
2025-07-07T09:35:52.179-0500	INFO	vcert/playbook.go:133	using Venafi Platform	{"platform": "TPP"}
2025-07-07T09:35:52.353-0500	INFO	vcert/playbook.go:146	running playbook task	{"task": "myCertificate"}
2025-07-07T09:35:52.353-0500	INFO	service/service.go:114	Flag [force-renew] is set. All certificates will be requested/renewed regardless of status
2025-07-07T09:35:52.353-0500	INFO	service/service.go:60	certificate needs action	{"certificate": "certificate.name.removed"}
2025-07-07T09:35:52.353-0500	INFO	service/service.go:65	csr option is 'service'. Generating random password for certificate request
2025-07-07T09:35:55.834-0500	INFO	service/service.go:74	successfully enrolled certificate	{"certificate": "certificate.name.removed"}
2025-07-07T09:35:55.834-0500	ERROR	service/service.go:88	error preparing certificate for installation	{"error": "could not prepare certificate and key: unexpected Private Key type: ENCRYPTED PRIVATE KEY"}
2025-07-07T09:35:55.834-0500	ERROR	vcert/playbook.go:151	error running task	{"task": "myCertificate", "error": "error preparing certificate for installation: could not prepare certificate and key: unexpected Private Key type: ENCRYPTED PRIVATE KEY"}&lt;/CODE&gt;&lt;P&gt;It appears that the new certificate is being successfully enrolled, but vcert is not automatically decrypting the certificate correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I came across this GitHub issue and wonder if it's related: &lt;A alt="https://github.com/Venafi/vcert/issues/538" href="https://github.com/Venafi/vcert/issues/538" target="_blank"&gt;https://github.com/Venafi/vcert/issues/538&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In the sample where `luispresuelVenafi` says they were unable to reproduce the issue, their output shows they call vcert with `--csr local` and not `--csr service` as described by the reporter.&lt;/P&gt;&lt;P&gt;CC: @Tim Griffith​&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 19:08:47 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/vcert-playbook-failing-with-unexpected-private-key-type/m-p/1423807#M1027</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-07-08T19:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: vcert playbook failing with unexpected Private Key type: ENCRYPTED PRIVATE KEY when using csr: service</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/vcert-playbook-failing-with-unexpected-private-key-type/m-p/1423808#M1028</link>
      <description>&lt;P&gt;Hi @Alex Wolfe​&amp;nbsp;, someone from the community might be able to help with this, but I wanted to recommend you create a support case. This type of question is usually best handled by the CyberArk Support team. You can open a case from the Services Hub: https://community.cyberark.com/s/services-hub&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 20:21:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/vcert-playbook-failing-with-unexpected-private-key-type/m-p/1423808#M1028</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-07-08T20:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: vcert playbook failing with unexpected Private Key type: ENCRYPTED PRIVATE KEY when using csr: service</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/vcert-playbook-failing-with-unexpected-private-key-type/m-p/1423809#M1029</link>
      <description>&lt;P&gt;Thank you, I have opened case 04060603&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 20:35:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/vcert-playbook-failing-with-unexpected-private-key-type/m-p/1423809#M1029</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-07-08T20:35:15Z</dc:date>
    </item>
  </channel>
</rss>

