我正在尝试通过 SSL 连接到 RabbitMQ。我已按照[此处}(https://www.rabbitmq.com/ssl.html)链接的 RabbitMQ SSL 文档进行操作。
根据 RabbitMQ SSL 文档,由于已知漏洞,不建议使用 SSLv3 和 TLSv1 连接。因此,我按照说明在 RabbitMQ 上禁用了这些协议。
我正在使用 Spring AMQP 1.4.3 连接到 RabbitMQ。
ApplicationContext context = new GenericXmlApplicationContext("classpath:/testConfig/testrabbit-context.xml");
RabbitTemplate template = context.getBean(RabbitTemplate.class);
MessageProperties messageProperties = new MessageProperties();
org.springframework.amqp.core.Message amqpMessage = new org.springframework.amqp.core.Message("Test".getBytes(), messageProperties);
String routingKey = "TEST.businessevent.route";
template.send(routingKey, amqpMessage);
Run Code Online (Sandbox Code Playgroud)
我的配置:
<rabbit:connection-factory id="rabbitConnectionFactory"
connection-factory="clientConnectionFactory"
host="localhost"
port="5671"
username="username"
password="password"
virtual-host="test_host" />
<rabbit:admin connection-factory="rabbitConnectionFactory" />
<rabbit:template id="rabbitTemplate"
connection-factory="rabbitConnectionFactory" exchange="test_topic" />
<rabbit:topic-exchange name="test_topic" durable="true" />
<bean id="clientConnectionFactory" class="org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean">
<property name="useSSL" value="true" />
<property name="sslPropertiesLocation" …Run Code Online (Sandbox Code Playgroud) 我试图通过使用我的应用程序作为服务提供商和 WSO2 服务器作为 idp 来实现 SAML 2.0 是我的应用程序。我已经下载并实现了 spring-security-saml2-sample 应用程序,并将其修改为与 WSO2 服务器作为 idp 一起使用,并且示例应用程序按预期工作。
我现在尝试将 securityContext.xml 和相关配置合并到我的应用程序中,但是在元数据生成过程中遇到异常。
例外情况如下:
java.lang.IllegalArgumentException: Manager with name 'MetadataKeyInfoGenerator' does not exist
at org.opensaml.xml.security.keyinfo.NamedKeyInfoGeneratorManager.getFactory(NamedKeyInfoGeneratorManager.java:157)
at org.opensaml.xml.security.SecurityHelper.getKeyInfoGenerator(SecurityHelper.java:1065)
at org.springframework.security.saml.metadata.MetadataGenerator.generateKeyInfoForCredential(MetadataGenerator.java:255)
at org.springframework.security.saml.metadata.MetadataGenerator.getServerKeyInfo(MetadataGenerator.java:211)
at org.springframework.security.saml.metadata.MetadataGenerator.buildSPSSODescriptor(MetadataGenerator.java:329)
at org.springframework.security.saml.metadata.MetadataGenerator.generateMetadata(MetadataGenerator.java:189)
at org.springframework.security.saml.metadata.MetadataGeneratorFilter.processMetadataInitialization(MetadataGeneratorFilter.java:127)
at org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:86)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
Run Code Online (Sandbox Code Playgroud)
我的 securityContext.xml 元数据配置如下
java.lang.IllegalArgumentException: Manager with name 'MetadataKeyInfoGenerator' does not exist
at org.opensaml.xml.security.keyinfo.NamedKeyInfoGeneratorManager.getFactory(NamedKeyInfoGeneratorManager.java:157)
at org.opensaml.xml.security.SecurityHelper.getKeyInfoGenerator(SecurityHelper.java:1065)
at org.springframework.security.saml.metadata.MetadataGenerator.generateKeyInfoForCredential(MetadataGenerator.java:255)
at org.springframework.security.saml.metadata.MetadataGenerator.getServerKeyInfo(MetadataGenerator.java:211)
at org.springframework.security.saml.metadata.MetadataGenerator.buildSPSSODescriptor(MetadataGenerator.java:329)
at org.springframework.security.saml.metadata.MetadataGenerator.generateMetadata(MetadataGenerator.java:189)
at org.springframework.security.saml.metadata.MetadataGeneratorFilter.processMetadataInitialization(MetadataGeneratorFilter.java:127)
at org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:86)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
Run Code Online (Sandbox Code Playgroud)
我没有对示例应用程序 securityContext.xml 进行任何重大更改。有没有人遇到过类似的错误。任何帮助将非常感激。
请在下面找到我的整个 securityContext.xml
<!-- Enable …Run Code Online (Sandbox Code Playgroud)