为第三方Web服务添加授权
我有几个第三方 Web 服务,我只有它们的 WSDL。目前它们只能在我的内部网络中访问。我想将这些 Web 服务公开到互联网上,但是由于它们读取/写入敏感信息,我需要某种身份验证机制以确保只有某些用户才能调用它们。
这个想法是公开完全相同的接口(具有相同参数的相同操作),但拦截每个调用以检查安全性,然后在身份验证有效时调用原始 Web 服务,否则返回异常或错误消息。我一直在尝试使用 Mule ESB 来完成任务,但我无法完全实现 这对骡子来说可能吗?如果没有,我该怎么做呢?有人能指出我正确的方向吗? 提前致谢。
I have several third-party web services of which I only have their WSDL's. Currently they are only accessible in my internal network. I would like to expose those web services to the internet but, since they read/write sensitive information, I would need some sort of authentication mechanism in order to assure that only certain users are able to invoke them.
The idea is to expose exactly the same interface (same operations with the same parameters) but intercepting each invocation to check the security and then invoking the original web service if the authentication is valid or returning an exception or error message otherwise. I've been trying to use Mule ESB for the task abut I can't quite get there
Is this possible with mule? If not, how would i go about doing this? Can anyone point me in the right direction?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是 Web 服务代理将 WS-Security 添加到不安全的目标 Web 服务的示例:
Here is an example of a web service proxy adding WS-Security to an unsecure target web service:
http://www.webservicex.net/stockquote.asmx?wsdl 给出相同的结果。所以你可以在那里测试它。也许问题出在 .net 服务上。
不管怎样,现在我用网络服务模式成功地做了一个代理。现在我仍在努力改变回应。没有取得多大成功,因为 Mule 不断给我一个 ReleasingInputStream 作为响应。
http://www.webservicex.net/stockquote.asmx?wsdl gives the same result. So you could test it there. Maybe the problem lies with .net services.
Anyway, for now I made a successful proxy with the webservice pattern. Now I am still working on transforming a response. Not with much success because Mule keeps giving me a ReleasingInputStream as response.