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

Support jsign without google credentials #594

Open
bschwert opened this issue Dec 17, 2024 · 3 comments
Open

Support jsign without google credentials #594

bschwert opened this issue Dec 17, 2024 · 3 comments

Comments

@bschwert
Copy link

In JSigner.java the googleAccessToken is required always, even if no google credentials are provided. This leads to RuntimeException in #googleAccessToken().

The certificate chain is optional for JSign, if it's stored in the PKCS11 module.

I've changed the code to

KeyStoreBuilder keyStoreBuilder = new KeyStoreBuilder()
               .storetype(configuration().getStoreType())
               .keystore(configuration().getKeystore());
if (kmsCredentials!=null) {
       keyStoreBuilder.storepass(googleAccessToken());
}
try {
       if (configuration().getCertificateChain() != null) {
               keyStoreBuilder.certfile(configuration().getCertificateChain().toFile());
       }
} catch(IllegalArgumentException e){
       // Ignore missing certficate chain;could be stored in keystore
}
KeyStore keystore =keyStoreBuilder.build();
@netomi
Copy link
Contributor

netomi commented Dec 17, 2024

this makes perfect sense. In our use-case we were using jsign exclusively with Google KMS as signing providers, but it makes sense to make this configurable.

@netomi
Copy link
Contributor

netomi commented Dec 17, 2024

may I ask you for which use-case your are using the window signer and how do you run / deploy it?

Our current deployment script is heavily tailored for our use-case, but we can make that more general if there is a need.

@bschwert
Copy link
Author

I sign the customized executable and the installer. Both by the maven-plugin or directly via rest requests in gradle builds.

bschwert pushed a commit to bschwert/org.eclipse.cbi that referenced this issue Jan 20, 2025
bschwert pushed a commit to bschwert/org.eclipse.cbi that referenced this issue Jan 20, 2025
bschwert pushed a commit to bschwert/org.eclipse.cbi that referenced this issue Jan 20, 2025
bschwert pushed a commit to bschwert/org.eclipse.cbi that referenced this issue Jan 20, 2025
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

No branches or pull requests

2 participants