KeycloakのServer Metadataの変遷 again

# KeycloakのServer Metadataの変遷 again

## はじめに

日立製作所の乗松隆志と申します。[2020年](https://qiita.com/tnorimat/items/8d58590ac374a364cc28)に引き続き、KeycloakのServer Metadataの変遷について記します。

**Notes: 本投稿の内容は、公開情報を元に独自に解釈したものです。**

## Server Metadata

Server Metadataとして記載されるクレームは、RFCなど標準仕様で規定のあるものと、製品独自のものがあると考えます。

標準仕様で規定のあるものについて、大きくは2つに分けられると考えます。

* OAuth 2.0の認可サーバーとしてのServer Metadata
* OpenID Connect Core 1.0 (OIDC)のOpenID ProviderとしてのServer Metadata

KeycloakのServer Metadataは、.well-known url(.well-known/openid-configuration)から取得します。

Server Metadataには、その製品がサポートしている機能などが記載されますが、それが全てではないことにご注意ください。

## 12.0.0

2020/12/16に[リリース](https://www.keycloak.org/2020/12/keycloak-1200-released.html)されました。

```
{
 "issuer":"http://localhost:8080/auth/realms/master",
 "authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth",
 "token_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token",
 "introspection_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token/introspect",
 "userinfo_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/userinfo",
 "end_session_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/logout",
 "jwks_uri":"http://localhost:8080/auth/realms/master/protocol/openid-connect/certs",
 "check_session_iframe":"http://localhost:8080/auth/realms/master/protocol/openid-connect/login-status-iframe.html",
 "grant_types_supported":["authorization_code","implicit","refresh_token","password","client_credentials"],
 "response_types_supported":["code","none","id_token","token","id_token token","code id_token","code token","code id_token token"],
 "subject_types_supported":["public","pairwise"],
 "id_token_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "id_token_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],
 "id_token_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],
 "userinfo_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "request_object_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "response_modes_supported":["query","fragment","form_post"],
 "registration_endpoint":"http://localhost:8080/auth/realms/master/clients-registrations/openid-connect",
 "token_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "token_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "claims_supported":["aud","sub","iss","auth_time","name","given_name","family_name","preferred_username","email","acr"],
 "claim_types_supported":["normal"],
 "claims_parameter_supported":true,
 "scopes_supported":["openid","address","email","microprofile-jwt","offline_access","phone","profile","roles","web-origins"],
 "request_parameter_supported":true,
 "request_uri_parameter_supported":true,
 "code_challenge_methods_supported":["plain","S256"],
 "tls_client_certificate_bound_access_tokens":true,
 "revocation_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/revoke",
 "revocation_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "revocation_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "backchannel_logout_supported":true,
 "backchannel_logout_session_supported":true
}
```
11.0.0から以下5つクレームが増え、33クレームとなりました。

|#|クレーム名|参照元|説明|
|:--|:--|:--|:--|
|1|"revocation_endpoint"|参照文献\[2\]|[RFC 7009 OAuth 2.0 Token Revocation](https://datatracker.ietf.org/doc/html/rfc7009) (Token Revocation)によるトークンの無効化要求を受け付けるエンドポイントのURIです。|
|2|"revocation_endpoint_auth_methods_supported"|参照文献\[2\]|[Token Revocation](https://datatracker.ietf.org/doc/html/rfc7009)によるトークンの無効化要求を受け付けるエンドポイントがサポートしているクライアント認証方式です。OIDCの[9節](https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication)で規定の"private_key_jwt","client_secret_basic","client_secret_post","client_secret_jwt"と、RFC 8705 OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Token (MTLS)の[2節](https://datatracker.ietf.org/doc/html/rfc8705#section-2)で規定の"tls_client_auth"がサポートされています。|
|3|"revocation_endpoint_auth_signing_alg_values_supported"|参照文献\[2\]|[Token Revocation](https://datatracker.ietf.org/doc/html/rfc7009)によるトークンの無効化要求を受け付けるエンドポイントがサポートするクライアントの認証方式のうち、[RFC 7519 JSON Web Token](https://datatracker.ietf.org/doc/html/rfc7519) (JWT)への[RFC 7515 JSON Web Signature](https://datatracker.ietf.org/doc/html/rfc7515) (JWS)による署名を使用する方式である"private_key_jwt"と"client_secret_jwt"について、認可サーバーがサポートする署名アルゴリズムのリストです。RFC 7518 JSON Web Algorithms (JWA)の[3節](https://datatracker.ietf.org/doc/html/rfc7518#section-3)で規定のRSASSA-PKCS1-v1_5系のアルゴリズムである"RS256","RS384","RS512",RSASSA-PSS系のアルゴリズムである"PS256","PS384","PS512",ECDSA系のアルゴリズムである"ES256","ES384","ES512"をサポートしています。|
|4|"backchannel_logout_supported"|参照文献\[4\]|OIDCのOpenID Provider (OP)とRelying Party (RP)との間で直接バックチャネルでユーザーのログアウト情報を交換するログアウト方式の標準仕様である、[OpenID Connect Back-Channel Logout 1.0](https://openid.net/specs/openid-connect-backchannel-1_0.html) (OIDC Back-Channel Logout)をサポートしているかどうかを示す真偽値です。Keycloakはこれをサポートしたため、本クレームの値はtrueとなっています。|
|5|"backchannel_logout_session_supported"|参照文献\[4\]|[OIDC Back-Channel Logout](https://openid.net/specs/openid-connect-backchannel-1_0.html)において、OPがRPにsidクレーム(Session ID)を渡すかどうかを示す真偽値です。Keycloakはこれを渡すため、本クレームの値はtrueとなっています。|

以下1クレームで、値の追加がありました。

|#|クレーム名|参照元|説明|
|:--|:--|:--|:--|
|1|"id_token_encryption_alg_values_supported"|参照文献\[3\]|IDトークンに対する[RFC 7516 JSON Web Encryption (JWE)](https://datatracker.ietf.org/doc/html/rfc7516)によるContent Encryption Key (CEK) Management用アルゴリズムのリストです。IDトークンを暗号化するための鍵であるCEKを公開鍵で暗号化するKey Encryption方式であり、JWAの[4節](https://datatracker.ietf.org/doc/html/rfc7518#section-4)で規定のRSAES-PKCS1-v1_5 ("RSA1_5")と、RSAES using Optimal Asymmetric Encryption Padding (OAEP) ("RSA-OAEP")に加えて、新しくRSAES OAEP using SHA-256 and MGF1 with SHA-256（"RSA-OAEP-256"）がサポートされました。|

以下1クレームで、値の変更がありました。

|#|クレーム名|参照元|説明|
|:--|:--|:--|:--|
|1|"claims_parameter_supported"|参照文献\[3\]|OIDCの[5.5節](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter)で規定のclaimsパラメータをサポートするかどうかを示す真偽値です。以前はfalseでしたが、trueとなりました。|

11.0.0からの変更点をかいつまんで言うと、以下のようになります。

* \[OAuth 2.0\] RFC 7009 OAuth 2.0 Token Revocationによるトークンの無効化がサポートされるようになりました。
* \[OIDC\] OpenID Connect Back-Channel Logout 1.0によるバックチャネルログアウトがサポートされるようになりました。
* \[OIDC\] IDトークンに対するJWEによる暗号化について、CEK Management用のアルゴリズムとしてとして"RSA1_5"と"RSA-OAEP"に加えて、新たに"RSA-OAEP-256"がサポートされました。

## 13.0.0

2021/5/6に[リリース](https://www.keycloak.org/2021/05/keycloak-1300-released.html)されました。

```
{
 "issuer":"http://localhost:8080/auth/realms/master",
 "authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth",
 "token_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token",
 "introspection_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token/introspect",
 "userinfo_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/userinfo",
 "end_session_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/logout",
 "jwks_uri":"http://localhost:8080/auth/realms/master/protocol/openid-connect/certs",
 "check_session_iframe":"http://localhost:8080/auth/realms/master/protocol/openid-connect/login-status-iframe.html",
 "grant_types_supported":["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:device_code","urn:openid:params:grant-type:ciba"],
 "response_types_supported":["code","none","id_token","token","id_token token","code id_token","code token","code id_token token"],
 "subject_types_supported":["public","pairwise"],
 "id_token_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "id_token_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],
 "id_token_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],
 "userinfo_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "request_object_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "response_modes_supported":["query","fragment","form_post"],
 "registration_endpoint":"http://localhost:8080/auth/realms/master/clients-registrations/openid-connect",
 "token_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "token_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "introspection_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "introspection_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "claims_supported":["aud","sub","iss","auth_time","name","given_name","family_name","preferred_username","email","acr"],
 "claim_types_supported":["normal"],
 "claims_parameter_supported":true,
 "scopes_supported":["openid","web-origins","profile","phone","roles","address","email","microprofile-jwt","offline_access"],
 "request_parameter_supported":true,
 "request_uri_parameter_supported":true,
 "require_request_uri_registration":true,
 "code_challenge_methods_supported":["plain","S256"],
 "tls_client_certificate_bound_access_tokens":true,
 "revocation_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/revoke",
 "revocation_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "revocation_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "backchannel_logout_supported":true,
 "backchannel_logout_session_supported":true,
 "device_authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth/device",
 "backchannel_token_delivery_modes_supported":["poll"],
 "backchannel_authentication_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/ext/ciba/auth"
}
```

12.0.0から以下6つクレームが増え、39クレームとなりました。

|#|クレーム名|参照元|説明|
|:--|:--|:--|:--|
|1|"introspection_endpoint_auth_methods_supported"|参照文献\[2\]|[RFC 7636 OAuth 2.0 Token Introspection](https://datatracker.ietf.org/doc/html/rfc7662) (Token Introspection)によるトークンイントロスペクションを受け付けるエンドポイントがサポートしているクライアント認証方式です。OIDCの[9節](https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication)で規定の"private_key_jwt","client_secret_basic","client_secret_post","client_secret_jwt"と、MTLSの[2節](https://datatracker.ietf.org/doc/html/rfc8705#section-2)で規定の"tls_client_auth"がサポートされています。|
|2|"introspection_endpoint_auth_signing_alg_values_supported"|参照文献\[2\]|[Token Introspection](https://datatracker.ietf.org/doc/html/rfc7662)によるトークンイントロスペクションを受け付けるエンドポイントがサポートするクライアントの認証方式のうち、[JWT](https://datatracker.ietf.org/doc/html/rfc7519)への[JWS](https://datatracker.ietf.org/doc/html/rfc7515)による署名を使用する方式である"private_key_jwt"と"client_secret_jwt"について、認可サーバーがサポートする署名アルゴリズムのリストです。JWAの[3節](https://datatracker.ietf.org/doc/html/rfc7518#section-3)で規定のの"RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"をサポートしています。|
|3|"require_request_uri_registration"|参照文献\[3\]|RPに対し予めrequest_uriパラメータの値を登録することを必須とするかどうかを示す真偽値です。Keycloakはこれを必須とするため、本クレームの値はtrueとなっています。|
|4|"device_authorization_endpoint"|参照文献\[1\]|[RFC 8628 OAuth 2.0 Device Authorization Grant](https://datatracker.ietf.org/doc/html/rfc8628) (Device Authorization Grant)による認可リクエストを受け付けるエンドポイントのURIです。|
|5|"backchannel_token_delivery_modes_supported"|参照文献\[5\]|OPがサポートする[OpenID Connect Client-Initiated Backchannel Authentication Flow - Core 1.0](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html) (CIBA)の動作モードを表します。KeycloakはPoll Modeをサポートします。|
|6|"backchannel_authentication_endpoint"|参照文献\[5\]|[CIBA](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html)において、OPが認証リクエストを受け付けるエンドポイントのURIを表します。|

以下1クレームで、値の追加がありました。

|#|クレーム名|参照元|説明|
|:--|:--|:--|:--|
|1|"grant_types_supported"|参照文献\[2\]|KeycloakがサポートしているGrant Typeのリストです。新しく[Device Authorization Grant](https://datatracker.ietf.org/doc/html/rfc8628)と[CIBA](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html)がサポートされました。|

12.0.0からの変更点をかいつまんで言うと、以下のようになります。

* \[OAuth 2.0\] RFC 7636 OAuth 2.0 Token Introspectionによるトークンイントロスペクション時のクライアント認証をサポートしました。
* \[OAuth 2.0\] RFC 8628 OAuth 2.0 Device Authorization Grantをサポートしました。
* \[OIDC\] OpenID Connect Client-Initiated Backchannel Authentication Flow (CIBA)のPoll Modeをサポートしました。

## 14.0.0

2021/6/18に[リリース](https://www.keycloak.org/2021/06/keycloak-1400-released.html)されました。

```
{
 "issuer":"http://localhost:8080/auth/realms/master",
 "authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth",
 "token_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token",
 "introspection_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token/introspect",
 "userinfo_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/userinfo",
 "end_session_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/logout",
 "jwks_uri":"http://localhost:8080/auth/realms/master/protocol/openid-connect/certs",
 "check_session_iframe":"http://localhost:8080/auth/realms/master/protocol/openid-connect/login-status-iframe.html",
 "grant_types_supported":["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:device_code","urn:openid:params:grant-type:ciba"],
 "response_types_supported":["code","none","id_token","token","id_token token","code id_token","code token","code id_token token"],
 "subject_types_supported":["public","pairwise"],
 "id_token_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "id_token_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],
 "id_token_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],
 "userinfo_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "request_object_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "response_modes_supported":["query","fragment","form_post"],
 "registration_endpoint":"http://localhost:8080/auth/realms/master/clients-registrations/openid-connect",
 "token_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "token_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "introspection_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "introspection_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "claims_supported":["aud","sub","iss","auth_time","name","given_name","family_name","preferred_username","email","acr"],
 "claim_types_supported":["normal"],
 "claims_parameter_supported":true,
 "scopes_supported":["openid","phone","profile","web-origins","roles","address","email","microprofile-jwt","offline_access"],
 "request_parameter_supported":true,
 "request_uri_parameter_supported":true,
 "require_request_uri_registration":true,
 "code_challenge_methods_supported":["plain","S256"],
 "tls_client_certificate_bound_access_tokens":true,
 "revocation_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/revoke",
 "revocation_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "revocation_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "backchannel_logout_supported":true,
 "backchannel_logout_session_supported":true,
 "device_authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth/device",
 "backchannel_token_delivery_modes_supported":["poll"],
 "backchannel_authentication_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/ext/ciba/auth"
}
```

13.0.0から変化はありません。

## 15.0.2

2021/8/20に[リリース](https://www.keycloak.org/2021/08/keycloak-1502-released.html)されました。

```
{
 "issuer":"http://localhost:8080/auth/realms/master",
 "authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth",
 "token_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token",
 "introspection_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token/introspect",
 "userinfo_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/userinfo",
 "end_session_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/logout",
 "jwks_uri":"http://localhost:8080/auth/realms/master/protocol/openid-connect/certs",
 "check_session_iframe":"http://localhost:8080/auth/realms/master/protocol/openid-connect/login-status-iframe.html",
 "grant_types_supported":["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:device_code","urn:openid:params:grant-type:ciba"],
 "response_types_supported":["code","none","id_token","token","id_token token","code id_token","code token","code id_token token"],
 "subject_types_supported":["public","pairwise"],
 "id_token_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "id_token_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],
 "id_token_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],
 "userinfo_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "request_object_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512","none"],
 "request_object_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],
 "request_object_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],
 "response_modes_supported":["query","fragment","form_post","query.jwt","fragment.jwt","form_post.jwt","jwt"],
 "registration_endpoint":"http://localhost:8080/auth/realms/master/clients-registrations/openid-connect",
 "token_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "token_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "introspection_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "introspection_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "authorization_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "authorization_encryption_alg_values_supported":["RSA-OAEP","RSA-OAEP-256","RSA1_5"],
 "authorization_encryption_enc_values_supported":["A256GCM","A192GCM","A128GCM","A128CBC-HS256","A192CBC-HS384","A256CBC-HS512"],
 "claims_supported":["aud","sub","iss","auth_time","name","given_name","family_name","preferred_username","email","acr"],
 "claim_types_supported":["normal"],
 "claims_parameter_supported":true,
 "scopes_supported":["openid","offline_access","email","address","roles","web-origins","microprofile-jwt","phone","profile"],
 "request_parameter_supported":true,
 "request_uri_parameter_supported":true,
 "require_request_uri_registration":true,
 "code_challenge_methods_supported":["plain","S256"],
 "tls_client_certificate_bound_access_tokens":true,
 "revocation_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/revoke",
 "revocation_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],
 "revocation_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],
 "backchannel_logout_supported":true,
 "backchannel_logout_session_supported":true,
 "device_authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth/device",
 "backchannel_token_delivery_modes_supported":["poll","ping"],
 "backchannel_authentication_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/ext/ciba/auth",
 "backchannel_authentication_request_signing_alg_values_supported":["PS384","ES384","RS384","ES256","RS256","ES512","PS256","PS512","RS512"],
 "require_pushed_authorization_requests":false,
 "pushed_authorization_request_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/ext/par/request",
 "mtls_endpoint_aliases":{
  "token_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token",
  "revocation_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/revoke",
  "introspection_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/token/introspect",
  "device_authorization_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/auth/device",
  "registration_endpoint":"http://localhost:8080/auth/realms/master/clients-registrations/openid-connect",
  "userinfo_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/userinfo",
  "pushed_authorization_request_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/ext/par/request",
  "backchannel_authentication_endpoint":"http://localhost:8080/auth/realms/master/protocol/openid-connect/ext/ciba/auth"
 }
}
```

14.0.0から以下9つクレームが増え、48クレームとなりました。

|#|クレーム名|参照元|説明|
|:--|:--|:--|:--|
|1|"request_object_encryption_alg_values_supported"|参照文献\[3\]|リクエストオブジェクトに対する[JWE](https://datatracker.ietf.org/doc/html/rfc7516)によるCEK Management用アルゴリズムのリストです。リクエストオブジェクトを暗号化するための鍵であるCEKを公開鍵で暗号化するKey Encryption方式であり、JWAの[4節](https://datatracker.ietf.org/doc/html/rfc7518#section-4)で規定の"RSA1_5","RSA-OAEP","RSA-OAEP-256"がサポートされました。|
|2|"request_object_encryption_enc_values_supported"|参照文献\[3\]|リクエストオブジェクトに対する[JWE](https://datatracker.ietf.org/doc/html/rfc7516)によるContent Encryption用アルゴリズムのリストです。JWAの[5節](https://datatracker.ietf.org/doc/html/rfc7518#section-5)で規定のAuthenticated Encryption (認証付き暗号)方式である、AES 128bit key Cipher Block Chain mode (CBC) with HMAC SHA-256 Authenticated Encryption ("A128CBC-HS256")、AES 192bit key CBC with HMAC SHA-384 Authenticated Encryption ("A192CBC-HS384")、AES 256bit key CBC with HMAC SHA-512 Authenticated Encryption ("A256CBC-HS512")、AES 128bit key Galois/Counter Mode (GCM) ("A128GCM")、AES 192bit key GCM ("A192GCM")、AES 256bit key GCM ("A256GCM")がサポートされました。|
|3|"authorization_signing_alg_values_supported"|参照文献\[6\]|[Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0](https://openid.net/specs/openid-financial-api-jarm.html) (JARM)による認可レスポンスについて、認可サーバーがサポートする署名アルゴリズムのリストです。JWAの[3節](https://datatracker.ietf.org/doc/html/rfc7518#section-3)で規定の"RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"をサポートしています。|
|4|"authorization_encryption_alg_values_supported"|参照文献\[6\]|[JARM](https://openid.net/specs/openid-financial-api-jarm.html)による認可レスポンスに対する[JWE](https://datatracker.ietf.org/doc/html/rfc7516)によるCEK Management用アルゴリズムのリストです。リクエストオブジェクトを暗号化するための鍵であるCEKを公開鍵で暗号化するKey Encryption方式であり、JWAの[4節](https://datatracker.ietf.org/doc/html/rfc7518#section-4)で規定の"RSA1_5","RSA-OAEP","RSA-OAEP-256"がサポートされました。|
|5|"authorization_encryption_enc_values_supported"|参照文献\[6\]|[JARM](https://openid.net/specs/openid-financial-api-jarm.html)による認可レスポンスに対する[JWE](https://datatracker.ietf.org/doc/html/rfc7516)によるContent Encryption用アルゴリズムのリストです。JWAの[5節](https://datatracker.ietf.org/doc/html/rfc7518#section-5)で規定の"A128CBC-HS256","A192CBC-HS384","A256CBC-HS512","A128GCM","A192GCM","A256GCM"がサポートされました。|
|6|"backchannel_authentication_request_signing_alg_values_supported"|参照文献\[5\]|[CIBA](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html)による認証リクエストについて、OPがサポートする署名アルゴリズムのリストです。JWAの[3節](https://datatracker.ietf.org/doc/html/rfc7518#section-3)で規定の"RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"をサポートしています。|
|7|"require_pushed_authorization_requests"|参照文献\[1\]|[RFC 9126 OAuth 2.0 Pushed Authorization Requests](https://datatracker.ietf.org/doc/html/rfc9126) (PAR)で規定のPushed Authorization Requestでのみ認可リクエストを受け付けるかどうかを示します。Keycloakはそれ以外の方式での認可リクエストも従来通り受け付けるため、falseの値をとっています。|
|8|"pushed_authorization_request_endpoint"|参照文献\[1\]|[PAR](https://datatracker.ietf.org/doc/html/rfc9126)で規定のPushed Authorization Requestを受け付けるエンドポイントのURIを示します。|
|9|"mtls_endpoint_aliases"|参照文献\[1\]|[MTLS](https://datatracker.ietf.org/doc/html/rfc8705)で規定のクライアント認証方式である"tls_client_auth"や、Certificate-Bound Access Tokensを利用する場合に、クライアントがアクセスするべき認可サーバーの各種エンドポイントのURIを示します。|

以下2クレームで、値の追加がありました。

|#|クレーム名|参照元|説明|
|:--|:--|:--|:--|
|1|"response_modes_supported"|参照文献\[1\]|[OAuth 2.0 Multiple Response Type Encoding Practices](https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html)で規定のresponse_modeパラメータは、認可レスポンスの返し方を示します。本クレームは、認可サーバーであるKeycloakがサポートしている認可レスポンスの返し方を示します。KeycloakはJARMをサポートしたことから、従来の"query","fragment","form_post"に加えて、新しく"query.jwt","fragment.jwt","form_post.jwt","jwt"が追加されました。|
|2|"backchannel_token_delivery_modes_supported"|参照文献\[5\]|[CIBA](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html)の動作モードを表します。Keycloakは従来のPoll Modeに加えて、新しくPing Modeをサポートしました。|

14.0.0からの変更点をかいつまんで言うと、以下のようになります。

* \[OAuth 2.0\] Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)をサポートし、認可レスポンスに対するJWSによる電子署名と、JWEによる暗号化をサポートしました。
* \[OAuth 2.0\] RFC 9126 OAuth 2.0 Pushed Authorization Requests (PAR)をサポートしました。
* \[OIDC\] リクエストオブジェクトに対する、JWEによる暗号化をサポートしました。
* \[OIDC\] CIBAの認証リクエストに対する、JWSによる電子署名をサポートしました。
* \[OIDC\] CIBAのPing Modeをサポートしました。

## 参照文献

\[1\] [OAuth Parameters](https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml)

IANAのRegistryに登録済みの、OAuth 2.0に関する各種パラメータの一覧です。

\[2\] [RFC 8414 OAuth 2.0 Authorization Server Metadata](https://datatracker.ietf.org/doc/html/rfc8414)

OAuth 2.0における認可サーバーのメタデータの定義です。このRFCは、2018年6月に策定されています。その為、これ以後に標準化された認可サーバーのメタデータはここには載っていません。その場合、そのメタデータを規定している標準仕様か、上述の\[1\]を参照ください。

\[3\] [OpenID Connect Discovery 1.0 - 3. OpenID Provider Metadata](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata)

OIDCにおけるOpenID Providerのメタデータの定義です。

\[4\] [OpenID Connect Back-Channel Logout 1.0](https://openid.net/specs/openid-connect-backchannel-1_0.html)

OIDCにおけるOpenID Provider(OP)とRelying Party(RP)との間で直接バックチャネルでユーザーのログアウト情報を交換するログアウト方式の標準仕様です。

\[5\] [OpenID Connect Client-Initiated Backchannel Authentication Flow - Core 1.0 (CIBA)](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html)

OIDCにおける認証フローを開始するにあたり、RPがOPにエンドユーザーのブラウザを介して間接的にリクエストを出す（フロントチャネル通信）のではなく、OPに対し直接リクエストを出す（バックチャネル通信）方式の標準仕様です。

\[6\] [Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)](https://openid.net/specs/openid-financial-api-jarm.html)

OAuth 2.0において、ディジタル署名や暗号化を用いることで認可サーバーからクライアントへ認可レスポンスを安全に渡すための標準仕様です。