「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
目次 †
概要 †
汎用認証サイトにSAML2.0を実装するため仕様を読む。
- ターゲットはSP Initiated な Web Browser SSO Profileに絞る。
- ココに書いた情報は、SAML Core の Assertionの範囲。
以下 †
アサーション内では、一連の内部要素が以下のステートメントを記述する。
- 認証:Subjectは特定の時点で特定の手段によって認証されました。
- 属性:Subjectは提供された属性に関連付けられています。
- 許可決定:指定されたリソースにアクセスする要求が許可または拒否されました。
※ saml-core-2.0-os.pdfの内容が微妙なので、
本要素 †
Attribute †
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | ID | Required | xs:ID | 400 ビット以内のID | ○ |
2 | Version | Required | "2.0" | バージョンを指定 | ○ |
3 | IssueInstant? | Required | UTC time | 発行時刻を指定 | ○ |
Elements †
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | saml:Issuer | Required | URI | - | IdP の URI | ○ |
2 | ds:Signature | Required | - | XML署名 | ○ |
3 | saml:Subject | Optional | - | 拡張スキーマで定義される Subject の方向 | ○ |
4 | saml:Statement | Optional | - | 任意情報 | ○ |
5 | saml:AuthnStatement? | Optional | - | 認証情報 | ○ |
6 | saml:AuthzStatement? | Optional | - | 認可情報 | - |
7 | saml:AttributeStatement? | Optional | - | 属性情報 | - |
8 | saml:Conditions | Optional | - | 有効性を評価する時に考慮すべき条件 | - |
9 | saml:Advice | Optional | - | 付加情報 | - |
子要素 †
Subject †
- Elements
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | saml:BaseID | Choice | URI | - | Subjectの識別子を指定 | - |
2 | saml:NameID | ○ |
3 | saml:EncryptedID | - |
4 | saml:SubjectConfirmation? | Optional | - | Subjectの情報(下記参照) | ○ |
NameID †
- Attribute
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | NameQualifier? | Optional | string | - | 識別名を衝突させないよう修飾するセキュリティまたは管理のドメイン | - |
2 | SPNameQualifier? | Optional | string | - | 名称を指定する付加的な手段を提供するSP またはプロバイダ連合の名称 | - |
3 | Format | Optional | URI | urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified(ユーザ名) | 識別子の分類を表す参照URI | ○ |
urn:oasis:names:tc:SAML:1.1:nameid-format:entity(Public UserID) | ○ |
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress(メアド) | ○ |
urn:oasis:names:tc:SAML:1.1:nameid-format:persistent(Pairwise UserID) | ○ |
urn:oasis:names:tc:SAML:1.1:nameid-format:persistent(一時的) | |
4 | SPProvidedID | Optional | string | - | ? | - |
SubjectConfirmation? †
- Attribute
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | Method | Required | URI | urn:oasis:names:tc:SAML:2.0:cm:bearer | bearerをポイント | ○ |
- Elements
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | saml:BaseID | Choice | URI | - | Subjectの識別子を指定 | - |
2 | saml:NameID | ○ |
3 | saml:EncryptedID | - |
4 | saml:SubjectConfirmationData? | Optional | - | Subjectの情報(下記参照) | ○ |
SubjectConfirmationData? †
- Attribute
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | InResponseTo? | Optional | xs:ID | - | Responseメッセージの ID | ○ |
2 | NotBefore? | Optional | UTC time | - | Subjectの利用の開始時刻を指定 | - |
3 | NotOnOrAfter? | Optional | UTC time | - | Subjectの利用の終了時刻を指定 | ○ |
4 | Recipient | Optional | URL | - | SPのエンドポイント | ○ |
5 | Address | Optional | IPアドレス | - | IdPのエンドポイント | - |
Conditions †
- Attribute
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | NotBefore? | Optional | UTC time | - | Assertionの利用の開始時刻を指定 | ○ |
2 | NotOnOrAfter? | Optional | UTC time | - | Assertionの利用の終了時刻を指定 | ○ |
- Elements
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | saml:AudienceRestriction? | AnyNumber? | <saml:Audience> | - | <saml:Audience>にSPのURL | ○ |
2 | saml:OneTimeUse? | Optional | ? | - | アサーションを保持しない | - |
3 | saml:ProxyRestriction? | Optional | ? | - | 利用者によるAssertion発行に関する制約条件 | - |
4 | saml:Condition | Optional | ? | - | ? | - |
※ Any Number:型が違う時に要否が変わる場合は、この表現。
AuthnStatement? †
- Attribute
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | AuthnInstant? | Required | UTC time | - | 認証した時間 | ○ |
2 | SessionIndex? | Optional | - | 認証セッションのインデックス | - |
3 | SessionNotOnOrAfter? | Optional | UTC time | - | 認証セッションの有効期限 | - |
- Elements
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | saml:AuthnContext? | Required | - | 認証コンテキスト(下記参照) | ○ |
1 | saml:SubjectLocality? | Optional | - | Subjectの DNS ドメイン名と IP アドレス | - |
AuthnContext? †
- Elements
# | パラメタ | 要否 | 値 | 既定値 | 内容 | 汎用認証サイト |
1 | saml:AuthnContextClassRef? | Optional | URI | - | 認証コンテキストのクラスの参照 URI | ○ |
2 | saml:AuthnContextDecl? | Choice | URI | - | ? | - |
3 | saml:AuthnContextDeclRef? |
4 | saml:AuthenticatingAuthority? | Zero or More | URI | - | 認証オーソリティの0 以上の一意な識別子 | - |
参考 †
https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf
2 SAML Assertions
2.1 Schema Header and Namespace Declarations
2.2 Name Identifiers
2.2.1 Element <BaseID>
2.2.2 Complex Type NameIDType
2.2.3 Element <NameID>
2.2.4 Element <EncryptedID>
2.2.5 Element <Issuer>
2.3 Assertions
2.3.1 Element <AssertionIDRef>
2.3.2 Element <AssertionURIRef>
2.3.3 Element <Assertion>
2.3.4 Element <EncryptedAssertion>
2.4 Subjects
2.4.1 Element <Subject>
2.4.1.1 Element <SubjectConfirmation>
2.4.1.2 Element <SubjectConfirmationData>
2.4.1.3 Complex Type KeyInfoConfirmationDataType
2.4.1.4 Example of a Key-Confirmed <Subject>
2.5 Conditions
2.5.1 Element <Conditions>
2.5.1.1 General Processing Rules
2.5.1.2 Attributes NotBefore and NotOnOrAfter
2.5.1.3 Element <Condition>
2.5.1.4 Elements <AudienceRestriction> and <Audience>
2.5.1.5 Element <OneTimeUse>
2.5.1.6 Element <ProxyRestriction>
2.6 Advice
2.6.1 Element <Advice>
2.7 Statements
2.7.1 Element <Statement>
2.7.2 Element <AuthnStatement>
2.7.2.1 Element <SubjectLocality>
2.7.2.2 Element <AuthnContext>
2.7.3 Element <AttributeStatement>
2.7.3.1 Element <Attribute>
2.7.3.1.1 Element <AttributeValue>
2.7.3.2 Element <EncryptedAttribute>
2.7.4 Element <AuthzDecisionStatement>
2.7.4.1 Simple Type DecisionType
2.7.4.2 Element <Action>
2.7.4.3 Element <Evidence>
Tags: :IT国際標準, :認証基盤, :クレームベース認証, :SAML