- 入门指南
- 要求
- 最佳实践
- 安装
- 正在更新
- 身份服务器
- 对启动错误进行故障排除
Apart from the prerequisites listed here for Orchestrator installation, Identity Server needs valid certificates.
证书
Identity Server 需要以下有效证书:
-
A certificate used to sign the tokens generated by the Identity Server.The certificate is used for signing OpenID access tokens that are used for user identification via browser and for service-to-service communication between Orchestrator and Identity Server. Click here for more details about OpenID Connect.
重要提示:您可以使用最大密钥长度 4096 位对证书进行签名。 作为最佳实践,我们强烈建议您使用至少 512 位(64 字节)长度的密钥。
重要提示:出于安全原因,身份服务器使用的证书需要:
- 具有 2048 位公钥
- 具有可由应用程序池用户访问的私钥,
- 处于有效期(未过期)。
The certificate's location is set in Identity Server's configuration file
appsettings.Production.json, in the Signing Credential section.
证书轮换
您可以采用证书轮换方法来避免证书过期和 Identity Server 中断的风险。此方法需要维护两个证书并定期对证书进行轮换。但是请注意,一次只能使用一个签名密钥。
要启动证书轮换过程,请执行以下步骤:
- Specify the initial certificate's
Name,Location, andNameTypeusing theStoreLocationparameter inappsettings.Production.json’s SigningCredentialSettings section. Note that this is the default signing key. - 在
appsettings.Production.json文件的同一部分使用ValidationKeys参数指定第二个证书的Name、Location和NameType。请确保在轮换日期之前完成此步骤。 - 在此阶段,使用
identity/.well-known/openid-configuration/jwks端点发布第二个证书。这样可以确保每位用户都有足够的时间更新其缓存的发现文档。 - 在轮换时,切换证书并重新启动 Identity Server。现在,可以将新证书用于签名,而只要您需要,就可以继续使用之前的证书进行验证。
- 48 小时后,您可以从配置中安全地删除以前的证书。
在以下示例中,SigningCredential 引用当前使用的证书,而 ValidationKeys 引用新发布的验证密钥。
"SigningCredentialSettings": {
"StoreLocation": {
"Name": "2816a67bc34496ca0acabbe04eb149b88ade0684",
"Location": "LocalMachine",
"NameType" : "Thumbprint",
"ValidationKeys": [
{
"Name": "2cde6c443f0147c6258a6fe2203e71a997bfcd44",
"Location": "LocalMachine",
"NameType" : "Thumbprint"
}
]
}
}
"SigningCredentialSettings": {
"StoreLocation": {
"Name": "2816a67bc34496ca0acabbe04eb149b88ade0684",
"Location": "LocalMachine",
"NameType" : "Thumbprint",
"ValidationKeys": [
{
"Name": "2cde6c443f0147c6258a6fe2203e71a997bfcd44",
"Location": "LocalMachine",
"NameType" : "Thumbprint"
}
]
}
}
如果您使用的是 AI Center,请确保在更新 Identity Server 证书时重新部署它。
对 AppSettings.Production.json 加密的影响
轮换证书可能会影响 AppSetting.Production.json 数据的加密。
要轮换签名证书,同时确保设置加密安全,请执行以下操作:
- 解密
AppSettings.Production.json文件。 - 更新
AppSettings.Production.json文件中的签名证书。 - 加密
AppSettings.Production.json文件。 - 重新启动身份服务器。