43 views
# (OpenID Connect Core 1.0) 8. Subject Identifier Types ###### tags: `oauth2/oidc` 担当::@Ras: 箇所:https://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes [toc maxlevel=5] :::info [1.2 Terminology](https://openid.net/specs/openid-connect-core-1_0.html#Terminology) より **Sector Identifier** Host component of a URL used by the Relying Party's organization that is an input to the computation of pairwise Subject Identifiers for that Relying Party. **Subject Identifier** Locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client. ::: Subject Identifierは、End-User用のIssuer内でローカルに一意で決して再割り当てされない識別子であり、Clientによって利用されることを意図している。 本仕様では2つのSubject Idntifier typesを定義している。 - `public` - 全てのClientに同一の`sub`(subject)値を提供する - providerがdiscovery document内に`subject_types_supported`要素を持っていない場合、このtypeがデフォルトになる - `pairwise` - 各Clientに異なる`sub`値を提供する - このtypeを使うとClient(s)はEnd-Userの活動を許可なしに関連付けられない **[SHOULD]** OpenID Providerのdiscovery documentは、サポートされるSubject Identifier typesを`subject_types_supported`をリストにまとめるべきである。 **[MAY]** もし複数のtypeが配列にリストされている場合、ClientはRegistration時に`subject_type`パラメータを使って優先するidentifier typeを提供することを選択してもよい。 ## 8.1. Pairwise Identifier Algorithm **[MUST]** pairwise Subject Identifierが使われるとき、OpenID Providerはユニークな`sub`値を各Sector Identifier用に計算しなければならない。 **[MUST NOT]** Subject Identifier値は、OpenID Provider以外の任意のpartyによって可逆(reversible)であってはならない。 **[SHOULD]** 対(pairwise)の`sub`値を使っていて[Dynamic Client Registration](https://openid.net/specs/openid-connect-core-1_0.html#OpenID.Registration)をサポートしているProviderは、`sector_identifier_uri`パラメータを使用するべきである。このパラメータは、共通の管理統制下にあるWebサイト群が各々のドメイン名とは独立に対の`sub`値の一貫性を持つ方法を提供する。 Clientが`sector_identifier_uri`を提供していない場合、pairwise identifierの計算に使われるSector Identifierは登録済みの`redirect_uri`のホスト部分である。 **[MUST]** もし、複数のホスト名が`redirect_uris`に登録されている場合、Clientは`sector_identifier_uri`を登録しなければならない。 `sector_identifier_uri`が提供された時、URLのホスト部分がSector Identifierとしてpairwise identifierの計算に使われる。 **[MUST]** `sector_identifier_uri`の値は、`redirect_uris`の配列値を含むJSONファイルを指す`https`スキーマのURLでなければならない。 以下のプロパティを持つ任意のアルゴリズムは、pairwise Subject Identifierを計算するためにOpenID providerで使うことができる。 - **[MUST NOT]** Subject Identifier値は、OpenID Provider以外の任意のpartyによって可逆であってはならない - **[MUST]** 異なるSector Identifier値は、異なるSubject Identifier値にならなければならない - **[MUST]** アルゴリズムは、決定的でなければならない [ここに例が入る]