将 OAuth2 访问令牌(或 OpenID Connect id_token)交换为 WS-* SAML 令牌? [英] Exchange an OAuth2 access token (or OpenID Connect id_token) for a WS-* SAML token?

查看:107
本文介绍了将 OAuth2 访问令牌(或 OpenID Connect id_token)交换为 WS-* SAML 令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 OAuth2 访问令牌(或 OpenID Connect id_token)交换为 WS-* SAML 令牌?

Is it possible to exchange an OAuth2 access token (or OpenID Connect id_token) for a WS-* SAML token?

这是我们想要完成的具体场景:

Here is our specific scenario that we would like to accomplish:

  1. 已使用 OpenID Connect 端点对用户进行身份验证并颁发了 id_token.
  2. 同一用户已使用 OAuth 2 端点获得授权并颁发了访问令牌.
  3. 单页应用程序 (SPA) 从安全的 ASP.NET Web API 请求数据,并发送 id_token 和访问令牌.
  4. 这是问题/棘手的部分:我们希望 ASP.NET Web API 从使用 WS-* 保护的 WCF 服务获取数据,因此 WCF 服务需要签名的 SAML 令牌.
  1. A user has been authenticated using an OpenID Connect endpoint and issued an id_token.
  2. The same user has been authorized using an OAuth 2 endpoint and issued an access token.
  3. A single-page application (SPA) requests data from a secured ASP.NET Web API and it sends the id_token and access token.
  4. Here's the question/tricky part: We would like the ASP.NET Web API to fetch data from a WCF service that is secured using WS-*, so the WCF service requires a signed SAML token.

是否可以将 OpenID Connect id_token 和/或 OAuth 2 访问令牌交换为符合 WS-* 规范的 SAML 令牌?

Is it possible to exchange the OpenID Connect id_token and/or the OAuth 2 access token for a SAML token that conforms to WS-* specifications?

我们希望在 Windows Server 2016 上使用 ADFS,但我们也对其他安全令牌服务 (STS) 开放,例如 Azure ADFS 等.

We would like to use ADFS on Windows Server 2016, but we're also open to other secure token services (STS), such as Azure ADFS, etc.

推荐答案

似乎您可以在 OAuth 服务器中实现访问令牌交换,因为规范中没有严格禁止它.

It seems that you could implement access token exchange in your OAuth server as there is nothing in the spec strictly forbidding it.

OAuth 没有明确说明您的访问令牌或刷新令牌的形状.因此您可以使用 WS-* 或任何适合您的客户端/RP 需要的东西.

OAuth doesn't make any explicit specifications for what shape your access token or refresh tokens are in. So you could use WS-* or whatever suits your client/RP needs.

您可以使用以下任何类型的令牌:

You could use any of these types of tokens:

  • WS-Security 令牌,尤其是 SAML 令牌

  • WS-Security tokens, especially SAML tokens

JWT 令牌

自定义令牌

id_token 本身必须是然而,智威汤逊.

这篇关于将 OAuth2 访问令牌(或 OpenID Connect id_token)交换为 WS-* SAML 令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆