SAML

I am getting org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size exception at the time of SSO. What should I do?

62 views May 15, 2020 0

Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files missing in the JRE environment causes the above issue.

On a default JDK installation, AES is limited to 128-bit key size. In order to perform 256-bit or higher AES encryption, you will need to download and install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.

Here are the steps to fix java.security.InvalidKeyException: Illegal key size exception :

  1. Click here to go to Oracle’s website and search for ‘Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files’.
  2. Depending upon the Java version installed on your machine, download the zip file and extract it on your drive.
  3. From the extracted folder, copy local_policy.jar and US_export_policy.jar files.
  4. Go to <java_installation_directory>/jre/lib/security and paste the copied files. These files will already be there, you just need to copy and replace.
  5. Go to <server_installation_directory>/jre/lib/security and paste the copied files here.
  6. Restart your Atlassian Server.

Was this helpful?