2021年9月以降に更新されたWindows Serverコンテナを含むSitecore製品のイメージを使用すると、Sitecore Identity Serverの認証に問題が発生し(例:Docker Composeのセットアップのログインに成功せず、https://xp1id.localhost/connect/authorizeページにリダイレクトされる)、Sitecore Identity Serverのログに以下のようなエラーが表示される可能性があります。
[15:58:47] IdentityServer4.Hosting.IdentityServerMiddleware [Fatal] Unhandled exception: "IDX10630: The '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]' for signing cannot be smaller than '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]' bits. KeySize: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. (Parameter 'key.KeySize')"
System.ArgumentOutOfRangeException: IDX10630: The '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]' for signing cannot be smaller than '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]' bits. KeySize: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. (Parameter 'key.KeySize')
at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider.ValidateAsymmetricSecurityKeySize(SecurityKey key, String algorithm, Boolean willCreateSignatures)
at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, String algorithm, Boolean willCreateSignatures) ...
本事象は、RSAキーのサイズが2048ビット未満のIdentity Server証明書(k8sでは「sitecore-identitycertificate.txt」、「compose.env」のファイルでは「SITECORE_ID_CERTIFICATE」)を生成するときに発生します。
本事象を解決するには、次のいずれかの方法をご検討ください。