简体   繁体   English

OpenSAML 3 unmarshaller为null

[英]OpenSAML 3 unmarshaller is null

Hi i am currently porting an app to opensaml3 and run into the following issue: 您好我正在将应用程序移植到opensaml3并遇到以下问题:

InitializationService.initialize();
...
Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(qName);

I have replaced the DefaultBootstrap from opensaml2 and previous by the initialize function. 我已经通过initialize函数替换了opensaml2和之前的DefaultBootstrap。 Still the factory is returning me null as marshaller. 仍然工厂将我作为编组员返回null。 Any idea what is going wrong here? 知道这里出了什么问题吗?

This is the output from initialize progress: 这是初始化进度的输出:

[main] INFO org.opensaml.core.config.InitializationService - Initializing OpenSAML using the Java Services API
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmlenc#ripemd160
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160

I supose you're using opensaml v3 so You should create the UnmarshallerFactory object with the XMLObjectProviderRegistrySupport class like this it works perfectly 我想你正在使用opensaml v3所以你应该使用XMLObjectProviderRegistrySupport类创建UnmarshallerFactory对象,这样它可以完美地工作

UnmarshallerFactory umFactory=XMLObjectProviderRegistrySupport.getUnmarshallerFactory();
    Unmarshaller unmarshaller=umFactory.getUnmarshaller(element);

This error is due to lack of algorithm support in your JCE implementation you use. 此错误是由于您使用的JCE实现中缺少算法支持。 Even if you use BouncyCastle, some algorithms seems to be not supported. 即使您使用BouncyCastle,也似乎不支持某些算法。 Unless you use these algorithms, there is no need to worry about. 除非您使用这些算法,否则无需担心。 Installing the JCE unlimited strength jurisdiction policy jars to the jre will resolve this. 安装JCE无限强度管辖权政策罐子到jre将解决此问题。
Refer: Decrypting encrypted assertion using SAML 2.0 in java using OpenSAML as well. 请参阅: 使用OpenSAML在Java中使用SAML 2.0解密加密断言

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM