Download page Restoring the Confluence Trusted Applications Keystore.
Restoring the Confluence Trusted Applications Keystore
Problem
Sometimes after migrating Confluence instances between servers the Confluence Trusted Applications Keystore does not work any longer.
This will result in exports with Scroll Exporters crashing with errors like this in the log:
java.lang.IllegalStateException: Can't create http method with trusted authentication token.
at com.k15t.scroll.confluence.io.HttpMethodWrapper.makeTrustedMethod(HttpMethodWrapper.java:89)
at com.k15t.scroll.confluence.io.HttpMethodWrapper.toHttpMethod(HttpMethodWrapper.java:49)
at com.k15t.scroll.confluence.io.HttpClientResource.getContentAsStream(HttpClientResource.java:47)
...<a lot more lines here>...
Caused by: java.lang.NullPointerException
at java.security.MessageDigest.update(Unknown Source)
at java.security.MessageDigest.digest(Unknown Source)
at org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:165)
at org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:190)
at com.atlassian.confluence.security.trust.DefaultCurrentApplicationIdProvider.getAliasForSid(DefaultCurrentApplicationIdProvider.java:41)
at com.atlassian.confluence.security.trust.DefaultCurrentApplicationIdProvider.getCurrentApplicationId(DefaultCurrentApplicationIdProvider.java:35)
at com.atlassian.confluence.security.trust.DefaultTrustedApplicationsManager.getCurrentApplication(DefaultTrustedApplicationsManager.java:133)
at com.atlassian.confluence.security.trust.DefaultTrustedApplicationsManager.getToken(DefaultTrustedApplicationsManager.java:76)
...<a lot more lines here>...
CODE
Environment
All Scroll Exporters
All versions
Resolution
The Confluence Trusted Applications Keystore is used in Confluence to use secure connections to other applications. Our Exporter do use this keystore to load images.
To fix this problem you will need to restore the Confluence Trusted Applications Keystore. This can be done by placing a JSP file from this page into you Confluence installation and accessing a page in the administration.
To restore the Confluence Trusted Applications Keystore in Confluence 5.3 and above:
Place the downloaded initKeyStore.jsp file into <confluence_install_dir>/confluence/admin
Restart Confluence
In your web browser open http://<your_confluence_base_url>/admin/initKeyStore.jsp
Click 'Proceed'.
(optional) Remove the JSP file from <confluence_install_dir>/confluence/admin
(optional) Restart Confluence
Verification
To check if the keystore was restored properly:
Open http://<your_confluence_base_url>/admin/appTrustCertificate in your browser. If the keystore has been restored successfully you should see something like this:
The Confluence Trusted Applications Keystore sometimes doesn't work any longer after migrating Confluence.
Cookie Notice
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: Click Here