BAD_MAGIC Error when Adding Trusted Application Integration to JIRA

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

This KB pertains to JIRA 2.1 or earlier.

No issue results are returned from a {jiraissues} macro. When adding a trusted application, the error appears in the JIRA log:

1 2 2010-02-23 11:28:52,280 http-80-Processor145 ERROR [security.auth.trustedapps.BouncyCastleEncryptionProvider] java.lang.SecurityException: JCE cannot authenticate the provider BC 2010-02-23 11:28:52,280 http-80-Processor145 WARN [atlassian.seraph.filter.TrustedApplicationsFilter] Failed to login trusted application: confluence:10931266 due to: com.atlassian.security.auth.trustedapps.InvalidCertificateException: BAD_MAGIC; Unable to decrypt certificate {0} for application {1}; ["secret key","confluence:10931266"]

Cause

JIRA cannot find Bouncy Castle security provider jar to the application server classpath. See JRA-1401 for more details.

Resolution

Add BouncyCastle Cryptography provider in Java. See the randombugs instructions.

OR

Add bcprov-jdk14-138.jar to the <confluence-install>/lib directory.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.