如何续订 Windows Azure Pack 身份验证站点证书
原始产品版本: Windows Azure 包
原始 KB 编号: 3070790
症状
假设 Windows Azure 包的默认安装使用自签名证书。 如果管理员身份验证站点 (WindowsAuthSite) 的自签名证书和租户身份验证站点 (AuthSite) 的自签名证书长时间未替换,则证书将过期,身份验证将失败。
解决方法
若要解决此问题,请续订 Windows Azure 包身份验证站点证书。 为此,请在安装了 WindowsAuthSite 和 AuthSite 角色的服务器上运行Windows PowerShell脚本文件。 脚本命令在脚本文件中执行,如以下示例所示:
# Make sure that you run the command on the server where you have WindowsAuthSite or the AuthSite installed.
# Note: You will have to update the $Server, $userid, $password, and $PassPhrase variables.
# SQL Server DNS name
# Add the instance name if you are using a named instance
# Examples:
# sqlserver.contoso.com
# sqlserver.contoso.com\InstanceName
$Server = "sqlserver.contoso.com"
# SQL user and password
$userid = "sa"
$password = "MyPassword"
# PassPhrase that you defined during the installation of WAP.
$PassPhrase = "MyWindowsAzurePackPassPhrase"
$ConfigconnectionString = [string]::Format('Data Source={0};Initial Catalog=Microsoft.MgmtSvc.Config;User Id={1};Password={2};Integrated Security=false', $server, $userid, $password)
# Set Namespace to AuthSite or WindowsAuthSite
$NameSpace = "AuthSite"
Try
{
# 1. Obtain the current signing certificate thumbprint.
$setting = Get-MgmtSvcSetting -Namespace $NameSpace -Name Authentication.SigningCertificateThumbprint
$oldThumbprint = $setting.Value
# 2. Remove the old certificate from the global config store.
$Result = Set-MgmtSvcDatabaseSetting -Namespace $NameSpace -Name Authentication.SigningCertificate -Value $Null -ConnectionString $ConfigconnectionString -PassPhrase $PassPhrase -Force -confirm:$false
# 3. Reinitialize the authentication service to generate a new signing certificate, and reconfigure.
Initialize-MgmtSvcFeature -Name $NameSpace -Passphrase $PassPhrase -ConnectionString $ConfigconnectionString -Verbose
}
Catch
{
$ErrorMessage = $_.Exception.Message
$FailedItem = $_.Exception.ItemName
write-host @([string]::Format("Error creating a new signing certificate for {0}.", $NameSpace)) -ForegroundColor red
write-host ($FailedItem) -ForegroundColor red
write-host ($ErrorMessage) -ForegroundColor red
exit 1
}
Try
{
# 4. (optional) Remove the old signing certificate that is no longer being used.
Get-Item Cert:\LocalMachine\My\$oldThumbprint | Remove-Item -Force -Verbose
}
Catch
{
$ErrorMessage = $_.Exception.Message
$FailedItem = $_.Exception.ItemName
write-host @([string]::Format("Error deleting old signing certificate.")) -ForegroundColor red
write-host ($FailedItem) -ForegroundColor red
write-host ($ErrorMessage) -ForegroundColor red
exit 1
}
# 5. Reset services to update any (old) cached configuration.
Iisreset
状态
Microsoft 已经确认这是一个列于“适用范围”部分的 Microsoft 产品问题。
更多信息
此问题中遇到的方案
- AdminSite 与 WindowsAuthSite 之间的联合 (默认配置) 。
- TenantSite 与 AuthSite 之间的联合 (默认配置) 。
- 使用 AuthSite 作为标识存储在 TenantSite 与 Azure Active Directory 联合身份验证服务 (AD FS) 之间联合。有关 Windows Azure Pack 的 AD FS 的信息,请参阅为 Windows Azure 包配置Active Directory 联合身份验证服务。
运行“解决方法”部分中提到的脚本文件以创建新证书后,必须在门户和身份验证站点之间重新建立信任,然后更新 AuthSite 的 AD FS 元数据。
注意
- 有关如何在门户和身份验证站点之间重新建立信任的详细信息,请参阅 在 Windows Azure 包中重新配置 FQDN 和端口。
- 若要更新 AuthSite 的 AD FS 元数据,请打开 AD FS 管理,然后选择“ 从联合元数据更新” 选项。
此问题中未体验到的方案
- 使用 Active Directory 作为标识存储在 TenantSite 和 AD FS 之间联合
- 通过使用第三方程序作为 AD FS 中的标识存储或与其他联合合作伙伴的联合身份验证,在 TenantSite 与 AD FS 之间联合
联系我们寻求帮助
如果你有任何疑问或需要帮助,请创建支持请求或联系 Azure 社区支持。 还可以向 Azure 社区支持提交产品反馈。