「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
目次 †
概要 †
Finalを参照して記述。
Client(RP)が、(Discoveryで発見した)Idp/STS(OP)に、動的な登録を行う、
「クライアント登録エンドポイント」の仕様について記載してある。
詳細 †
TLSサポートと、TLS証明書のチェックが必要。
クライアント・メタデータ †
用途 †
クライアント・メタデータの値は、次の2つの方法で使用される。
- 入出力値
- 入力値: 登録要求時の
- 出力値: 登録応答および読み取り応答の
多言語化 †
- client_name、tos_uri、policy_uri、logo_uri、およびclient_uriなどの値は、
一部のクライアント登録で複数のロケール固有の値を持つことがある。
一覧 †
- クライアント情報パラメタ
# | パラメタ | 要件 | 説明 | 1 | application_type | OPTIONAL | native or webのJSON配列。既定値は「web」。 | 2 | contacts | OPTIONAL | クライアントを担当する担当者の電子メールアドレスの配列。 | 3 | client_name | OPTIONAL | クライアントがエンドユーザに提示する、クライアント名。 | 4 | logo_uri | OPTIONAL | クライアントがエンドユーザに提示する、アプリケーションのロゴのURL。 | 5 | client_uri | OPTIONAL | クライアントがエンドユーザに提示する、ホームページのURL。 | 6 | policy_uri | OPTIONAL | クライアントがエンドユーザに提示する、プロファイル利用規約のURL。 | 7 | tos_uri | OPTIONAL | クライアントがエンドユーザに提示する、サービス利用規約のURL。 |
クライアント登録エンドポイント †
初期アクセス トークン †
- 公開動的登録をサポートする場合、エンドポイントは初期アクセス トークンなしで登録要求を受け入れるべき。
- (この仕様の範囲外の方法で)初期アクセス トークンを要求し、許可されたクライアントだけに登録要求を制限することができる。
登録リクエスト †
- パラメタ一覧
任意のクライアント・メタデータのパラメタを使用して、
HTTP POSTメッセージをクライアント登録エンドポイントに送信
- 例
POST /connect/register HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: server.example.com
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJ ...
{
"application_type": "web",
"redirect_uris":
["https://client.example.org/callback",
"https://client.example.org/callback2"],
"client_name": "My Example",
"client_name#ja-Jpan-JP":
"クライアント名",
"logo_uri": "https://client.example.org/logo.png",
"subject_type": "pairwise",
"sector_identifier_uri":
"https://other.example.net/file_of_redirect_uris.json",
"token_endpoint_auth_method": "client_secret_basic",
"jwks_uri": "https://client.example.org/my_public_keys.jwks",
"userinfo_encrypted_response_alg": "RSA1_5",
"userinfo_encrypted_response_enc": "A128CBC-HS256",
"contacts": ["ve7jtb@example.org", "mary@example.org"],
"request_uris":
["https://client.example.org/rf.txt
#qpXaRLh_n93TTR9F252ValdatUQvQiJi5BDub2BeznA"]
}
登録レスポンス †
登録メタデータとともに、プロビジョニングされたフィールドを含めて返す。
- 成功
# | パラメタ | 要件 | 説明 | 1 | client_id | REQUIRED | 登録したクライアントのclient_id | 2 | client_id_issued_at | OPTIONAL | client_idが発行された時刻。 | 3 | client_secret | OPTIONAL | 登録したクライアントのclient_secret (PKCEやprivate_key_jwtなどのケースがあるので) | 4 | client_secret_expires_at | REQUIRED | client_secretが期限切れになる時刻。 (client_secretが発行された場合は必須) | 5 | registration_access_token | OPTIONAL | 後続のクライアント登録操作を実行するための登録アクセス トークン。 | 6 | registration_client_uri | OPTIONAL | 前述のregistration_access_tokenを使用して、 後続のクライアント登録操作を実行するための構成エンドポイントの場所。 |
- 成功
HTTP/1.1 201 Created
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{
"client_id": "s6BhdRkqt3",
"client_secret":
"ZJYCqe3GGRvdrudKyZS0XhGv_Z45DuKhCUk0gBR1vZk",
"client_secret_expires_at": 1577858400,
"registration_access_token":
"this.is.an.access.token.value.ffx83",
"registration_client_uri":
"https://server.example.com/connect/register?client_id=s6BhdRkqt3",
"token_endpoint_auth_method":
"client_secret_basic",
"application_type": "web",
"redirect_uris":
["https://client.example.org/callback",
"https://client.example.org/callback2"],
"client_name": "My Example",
"client_name#ja-Jpan-JP":
"クライアント名",
"logo_uri": "https://client.example.org/logo.png",
"subject_type": "pairwise",
"sector_identifier_uri":
"https://other.example.net/file_of_redirect_uris.json",
"jwks_uri": "https://client.example.org/my_public_keys.jwks",
"userinfo_encrypted_response_alg": "RSA1_5",
"userinfo_encrypted_response_enc": "A128CBC-HS256",
"contacts": ["ve7jtb@example.org", "mary@example.org"],
"request_uris":
["https://client.example.org/rf.txt
#qpXaRLh_n93TTR9F252ValdatUQvQiJi5BDub2BeznA"]
}
クライアント構成エンドポイント †
定義された仕様はHTTP GETメソッドのみ
登録アクセス トークン †
registration_access_tokenで返された登録アクセス トークンを使用
構成の更新リクエスト・レスポンス †
- リクエスト
registration_client_uriで返されたURLとQueryString?を使用して、
任意のクライアント・メタデータのパラメタを送る。
構成の読取リクエスト・レスポンス †
- 成功
更新されていない限り、registration_access_tokenまたはregistration_client_uri値を含める必要はない。
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{
"client_id": "s6BhdRkqt3",
"client_secret":
"OylyaC56ijpAQ7G5ZZGL7MMQ6Ap6mEeuhSTFVps2N4Q",
"client_secret_expires_at": 17514165600,
"registration_client_uri":
"https://server.example.com/connect/register?client_id=s6BhdRkqt3",
"token_endpoint_auth_method":
"client_secret_basic",
"application_type": "web",
"redirect_uris":
["https://client.example.org/callback",
"https://client.example.org/callback2"],
"client_name": "My Example",
"client_name#ja-Jpan-JP":
"クライアント名",
"logo_uri": "https://client.example.org/logo.png",
"subject_type": "pairwise",
"sector_identifier_uri":
"https://other.example.net/file_of_redirect_uris.json",
"jwks_uri": "https://client.example.org/my_public_keys.jwks",
"userinfo_encrypted_response_alg": "RSA1_5",
"userinfo_encrypted_response_enc": "A128CBC-HS256",
"contacts": ["ve7jtb@example.org", "mary@example.org"],
"request_uris":
["https://client.example.org/rf.txt
#qpXaRLh_n93TTR9F252ValdatUQvQiJi5BDub2BeznA"]
}
sector_identifier_uri検証 †
sector_identifier_uri値 †
- httpsスキームを使用するURL
- redirect_uri値の配列を含むJSONファイルを参照できる。
これにより、クライアントの再登録をせずに、redirect_uri値を変更可能。
- また、pairwiseのsubクレーム値を計算するのにも使用する。
リクエスト・レスポンス †
- レスポンス
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
[ "https://client.example.org/callback",
"https://client.example.org/callback2",
"https://client.other_company.example.net/callback" ]
考慮事項 †
実装 †
OAuth 2.0 の Registration †
必要に応じて以下をサポートしても良い。
プレファイナルIETF仕様 †
-
ステートレス動的クライアント登録 †
- client_id値にクライアントに関する必要な登録情報をエンコード
- クライアントの初期登録によって、以下は返されないため、読み取り操作は不可能。
- 登録アクセストークン
- クライアント構成エンドポイント
セキュリティ †
偽装 †
- クライアント情報パラメタの情報でクライアント偽装がされる可能性がある。
- Idp/STS(OP)はフィッシングのリスクを軽減するために措置を講じる必要がある。
ネイティブ・コード・リーク †
- カスタムURIスキームの利用によってリークする可能性がある。
- この問題は、IETF OAuthワーキンググループで議論されており、標準的な解決策が開発されることが期待される。
参考 †
Tags: :IT国際標準, :認証基盤, :クレームベース認証, :OAuth
|