2009-02-09 59 views
7

是否可以在SAML身份验证请求中发送属性?SAML身份验证请求中是否允许属性?

<samlp:AuthnRequest 
    xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" 
    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" 
    ID="aaf23196-1773-2113-474a-fe114412ab72" 
    Version="2.0" 
    IssueInstant="2004-12-05T09:21:59Z" 
    AssertionConsumerServiceIndex="0" 
    AttributeConsumingServiceIndex="0"> 
    <saml:Issuer>https://sp.example.com/SAML2</saml:Issuer> 
    <samlp:NameIDPolicy 
    AllowCreate="true" 
    Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"/> 
</samlp:AuthnRequest> 

回答

7

从技术上讲,是的,这是可能的,因为AuthnRequest可以包含一个扩展元件,它可以包含任何东西 - 见the SAML 'core' spec:AuthnRequest(3.4.1节)由具有RequestAbstractType(第3.2.1节)衍生一个可选的扩展。发送者和接收者必须同意以这种方式发送的数据的语法和语义。

我看不到更传统的方式来做到这一点,因为属性通常在断言中,而不是AuthnRequests。

+0

感谢您的帮助。我有一个后续评论。这是用于SAML 2.0还是SAML 1.0或两者兼而有之? – jon077 2011-02-07 20:27:09

0

有一种情况,属性将成为认证请求的一部分。 ,以便我们可以从请求中获取该属性名称,以构建具有相同属性的响应断言。

因为服务提供程序通过比较属性名称来验证响应。我们可以将Salesforce作为服务提供者的示例,其中发生了同样的情况。