「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
汎用認証サイトにSAML2.0を実装するため仕様を読む。
SAML2.0 の 技術概要
特定のユースケースを実現するための組み合わせ方を定義。
XMLデジタル署名処理規則と構文
※ 追加のサイトとアカウントリンクする場合は、
新たにフェデレーション名識別子を生成し、上記手順を繰り返す。
(プロファイル(バインディング(プロトコル(アサーション))))
・メタデータ
・認証コンテキスト
アサーティング・パーティが真実であると主張するプリンシパルに関する
ステートメントを伝えるXMLスキーマによって定義されたアサーション。
参加者間でSAMLプロトコル・メッセージを転送するために下位レベルの
通信またはメッセージングプロトコル(HTTPまたはSOAPなど)を使用する方法
通常、アサーションは以下から構成される。
いくつかの一般化された要求/応答プロトコルを定義する。
トランスポート層上で、プロトコルメッセージをどのように伝達するか?
特定シナリオでアサーション、プロトコル、バインディングの組合せ(制約)を定義
Transport Protocol
<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Version="2.0" IssueInstant="2004-12-05T09:22:05Z">
<saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">
https://idp.example.org/SAML2
</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">...</ds:Signature>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
testuser@gmail.com
</saml:NameID>
</saml:Subject>
<saml:Conditions
NotBefore="2004-12-05T09:17:05Z"
NotOnOrAfter="2004-12-05T09:27:05Z">
</saml:Conditions>
<saml:AuthnStatement
AuthnInstant="2004-12-05T09:22:00Z" SessionIndex="xxxxxxxxxxx">
<saml:AuthnContext>
<saml:AuthnContextClassRef>
urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
</saml:AuthnContextClassRef>
</saml:AuthnContext>
</saml:AuthnStatement>
</saml:Assertion><samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="identifier_2" InResponseTo="identifier_1" Version="2.0" IssueInstant="2004-12-05T09:22:05Z" Destination="https://sp.example.com/SAML2/SSO/POST">
<saml:Issuer>https://idp.example.org/SAML2</saml:Issuer>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</samlp:Status>
<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="identifier_3" Version="2.0" IssueInstant="2004-12-05T09:22:05Z">
<saml:Issuer>https://idp.example.org/SAML2</saml:Issuer>
<!-- a POSTed assertion MUST be signed -->
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">...</ds:Signature>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">3f7b3dcf-1674-4ecd-92c8-1544f346baf8</saml:NameID>
<saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml:SubjectConfirmationData InResponseTo="identifier_1" Recipient="https://sp.example.com/SAML2/SSO/POST" NotOnOrAfter="2004-12-05T09:27:05Z"/>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Conditions NotBefore="2004-12-05T09:17:05Z" NotOnOrAfter="2004-12-05T09:27:05Z">
<saml:AudienceRestriction>
<saml:Audience>https://sp.example.com/SAML2</saml:Audience>
</saml:AudienceRestriction>
</saml:Conditions>
<saml:AuthnStatement AuthnInstant="2004-12-05T09:22:00Z" SessionIndex="identifier_3">
<saml:AuthnContext>
<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
</saml:AuthnContext>
</saml:AuthnStatement>
</saml:Assertion>
</samlp:Response>OASISは「SGML Open」として1993年、
主に「研修活動を通じたSGMLの採用促進を目的として」結成された、
SGMLツール業者の業界団体。
http://docs.oasis-open.org/security/saml/v2.0/saml-2.0-os.zip
以下のQiitaを参考にすると、TechnicalOverview? をざっと眺めて、
どの Profile か選択してから Profile, binding, core と見ていくとイイらしい。
- https://www.oasis-open.org/committees/download.php/27819/sstc-saml-tech-overview-2.0-cd-02.pdf
- https://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf
- https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf
- https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf
- https://www.w3.org/TR/xmldsig-core1/
SAMLのセキュリティとプライバシーの特性について分析/説明。
http://www.oasis-open.org/committees/security/.
http://www.oasis-open.org/committees/wss/
https://www.osstech.co.jp/_media/techinfo/opensso/osstech-opensso-study-02-saml.pdf
https://www.osstech.co.jp/_media/techinfo/seminar/hbstudy-20110416-sso.pdf
※同じ言葉でも、他のプロトコルでは意味が違うことがあるので注意
事前に IdP の証明書を SP に登録しておく必要がある(JWTみたいなもの)
<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
Version="2.0"
ID="s2907181983bc6f588aeb045fca183d671224506ec"
IssueInstant="2009-11-18T08:28:09Z">
アサーション発行者
アサーションのデジタル署名
ユーザー識別子(NameID)
</saml:Assertion>
<samlp:AuthnRequest ID=”xxx” Version=”2.0”
Destination=”http://idp.osstech.co.jp/idp/sso”>
認証要求情報
</samlp:AuthnRequest><samlp:Response ID=”xxx” Version=”2.0”
Destination”http://sp.osstech.co.jp/sp/sso”>
< saml:Assertion ...>
アサーション
</saml:Assertion>
</samlp:AuthnRequest>https://www.osstech.co.jp/_media/techinfo/openam/saml_authncontext_20150417.pdf
http://developer.cybozu.co.jp/tech/?p=4224
SAMLはSecurity Assertion Markup Languageの略で、OASIS3によって策定された、
異なるセキュリティドメイン間で、認証情報を連携するためのXMLベースの標準仕様。
Tags: :IT国際標準, :認証基盤, :クレームベース認証, :SAML