Preparare i certificati PKI dell'hub Azure Stack per la distribuzione o la rotazionePrepare Azure Stack Hub PKI certificates for deployment or rotation
Nota
Questo articolo si riferisce solo alla preparazione di certificati esterni, usati per proteggere gli endpoint in infrastrutture e servizi esterni.This article pertains to the preparation of external certificates only, which are used to secure endpoints on external infrastructure and services. I certificati interni vengono gestiti separatamente, durante il processo di rotazione del certificato.Internal certificates are managed separately, during the certificate rotation process.
I file di certificato ottenuti dall'autorità di certificazione (CA) devono essere importati ed esportati con proprietà corrispondenti ai requisiti del certificato dell'hub Azure stack.The certificate files obtained from the certificate authority (CA) must be imported and exported with properties matching Azure Stack Hub's certificate requirements.
Questo articolo illustra come importare, creare pacchetti e convalidare i certificati esterni per prepararsi alla distribuzione di Azure Stack Hub o alla rotazione dei segreti.In this article you learn how to import, package, and validate external certificates, to prepare for Azure Stack Hub deployment or secrets rotation.
PrerequisitiPrerequisites
Il sistema deve soddisfare i prerequisiti seguenti prima di eseguire il packaging dei certificati PKI per una distribuzione di hub Azure Stack:Your system should meet the following prerequisites before packaging PKI certificates for an Azure Stack Hub deployment:
- I certificati restituiti dall'autorità di certificazione vengono archiviati in una singola directory, in formato CER (altri formati configurabili, ad esempio. cert,. SST o. pfx).Certificates returned from Certificate Authority are stored in a single directory, in .cer format (other configurable formats such as .cert, .sst or .pfx).
- Windows 10 o Windows Server 2016 o versione successivaWindows 10, or Windows Server 2016 or later
- Usare lo stesso sistema che ha generato la richiesta di firma del certificato (a meno che non si abbia come destinazione un certificato preconfezionato in PFXs).Use the same system that generated the Certificate Signing Request (unless you're targeting a certificate prepackaged into PFXs).
Continuare con la sezione appropriata per preparare i certificati (controllo di conformità Azure stack) o preparare i certificati (passaggi manuali) .Continue to the appropriate Prepare certificates (Azure Stack readiness checker) or Prepare certificates (manual steps) section.
Preparare i certificati (controllo di conformità Azure Stack)Prepare certificates (Azure Stack readiness checker)
Usare questi passaggi per creare pacchetti di certificati usando i cmdlet di PowerShell per il controllo di conformità Azure Stack:Use these steps to package certificates using the Azure Stack readiness checker PowerShell cmdlets:
Installare il modulo controllo di conformità Azure Stack da un prompt di PowerShell (5,1 o versione successiva) eseguendo il cmdlet seguente:Install the Azure Stack readiness checker module from a PowerShell prompt (5.1 or above), by running the following cmdlet:
Install-Module Microsoft.AzureStack.ReadinessChecker -Force -AllowPrerelease
Specificare il percorso dei file del certificato.Specify the Path to the certificate files. Ad esempio:For example:
$Path = "$env:USERPROFILE\Documents\AzureStack"
Dichiarare pfxPassword.Declare the pfxPassword. Ad esempio:For example:
$pfxPassword = Read-Host -AsSecureString -Prompt "PFX Password"
Dichiarare il exportPath in cui verrà esportato il PFXs risultante.Declare the ExportPath where the resulting PFXs will be exported to. Ad esempio:For example:
$ExportPath = "$env:USERPROFILE\Documents\AzureStack"
Convertire i certificati in certificati Azure Stack Hub.Convert certificates to Azure Stack Hub Certificates. Ad esempio:For example:
ConvertTo-AzsPFX -Path $Path -pfxPassword $pfxPassword -ExportPath $ExportPath
Esaminare l'output:Review the output:
ConvertTo-AzsPFX v1.2005.1286.272 started. Stage 1: Scanning Certificates Path: C:\Users\[*redacted*]\Documents\AzureStack Filter: CER Certificate count: 11 adminmanagement_east_azurestack_contoso_com_CertRequest_20200710235648.cer adminportal_east_azurestack_contoso_com_CertRequest_20200710235645.cer management_east_azurestack_contoso_com_CertRequest_20200710235644.cer portal_east_azurestack_contoso_com_CertRequest_20200710235646.cer wildcard_adminhosting_east_azurestack_contoso_com_CertRequest_20200710235649.cer wildcard_adminvault_east_azurestack_contoso_com_CertRequest_20200710235642.cer wildcard_blob_east_azurestack_contoso_com_CertRequest_20200710235653.cer wildcard_hosting_east_azurestack_contoso_com_CertRequest_20200710235652.cer wildcard_queue_east_azurestack_contoso_com_CertRequest_20200710235654.cer wildcard_table_east_azurestack_contoso_com_CertRequest_20200710235650.cer wildcard_vault_east_azurestack_contoso_com_CertRequest_20200710235647.cer Detected ExternalFQDN: east.azurestack.contoso.com Stage 2: Exporting Certificates east.azurestack.contoso.com\Deployment\ARM Admin\ARMAdmin.pfx east.azurestack.contoso.com\Deployment\Admin Portal\AdminPortal.pfx east.azurestack.contoso.com\Deployment\ARM Public\ARMPublic.pfx east.azurestack.contoso.com\Deployment\Public Portal\PublicPortal.pfx east.azurestack.contoso.com\Deployment\Admin Extension Host\AdminExtensionHost.pfx east.azurestack.contoso.com\Deployment\KeyVaultInternal\KeyVaultInternal.pfx east.azurestack.contoso.com\Deployment\ACSBlob\ACSBlob.pfx east.azurestack.contoso.com\Deployment\Public Extension Host\PublicExtensionHost.pfx east.azurestack.contoso.com\Deployment\ACSQueue\ACSQueue.pfx east.azurestack.contoso.com\Deployment\ACSTable\ACSTable.pfx east.azurestack.contoso.com\Deployment\KeyVault\KeyVault.pfx Stage 3: Validating Certificates. Validating east.azurestack.contoso.com-Deployment-AAD certificates in C:\Users\[*redacted*]\Documents\AzureStack\east.azurestack.contoso.com\Deployment Testing: KeyVaultInternal\KeyVaultInternal.pfx Thumbprint: E86699****************************4617D6 PFX Encryption: OK Expiry Date: OK Signature Algorithm: OK DNS Names: OK Key Usage: OK Key Length: OK Parse PFX: OK Private Key: OK Cert Chain: OK Chain Order: OK Other Certificates: OK Testing: ARM Public\ARMPublic.pfx ... Log location (contains PII): C:\Users\[*redacted*]\AppData\Local\Temp\AzsReadinessChecker\AzsReadinessChecker.log ConvertTo-AzsPFX Completed
Nota
Per ulteriori informazioni sull'utilizzo, utilizzare Get-Help ConvertTo-AzsPFX-Full per un ulteriore utilizzo, ad esempio la disabilitazione della convalida o il filtro per formati di certificato diversi.For additional usage use Get-help ConvertTo-AzsPFX -Full for further usage such as disabling validation or filtering for different certificate formats.
I certificati di convalida seguenti possono essere presentati per la distribuzione o la rotazione senza ulteriori passaggi.Following a successful validation certificates can be presented for Deployment or Rotation without any additional steps.
Preparare i certificati (passaggi manuali)Prepare certificates (manual steps)
Usare questa procedura per creare pacchetti di certificati per i nuovi certificati PKI dell'hub Azure Stack usando i passaggi manuali.Use these steps to package certificates for new Azure Stack Hub PKI certificates using manual steps.
Importare il certificatoImport the certificate
Copiare le versioni del certificato originale ottenute dalla CA preferita in una directory nell'host di distribuzione.Copy the original certificate versions obtained from your CA of choice into a directory on the deployment host.
Avviso
Non copiare i file che sono già stati importati, esportati o modificati in alcun modo dai file forniti direttamente dalla CA.Don't copy files that have already been imported, exported, or altered in any way from the files provided directly by the CA.
Fare clic con il pulsante destro del mouse sul certificato e scegliere Installa certificato o Installa PFX, a seconda del modo in cui il certificato è stato recapitato dalla CA.Right-click on the certificate and select Install Certificate or Install PFX, depending on how the certificate was delivered from your CA.
Nell' importazione guidata certificati selezionare computer locale come percorso di importazione.In the Certificate Import Wizard, select Local Machine as the import location. Selezionare Avanti.Select Next. Nella schermata seguente selezionare di nuovo Next (avanti).On the following screen, select next again.
Scegliere posizionare tutti i certificati nel seguente archivio e quindi selezionare Enterprise Trust come percorso.Choose Place all certificate in the following store and then select Enterprise Trust as the location. Selezionare OK per chiudere la finestra di dialogo Selezione archivio certificati, quindi selezionare Avanti.Select OK to close the certificate store selection dialog box and then select Next.
a.a. Se si sta importando un file PFX, viene visualizzata una finestra di dialogo aggiuntiva.If you're importing a PFX, you'll be presented with an additional dialog. Nella pagina protezione della chiave privata immettere la password per i file del certificato e quindi abilitare Contrassegna questa chiave come esportabile.On the Private key protection page, enter the password for your certificate files and then enable the Mark this key as exportable. che consente di eseguire il backup o il trasporto delle chiavi in un secondo momento.option, allowing you to back up or transport your keys later. Selezionare Avanti.Select Next.
Selezionare fine per completare l'importazione.Select Finish to complete the import.
Nota
Dopo aver importato un certificato per l'hub Azure Stack, la chiave privata del certificato viene archiviata come file PKCS 12 (PFX) in un archivio cluster.After you import a certificate for Azure Stack Hub, the private key of the certificate is stored as a PKCS 12 file (PFX) on clustered storage.
Esportare il certificatoExport the certificate
Aprire la console MMC di gestione certificati e connettersi all'archivio certificati del computer locale.Open Certificate Manager MMC console and connect to the Local Machine certificate store.
Aprire Microsoft Management Console.Open the Microsoft Management Console. Per aprire la console in Windows 10, fare clic con il pulsante destro del mouse sul menu Start, scegliere Esegui, digitare MMC e premere INVIO.To open the console in Windows 10, right-click on the Start Menu, select Run, then type mmc and press enter.
Selezionare file > Aggiungi/Rimuovi snap-in, quindi selezionare certificati e fare clic su Aggiungi.Select File > Add/Remove Snap-In, then select Certificates and select Add.
Selezionare account computer, quindi fare clic su Avanti.Select Computer account, then select Next. Selezionare computer locale e quindi fine.Select Local computer and then Finish. Selezionare OK per chiudere la pagina Aggiungi/Rimuovi Snap-In.Select OK to close the Add/Remove Snap-In page.
Passare a Certificates > Enterprise Trust > Certificate location.Browse to Certificates > Enterprise Trust > Certificate location. Verificare che il certificato sia visualizzato a destra.Verify that you see your certificate on the right.
Dalla barra delle applicazioni della console di gestione certificati selezionare azioni > tutte le attività > Esporta.From the Certificate Manager Console taskbar, select Actions > All Tasks > Export. Selezionare Avanti.Select Next.
Nota
A seconda del numero di certificati Azure Stack Hub, potrebbe essere necessario completare il processo più di una volta.Depending on how many Azure Stack Hub certificates you have, you may need to complete this process more than once.
Selezionare Sì, Esporta la chiave privata e quindi fare clic su Avanti.Select Yes, Export the Private Key, and then select Next.
Nella sezione formato file di esportazione:In the Export File Format section:
Se possibile, selezionare Includi tutti i certificati nel certificato.Select Include all certificates in the certificate if possible.
Selezionare Esporta tutte le proprietà estese.Select Export all Extended Properties.
Selezionare Abilita privacy del certificato.Select Enable certificate privacy.
Selezionare Avanti.Select Next.
Selezionare password e specificare una password per i certificati.Select Password and provide a password for the certificates. Creare una password che soddisfi i requisiti di complessità delle password seguenti:Create a password that meets the following password complexity requirements:
- Lunghezza minima di otto caratteri.A minimum length of eight characters.
- Almeno tre dei caratteri seguenti: lettere maiuscole, lettere minuscole, numeri da 0-9, caratteri speciali, carattere alfabetico non maiuscolo o minuscolo.At least three of the following characters: uppercase letter, lowercase letter, numbers from 0-9, special characters, alphabetical character that's not uppercase or lowercase.
Prendere nota della password.Make note of this password. Verrà usato come parametro di distribuzione.You'll use it as a deployment parameter.
Selezionare Avanti.Select Next.
Scegliere un nome file e un percorso per il file PFX da esportare.Choose a file name and location for the PFX file to export. Selezionare Avanti.Select Next.
Selezionare Fine.Select Finish.