[BUG] jarsigner + jca unable to retrieve certificate chain for signing #44085
Labels
azure-spring
All azure-spring related issues
azure-spring-jca
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-triage
Workflow: This issue needs the team to triage.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Describe the bug
When using a valid, DigiCert issued, non-exportable Azure Key Vault certificate to sign a .jar file with jarsigner + jca 2.10.0, the certificate chain retrieval appears to fail. Referencing : #41303
The trace below shows a repeat loop of "getCertificateChain", but this might be in reference to each item in the chain: Signer > Intermediate > Root
Exception or Stack Trace
To Reproduce
Create a non-exportable code signing certificate from Azure Key Vault (RSA-HSM, 4096)
Sign the CSR through DigiCert
Merge the signing request with Azure Key Vault
Configure the app registration with secret, along with RBAC on Azure Key Vault for access
Install Amazon Corretto 17.0.14.7.1 on Windows
Open Powershell and run the Code Snippet below (With variables populated)
Code Snippet
Expected behavior
The Jar file should be signed using the code signing certificate held in Azure.
Setup (please complete the following information):
Additional context
I was able to sign a JAR with jca 2.8.2, but I experienced the exact same issue described in Issue: #41832, which should have been fixed in release 2.10.0 via #41303
Note that the validation tests use a "pkcs12-non-exportable-key.pfx" file, however pem/pfx cannot be exported from azure key vault when the certificate is generated with a non-exportable private key - Only the CER file can be exported from azure key vault.
Using jca 2.10.0, the call dies at "INFO: Getting certificate chain for alias: Code-Signing" with "unable to instantiate keystore class: AZUREKEYVAULT not found"
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: