Upgrading to Crowd 4.2 or later throws missing keysjavax.crypto.spec.SecretKeySpec_* error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

 

Problem

When attempting to upgrade to Crowd 4.2 it fails and the following appears in the atlassian-crowd.log:

Cause:
java.lang.RuntimeException: java.io.FileNotFoundException: /var/atlassian/application-data/crowd/shared/keys/javax.crypto.spec.SecretKeySpec_1620133793202 (No such file or directory)

Environment

Crowd 4.2 and above

Diagnosis

The error indicates that the SecretKeySpec file does not exist.

Cause

Starting from Crowd 4.2, all passwords for external systems stored in Crowd are encrypted by default.  

(warning) It is crucial to make sure you backup your encryption keys. Without them you won't be able to properly restore Crowd from backup.

Solution

The encryption keys are stored in the shared folder {crowdHome}/shared/keys. To backup the keys, copy the {crowdHome}/shared/keys directory to the secure place.

To correctly restore from backup with encrypted passwords, corresponding keys must be present in the {crowdHome}/shared/keys, otherwise, Crowd won't be able to decrypt passwords.

For more information, see Password encryption

Last modified on Aug 27, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.