Az Azure Stack Hub PKI-tanúsítványok ellenőrzéseValidate Azure Stack Hub PKI certificates
A jelen cikkben ismertetett Azure Stack hub Readiness ellenőrző eszköz a PowerShell-Galériaérhető el.The Azure Stack Hub Readiness Checker tool described in this article is available from the PowerShell Gallery. Az eszközzel ellenőrizheti, hogy a generált nyilvános kulcsokra épülő infrastruktúra (PKI) tanúsítványai megfelelőek-e az üzembe helyezés előtt.Use the tool to validate that generated public key infrastructure (PKI) certificates are suitable for pre-deployment. A tanúsítványok érvényesítéséhez elegendő időt kell hagyni a tanúsítványok tesztelésére és kikiadására, ha szükséges.Validate certificates by leaving enough time to test and reissue certificates if necessary.
A készenléti ellenőrző eszköz a következő tanúsítványokat hajtja végre:The Readiness Checker tool performs the following certificate validations:
- PFX elemzéseParse PFX
Ellenőrzi, hogy érvényes-e a PFX-fájl, a helyes jelszó, valamint azt, hogy a nyilvános adatokat a jelszó védi-e.Checks for valid PFX file, correct password, and whether the public information is protected by the password. - A lejárat dátumaExpiry Date
A minimális érvényességet ellenőrzi hét nap alatt.Checks for minimum validity of seven days. - Aláírási algoritmusSignature algorithm
Ellenőrzi, hogy az aláírási algoritmus nem SHA1-e.Checks that the signature algorithm isn't SHA1. - Titkos kulcsPrivate Key
Ellenőrzi, hogy a titkos kulcs megtalálható-e, és a helyi gép attribútummal van-e exportálva.Checks that the private key is present and is exported with the local machine attribute. - Tanúsítvány láncaCert chain
Ellenőrzi a tanúsítványlánc épségét, beleértve az önaláírt tanúsítványok ellenőrzését is.Checks certificate chain is intact including a check for self-signed certificates. - DNS-nevekDNS names
Ellenőrzi, hogy a SAN tartalmazza-e az egyes végpontok releváns DNS-neveit, illetve hogy van-e egy támogató helyettesítő karakter.Checks the SAN contains relevant DNS names for each endpoint or if a supporting wildcard is present. - KulcshasználatKey usage
Ellenőrzi, hogy a kulcshasználat tartalmazza-e a digitális aláírást és a kulcs titkosítási, valamint ellenőrzi, hogy a kibővített kulcshasználat kiszolgáló-és ügyfél-hitelesítést tartalmaz-e.Checks if the key usage contains a digital signature and key encipherment and checks if enhanced key usage contains server authentication and client authentication. - Kulcs méreteKey size
Ellenőrzi, hogy a kulcs mérete 2048 vagy nagyobb.Checks if the key size is 2048 or larger. - Lánc sorrendjeChain order
Ellenőrzi a többi tanúsítvány sorrendjét, hogy a megrendelés helyes-e.Checks the order of the other certificates validating that the order is correct. - Egyéb tanúsítványokOther certificates
Győződjön meg arról, hogy a megfelelő levél-tanúsítvány és a lánca nem tartalmaz más tanúsítványokat a PFX-ben.Ensure no other certificates have been packaged in PFX other than the relevant leaf certificate and its chain.
Fontos
A PKI-tanúsítvány egy PFX-fájl, és a jelszót bizalmas információként kell kezelni.The PKI certificate is a PFX file and password should be treated as sensitive information.
ElőfeltételekPrerequisites
A rendszernek meg kell felelnie a következő előfeltételeknek, mielőtt ellenőrzi a PKI-tanúsítványokat egy Azure Stack hub központi telepítéshez:Your system should meet the following prerequisites before validating PKI certificates for an Azure Stack Hub deployment:
- Microsoft Azure Stack hub Readiness-ellenőrzője.Microsoft Azure Stack Hub Readiness Checker.
- Az előkészítési útmutatástkövetően exportált SSL-tanúsítvány (ok).SSL Certificate(s) exported following the preparation instructions.
- DeploymentData.jsbekapcsolva.DeploymentData.json.
- Windows 10 vagy Windows Server 2016.Windows 10 or Windows Server 2016.
Az alapvető szolgáltatások tanúsítványainak ellenőrzésePerform core services certificate validation
Ezekkel a lépésekkel ellenőrizheti a Azure Stack hub PKI-tanúsítványait az üzembe helyezéshez és a titkos kulcsok elforgatásához:Use these steps to validate the Azure Stack Hub PKI certificates for deployment and secret rotation:
Telepítse a AzsReadinessChecker -t egy PowerShell-parancssorból (5,1 vagy újabb) a következő parancsmag futtatásával:Install AzsReadinessChecker from a PowerShell prompt (5.1 or above) by running the following cmdlet:
Install-Module Microsoft.AzureStack.ReadinessChecker -Force -AllowPrerelease
Hozza létre a tanúsítvány könyvtárának struktúráját.Create the certificate directory structure. Az alábbi példában megváltoztathatja a
<C:\Certificates\Deployment>
kívánt új könyvtár elérési útját.In the example below, you can change<C:\Certificates\Deployment>
to a new directory path of your choice.New-Item C:\Certificates\Deployment -ItemType Directory $directories = 'ACSBlob', 'ACSQueue', 'ACSTable', 'Admin Extension Host', 'Admin Portal', 'ARM Admin', 'ARM Public', 'KeyVault', 'KeyVaultInternal', 'Public Extension Host', 'Public Portal' $destination = 'C:\Certificates\Deployment' $directories | % { New-Item -Path (Join-Path $destination $PSITEM) -ItemType Directory -Force}
Megjegyzés
AD FS és gráfra akkor van szükség, ha az identitásrendszer AD FS használja.AD FS and Graph are required if you're using AD FS as your identity system. Például:For example:
$directories = 'ACSBlob', 'ACSQueue', 'ACSTable', 'ADFS', 'Admin Extension Host', 'Admin Portal', 'ARM Admin', 'ARM Public', 'Graph', 'KeyVault', 'KeyVaultInternal', 'Public Extension Host', 'Public Portal'
- Helyezze a tanúsítvány (oka) t az előző lépésben létrehozott megfelelő címtárakba.Place your certificate(s) in the appropriate directories created in the previous step. Például:For example:
C:\Certificates\Deployment\ACSBlob\CustomerCertificate.pfx
C:\Certificates\Deployment\Admin Portal\CustomerCertificate.pfx
C:\Certificates\Deployment\ARM Admin\CustomerCertificate.pfx
- Helyezze a tanúsítvány (oka) t az előző lépésben létrehozott megfelelő címtárakba.Place your certificate(s) in the appropriate directories created in the previous step. Például:For example:
A PowerShell ablakban módosítsa a (z)
RegionName
és az Azure stack hub-környezet értékeit,FQDN
IdentitySystem
és futtassa a következő parancsmagot:In the PowerShell window, change the values ofRegionName
,FQDN
andIdentitySystem
appropriate to the Azure Stack Hub environment and run the following cmdlet:$pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString Invoke-AzsHubDeploymentCertificateValidation -CertificatePath C:\Certificates\Deployment -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com -IdentitySystem AAD
Ellenőrizze a kimenetet, és győződjön meg arról, hogy minden tanúsítvány megfelel az összes tesztnek.Check the output and ensure that all certificates pass all tests. Például:For example:
Invoke-AzsHubDeploymentCertificateValidation v1.2005.1286.272 started. 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 Thumbprint: 8DC4D9****************************69DBAA 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: Admin Portal\AdminPortal.pfx Thumbprint: 6F9055****************************4AC0EA 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: Public Portal\PublicPortal.pfx Log location (contains PII): C:\Users\[*redacted*]\AppData\Local\Temp\AzsReadinessChecker\AzsReadinessChecker.log Report location (contains PII): C:\Users\[*redacted*]\AppData\Local\Temp\AzsReadinessChecker\AzsReadinessCheckerReport.json Invoke-AzsHubDeploymentCertificateValidation Completed
Ha más Azure Stack hub-szolgáltatásokhoz szeretne tanúsítványokat érvényesíteni, módosítsa a értékét
-CertificateType
.To validate certificates for other Azure Stack Hub services, change the value for-CertificateType
. Például:For example:# App Services Invoke-AzsHubAppServicesCertificateValidation -CertificatePath C:\Certificates\AppServices -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com # DBAdapter Invoke-AzsHubDBAdapterCertificateValidation -CertificatePath C:\Certificates\DBAdapter -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com # EventHubs Invoke-AzsHubEventHubsCertificateValidation -CertificatePath C:\Certificates\EventHubs -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com # IoTHub Invoke-AzsHubIoTHubCertificateValidation -CertificatePath C:\Certificates\IoTHub -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com
Minden mappának tartalmaznia kell egyetlen PFX-fájlt a tanúsítvány típusához.Each folder should contain a single PFX file for the certificate type. Ha a tanúsítvány típusa több tanúsítványra vonatkozó követelmény, az egyes tanúsítványokhoz tartozó beágyazott mappák várhatóak és megkülönböztetik a nevet.If a certificate type has multi-certificate requirements, nested folders for each individual certificate are expected and name-sensitive. A következő kód egy példaként szolgáló mappát/tanúsítványt mutat be az összes tanúsítvány típusához, valamint a megfelelő értéket a és a esetében
-CertificateType
-CertificatePath
.The following code shows an example folder/certificate structure for all certificate types, and the appropriate value for-CertificateType
and-CertificatePath
.C:\>tree c:\SecretStore /A /F Folder PATH listing Volume serial number is 85AE-DF2E C:\SECRETSTORE \---AzureStack +---CertificateRequests \---Certificates +---AppServices # Invoke-AzsCertificateValidation ` | +---API # -CertificateType AppServices ` | | api.pfx # -CertificatePath C:\Certificates\AppServices | | | +---DefaultDomain | | wappsvc.pfx | | | +---Identity | | sso.pfx | | | \---Publishing | ftp.pfx | +---DBAdapter # Invoke-AzsCertificateValidation ` | dbadapter.pfx # -CertificateType DBAdapter ` | # -CertificatePath C:\Certificates\DBAdapter | +---Deployment # Invoke-AzsCertificateValidation ` | +---ACSBlob # -CertificateType Deployment ` | | acsblob.pfx # -CertificatePath C:\Certificates\Deployment | | | +---ACSQueue | | acsqueue.pfx ./. ./. ./. ./. ./. ./. ./. <- Deployment certificate tree trimmed. | \---Public Portal | portal.pfx | +---EventHubs # Invoke-AzsCertificateValidation ` | eventhubs.pfx # -CertificateType EventHubs ` | # -CertificatePath C:\Certificates\EventHubs | \---IoTHub # Invoke-AzsCertificateValidation ` iothub.pfx # -CertificateType IoTHub ` # -CertificatePath C:\Certificates\IoTHub
Ismert problémákKnown issues
Tünet: a tesztek kimaradnakSymptom: Tests are skipped
OK: a AzsReadinessChecker kihagy bizonyos teszteket, ha függőség nem teljesül:Cause: AzsReadinessChecker skips certain tests if a dependency isn't met:
A rendszer kihagyja a többi tanúsítványt, ha a tanúsítványlánc meghiúsul.Other certificates are skipped if certificate chain fails.
Testing: ACSBlob\singlewildcard.pfx Read PFX: OK Signature Algorithm: OK Private Key: OK Cert Chain: OK DNS Names: Fail Key Usage: OK Key Size: OK Chain Order: OK Other Certificates: Skipped Details: The certificate records '*.east.azurestack.contoso.com' do not contain a record that is valid for '*.blob.east.azurestack.contoso.com'. Please refer to the documentation for how to create the required certificate file. The Other Certificates check was skipped because Cert Chain and/or DNS Names failed. Follow the guidance to remediate those issues and recheck. Log location (contains PII): C:\Users\username\AppData\Local\Temp\AzsReadinessChecker\AzsReadinessChecker.log Report location (contains PII): C:\Users\username\AppData\Local\Temp\AzsReadinessChecker\AzsReadinessCheckerReport.json Invoke-AzsCertificateValidation Completed
Megoldás: kövesse az eszköz útmutatását a Részletek szakaszban az egyes tanúsítványokhoz tartozó tesztek alapján.Resolution: Follow the tool's guidance in the details section under each set of tests for each certificate.
Tünet: a http CRL-ellenőrzés sikertelen, annak ellenére, hogy x509-bővítményekre írt http-CDP van.Symptom: HTTP CRL Checking fails despite having an HTTP CDP written to x509 extensions.
OK: a AzsReadinessChecker jelenleg nem tud http CDP-t megkeresni bizonyos nyelveken.Cause: Currently, AzsReadinessChecker can't check for HTTP CDP in some languages.
Megoldás: az érvényesítés futtatásához az operációs rendszer nyelvét állítsa be az en-us értékre.Resolution: Run validation with OS language set to EN-US.
TanúsítványokCertificates
CímtárDirectory | TanúsítványCertificate |
---|---|
ACSBlobACSBlob | wildcard_blob_<region>_<externalFQDN> |
ACSQueueACSQueue | wildcard_queue_<region>_<externalFQDN> |
ACSTableACSTable | wildcard_table_<region>_<externalFQDN> |
Felügyeleti bővítmény gazdagépeAdmin Extension Host | wildcard_adminhosting_<region>_<externalFQDN> |
Felügyeleti portálAdmin Portal | adminportal_<region>_<externalFQDN> |
ARM-rendszergazdaARM Admin | adminmanagement_<region>_<externalFQDN> |
ARM nyilvánosARM Public | management_<region>_<externalFQDN> |
KeyVaultKeyVault | wildcard_vault_<region>_<externalFQDN> |
KeyVaultInternalKeyVaultInternal | wildcard_adminvault_<region>_<externalFQDN> |
Nyilvános kiterjesztésű gazdagépPublic Extension Host | wildcard_hosting_<region>_<externalFQDN> |
Nyilvános portálPublic Portal | portal_<region>_<externalFQDN> |
Ellenőrzött tanúsítványok használataUsing validated certificates
Miután a AzsReadinessChecker érvényesíti a tanúsítványokat, készen áll arra, hogy a Azure Stack hub üzemelő példányában vagy Azure Stack hub Secret rotációs szolgáltatásban is használhassa őket.Once your certificates are validated by the AzsReadinessChecker, you're ready to use them in your Azure Stack Hub deployment or for Azure Stack Hub secret rotation.
- Az üzembe helyezéshez biztonságosan vigye át a tanúsítványokat a telepítési mérnökbe, hogy azok a Azure stack hub PKI-követelmények dokumentációjábanmegadott módon másolja őket a központi telepítési gazdagépre.For deployment, securely transfer your certificates to your deployment engineer so that they can copy them onto the deployment host as specified in the Azure Stack Hub PKI requirements documentation.
- A Secret rotációs szolgáltatásban a tanúsítványok segítségével frissítheti az Azure Stack hub-környezet nyilvános infrastruktúra-végpontjának régi tanúsítványait az Azure stack hub Secret rotációs dokumentációjánakkövetésével.For secret rotation, you can use the certificates to update old certificates for your Azure Stack Hub environment's public infrastructure endpoints by following the Azure Stack Hub Secret Rotation documentation.
- A Pásti-szolgáltatások esetében a tanúsítványok segítségével telepítheti az SQL, a MySQL és a App Services erőforrás-szolgáltatót Azure Stack hub-ban az Azure stack hub dokumentációjában elérhető szolgáltatások áttekintésétkövetve.For PaaS services, you can use the certificates to install SQL, MySQL, and App Services Resource Providers in Azure Stack Hub by following the Overview of offering services in Azure Stack Hub documentation.
További lépésekNext steps
Adatközpont identitásának integrációjaDatacenter identity integration