【问题标题】:ADFS ignores my claim requestADFS 忽略我的索赔请求
【发布时间】:2018-03-28 00:45:31
【问题描述】:

我通过 wsfed 获取用户的 ADFS 详细信息,通过: https://github.com/auth0/passport-wsfed-saml2

我只得到 nameID。

metadata.xml(我的服务器地址被替换为http://localhost/app/,是在https中运行的):

<?xml version="1.0" encoding="utf-8"?>
<EntityDescriptor ID="_5b6cd05c-a5e3-470d-a2fc-6c6f66633d1b" entityID="http://localhost/app/" xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
    <RoleDescriptor xsi:type="fed:ApplicationServiceType" xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706" protocolSupportEnumeration="http://docs.oasis-open.org/wsfed/federation/200706" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <fed:ClaimTypesRequested>
            <auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" Optional="true" xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706" />
            <auth:ClaimType Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" Optional="true" xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706" />
        </fed:ClaimTypesRequested>
        <fed:TargetScopes>
            <EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
                <Address>http://localhost/app/</Address>
            </EndpointReference>
        </fed:TargetScopes>
        <fed:PassiveRequestorEndpoint>
            <EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
                <Address>http://localhost/app/</Address>
            </EndpointReference>
        </fed:PassiveRequestorEndpoint>
    </RoleDescriptor>
</EntityDescriptor>

即使我将“可选”替换为 false,它也不会返回任何声明。 有人为什么 ADFS 会忽略我的声明吗?

【问题讨论】:

    标签: single-sign-on adfs claims-based-identity ws-federation federation


    【解决方案1】:

    您是否希望 ADFS 从“ClaimTypesRequested”派生声明?

    ADFS 的工作方式是声明源自在 ADFS 中配置的声明规则。

    您配置了哪些声明规则?

    【讨论】:

    • 我希望我提到的具体声明将返回给回调。如果我提到“角色”,我希望在响应中获得角色属性。我不能指定我想从 ADFS 返回哪些数据吗?
    • 您可以,但决定因素是在 ADFS 上配置的声明规则。没有声明规则 - 没有声明。
    猜你喜欢
    • 2014-04-28
    • 2020-07-01
    • 1970-01-01
    • 2019-07-12
    • 2019-10-08
    • 1970-01-01
    • 1970-01-01
    • 2014-02-14
    • 2013-03-07
    相关资源
    最近更新 更多