简体   繁体   English

如何为WS-TRUST实现出站网关?

[英]How to implement an outbound gateway for WS-TRUST?

I want to implement an outbound gateway for WS-Trust that: 我想为WS-Trust实现一个出站网关:

  1. intercepts all outbound SOAP messages 拦截所有出站SOAP消息
  2. sends an RST to an STS. 发送RST到STS。
  3. includes the respond SAML token in the SOAP header of the message before invoking an external service. 在调用外部服务之前,将响应SAML令牌包含在消息的SOAP标头中。

I found WSO2 ESB which may act as such a gateway. 我发现WSO2 ESB可以充当此类网关。 I think I may implement a Java class (with Apache Axis) to do the underlying steps (1-3). 我想我可以实现一个Java类(使用Apache Axis)来执行基础步骤(1-3)。 Then I will let the ESB calls this Java class. 然后,我将让ESB调用此Java类。 Do you think it is possible? 您认为有可能吗? Any samples would be very helpful. 任何样品都将非常有帮助。

Do you have any suggestions alternative than WSO2 ESB? 除了WSO2 ESB,您还有其他建议吗?

Many thanks 非常感谢

To answer my own question, I use Apache Synapse as an ESB gateway to intercept outbound SOAP message. 为了回答我自己的问题,我使用Apache Synapse作为ESB网关来拦截出站SOAP消息。 In particular, I use the Class Mediator of Synapse [1] to intercept the SOAP message. 特别是,我使用Synapse [1]的类介体来拦截SOAP消息。 Upon receiving a SOAP message, the mediator uses a STSClient from Rampart [2] to send a RST to an STS service and includes the respond token in the SOAP Header. 收到SOAP消息后,介体使用Rampart [2]的STSClient将RST发送到STS服务,并将响应令牌包含在SOAP Header中。 Rampart should work well in Synapse environment. Rampart在Synapse环境中应该能很好地工作。

[1] http://synapse.apache.org/userguide/samples/sample380.html [1] http://synapse.apache.org/userguide/samples/sample380.html

[2] https://axis.apache.org/axis2/java/rampart/apidocs/org/apache/rahas/client/STSClient.html [2] https://axis.apache.org/axis2/java/rampart/apidocs/org/apache/rahas/client/STSClient.html

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

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