Closed umireon closed 2 months ago
Thank you for the PR, however this is maybe not necessary.
Jsign needs to know the algorithm of the key for signing (RSA of ECDSA), when using Google Cloud there are 3 ways to get this information:
cloudkms.cryptoKeyVersions.get
permission or the Cloud KMS Viewer rolemykey/cryptoKeyVersions/2:RSA
Assuming you are using the latest release of Jsign, I think you can fix this issue either by adjusting the permissions or by appending :RSA
to the key alias. Let me know if this works for you.
Thank you for suggestion, I will try later!
I got it worked with the RSA suffix! Thank you!
Maybe related to #119
Background
We have developed an Android app and Google requires us to sign our build artifact when we upload it to Google Play Console. For better security, we'd like to sign our build artifact with Google Cloud KMS and we found this excellent product. We composed the following command to sign our aab with Cloud KMS.
However, it does not work with the following error.
I read the code of jsign and found that the GOOGLECLOUD provider needs the public key to sign but Cloud KMS does not store certificates. In this PR, we'd like to propose to add a way to feed an additional certificate to Jsign when it is used as a JCA provider.
Overview
When Jsign is used as a JCA provider, namely with jarsigner, we can provide additional options via the system property of Java. Adding this PR enable users to sign JAR artifacts with jarsigner and Cloud KMS by the following command.
Thank you in advance!
Best,