【发布时间】:2021-10-06 14:41:23
【问题描述】:
我们的要求是通过 ADFS 设置身份验证。
IdentityServer 用于登录。
我们需要 ADFS,因为我们是一个 SharePoint 并且我们有多个声明提供者。
我们尝试做的事情:
SPA <--> ADFS <--> IdentityServer
网址
SPA: https://example.com/app
ADFS: http://fedsrv.example.com/adfs
ID: https://idp.example.com/spa
ADFS
在 ADFS 中,我们设置了一个应用程序组:OIDC_SPA,其中包含一个本机应用程序 Portal 和一个 Web API Portal。
本机应用确实有一个客户端 ID:example 和一个重定向 URI:https://example.com/app
Web API 确实有一个依赖方标识符:example,
有Permit everyone 政策
和一个转换规则PT all:x:[] => issue(claim = x);
和客户端权限allatclaims, opened and profile
Claims Provider Trust 配置如下:
CP 联盟元数据 URL:https://idp.example.com/spa/wsfed/FederationMetadata/2007-06/FederationMetadata.xml
CP 标识符为https://idp.example.com/spa
WS-Fed 被动端点是:https://idp.example.com/spa/wsfed
我们还设置了 AnchorClaimType:
set-adfsclaimsprovidertrust -targetidentifier https://idp.example.com/spa -AnchorClaimType http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
对于家庭领域映射:
Set-AdfsWebApiApplication -TargetName OIDC_SPA -ClaimsProviderName "<CP name>"
身份服务器
我们添加了一个 ClientID 为 http://fedsrv.example.com/adfs/services/trust 的客户端
协议类型:wsfed
依赖方:
| Field | Value |
|--------------------------|--------|
| Realm | http://fedsrv.example.com/adfs/services/trust |
| TokenType | urn:oasis:names:tc:SAML:2.0:assertion |
| SignatureAlgorithm | http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 |
| DigestAlgorithm | http://www.w3.org/2001/04/xmlenc#sha256 |
| SamlNameIdentifierFormat | urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified |
身份资源
配置了opened和profile。
是我们忘记了什么还是我们配置有问题?
【问题讨论】:
标签: identityserver4 adfs