OAuth2 SAML授权授权中SubjectConfirmation的含义是什么?

Bos*_*osh 7 authentication saml assertions oauth-2.0

OAuth2用户SAML承载规范描述了应用程序如何提出一个断言令牌端点作为授权拨款.例如,Salesforce的API允许这种方法使应用程序能够自动请求用户帐户的访问令牌(只要用户已经获得了带外权限).

不过,我无法理解断言的含义.大部分都很清楚,例如

  • Issuer 是生成(和签署)断言的一方
  • Subject 是要为其帐户请求访问令牌的用户
  • AudienceRestriction 将受众限制为令牌端点.

但我无法理解以下含义:

  • AuthnStatement - 我对SAML规范的理解是,该断言的发布者正在声明它(发行者)已经对该主题进行了认证.这是正确的吗?

  • SubjectConfirmation - 谁在这里确认什么?SAML规范有助于说明此元素"允许确认主题的信息".但什么是确认?谁执行它,以及如何,何时,为了什么目的?

jlv*_*ero 7

AuthnStatement元素描述身份提供者的身份验证行为。如果断言发布者对主题进行了身份验证,则断言应该包含一个代表该身份验证事件的单个事件。

例子:

    <AuthnStatement AuthnInstant="2010-10-01T20:07:34.371Z">
            <AuthnContext>
              <AuthnContextClassRef>
    <!--Authentication method, was the client authenticated with digital cert, password, kerberos token?-->
                urn:oasis:names:tc:SAML:2.0:ac:classes:X509 

<!--For example, the Password class is applicable when a principal authenticates to an authentication authority through the presentation of a password over an unprotected HTTP session. -->
                urn:oasis:names:tc:SAML:2.0:ac:classes:Password

                urn:oasis:names:tc:SAML:2.0:ac:classes:Kerberos

              </AuthnContextClassRef>
            </AuthnContext>
          </AuthnStatement>
Run Code Online (Sandbox Code Playgroud)

SubjectConfirmation元素允许授权服务器将其确认为不记名断言。此类元素必须具有值为“urn:oasis:names:tc:SAML:2.0:cm:bearer”的 Method 属性。SubjectConfirmation 元素必须包含一个 SubjectConfirmationData 元素(有例外),指示授权服务器的令牌端点 URL。授权服务器必须验证 Recipient 属性的值是否与传递断言的令牌端点 URL 匹配。

例子:

     <saml:SubjectConfirmation>
<!-- Mandatory -->
       Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
       <saml:SubjectConfirmationData>
<!-- The AuthRequest sent this ID -->
         InResponseTo="aaf23196-1773-2113-474a-fe114412ab72"
<!-- It was through HTTP POTS token endpoint URL -->
         Recipient="https://sp.example.com/SAML2/SSO/POST"
<!-- Not valid ON or After this Date-->
         NotOnOrAfter="2004-12-05T09:27:05"/>
     </saml:SubjectConfirmation>
Run Code Online (Sandbox Code Playgroud)

  • 2020 年,这个主题和您仍然相关且有帮助:) (2认同)
  • 你的回答有点不清楚,“SubjectConfirmation”到底有什么意义呢? (2认同)