我正在尝试在 Java SpringMVC 框架中设置 SAML。基本上每当我尝试访问服务提供者(http://baseaddress/context/saml/metadata)或触发单点登录(应该重定向到身份提供者)时,我都会得到异常:java.lang.IllegalArgumentException: Manager with name 'MetadataKeyInfoGenerator' does not exist. 如果我使用ResourceBackedMetadataProvider.
<!-- IDP Metadata configuration - paths to metadata of IDPs in circle of trust is here -->
<bean id="metadata" class="org.springframework.security.saml.metadata.CachingMetadataManager">
<constructor-arg>
<list>
<bean class="org.springframework.security.saml.metadata.ExtendedMetadataDelegate">
<property name="metadataTrustCheck" value="false" />
<property name="metadataRequireSignature" value ="false" />
<constructor-arg>
<bean class="org.opensaml.saml2.metadata.provider.HTTPMetadataProvider">
<constructor-arg>
<value type="java.lang.String">http://localhost:8088/metadata</value>
</constructor-arg>
<constructor-arg>
<value type="int">15000</value>
</constructor-arg>
<property name="parserPool" ref="parserPool"/>
</bean>
</constructor-arg>
<constructor-arg>
<bean class="org.springframework.security.saml.metadata.ExtendedMetadata"/>
</constructor-arg>
</bean>
</list>
</constructor-arg>
<!-- OPTIONAL used when one of the metadata files contains information about this service provider -->
<!-- <property name="hostedSPName" value=""/> -->
<!-- OPTIONAL property: can tell the system which IDP should be used for authenticating user by default. -->
<!-- <property name="defaultIDP" value="http://localhost:8080/opensso"/> -->
</bean>