Decrypting encrypted assertion using SAML 2.0 in java using OpenSAML

丶灬走出姿态 提交于 2019-11-28 12:01:44

For those of you who will get this problem, it was related to the fact that the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files was not installed and it was not letting me use encryption better than AES-128. Replacing the policy files with the JCE policy files, I was able to successfully decrypt my encrypted assertion.

Rajani Karuturi

Agree with @thwalrusnp. Just wanted to add the exact location from where you can download the policy jars.

Found it on the answer to Error while decrypting assertion sent from IDP

This happens due to limitation of cryptography strength in default distribution of Java Runtime Environment.

  1. Download Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files (for Java 7) (for Java 8)

  2. Extract zip archive and find there local_policy.jar and US_export_policy.jar.

  3. Replace your JRE version of these files under $JAVA_HOME/jre{version_number}/lib/security/ with downloaded ones.

  4. Restart JRE process, if any running. Now you can use longer keys.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!