web-services - 请求中需要 Uname/Password 的 Web 服务的代理安全服务

标签 web-services security authentication proxy inject

我们有一个供应商提供的解决方案,该解决方案需要用户名和密码才能利用作为 Web 服务公开的 API。它们将包含在调用的实际 xml 中。我们显然不喜欢那样。

有谁知道任何产品、系统等等,我们可以让调用系统使用基于 token 的安全性对其进行身份验证,然后注入(inject)用户名密码并将请求转发到产品可访问的安全区域,而不是外部调用者。当然,通过返回响应。

例如:
enter image description here

最佳答案

身份验证/代理服务有一个名称 - 安全 token 服务 (STS)。 oAuth 代币交换工作草案对 STS 及其目的进行了很好的总结:

A Security Token Service (STS) is a service capable of validating security tokens provided to it and issuing new security tokens in response, which enables clients to obtain appropriate access credentials for resources in heterogeneous environments or across security domains.

Web Service clients have used WS-Trust [WS-Trust] as the protocol to interact with an STS for token exchange. While WS-Trust uses XML and SOAP, the trend in modern Web development has been towards RESTful patterns and JSON. The OAuth 2.0 Authorization Framework [RFC6749] and OAuth 2.0 Bearer Tokens [RFC6750] have emerged as popular standards for authorizing third-party applications' access to HTTP and RESTful resources.

The conventional OAuth 2.0 interaction involves the exchange of some representation of resource owner authorization for an access token, which has proven to be an extremely useful pattern in practice. However, its input and output are somewhat too constrained as is to fully accommodate a security token exchange framework.


大多数 STS(包括 oAuth token 交换草案指定的类型)不处理异构 token ,因为您的用例需要超出 oAuth 到 SAML 或反之亦然。您的用例的解决方案很可能涉及自定义编码的 STS。我们已经为使用各种产品/堆栈/平台/等的客户实现了 STS,可将 oAuth/SAML 转换为任何东西(例如,带有像您这样的自定义凭证 header 的 SOAP)。
我们经常使用 Salesforce 作为平台,它提供了许多有助于此用例的管道。公平地说,类似的管道可用于相当多的平台和堆栈——从三大平台(AWS/GCP/Azure)到具有适当库的 Java/Python/Ruby/Node/Go,再到 Keycloak 等身份和访问管理产品。

关于web-services - 请求中需要 Uname/Password 的 Web 服务的代理安全服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57998499/

相关文章:

php - 一种将用户重定向到仪表板的简单方法

c# - 更改身份服务器 V3 登录页面的设计

java - 在此服务器上找不到请求的 URL/REST/WebService/MyMethod

security - npm 审计是否有替代 yarn 的方法?

security - OpenShift 是否通过在主机级别隔离容器来支持真正的 Multi-Tenancy ?

angular - 仅允许来自 SPA 的 api 请求

api - Laravel 5.3 RESTFul API 无需身份验证

javascript - 服务器响应多个异步 XHR

java - 在 Java 中将 WireMock 与 SOAP Web 服务结合使用

ajax - 通过 AJAX 发送大型 JSON 时获取 No 'Access-Control-Allow-Origin'