CertificateValidation/Microsoft.AzureStack.CertificateValidation.psm1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 |
#Requires -RunAsAdministrator #Requires -Version 5.0 <############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> <# .SYNOPSIS This module is intended to be given to the customer along with their deploymentdata.json in order to validate the certificates are suitable before Azure Stack deployment. .DESCRIPTION The validation checks the following: Read PFX. Checks for valid PFX file, correct password and warns if public information is not protected by the password. Signature Algorithm. Checks the Signature Algorithm is not SHA1 Private Key. Checks the private key is present and is exported with the Local Machine attribute. Cert Chain. Checks certificate chain is in tact including for self-signed certificates. DNS Names. Checks the SAN contains relevant DNS names for each endpoint or if a supporting wildcard is present. Key Usage. Checks Key Usage contains Digital Signature and Key Encipherment and Enhanced Key Usage contains Server Authentication and Client Authentication. Key Size. Checks Key Size is 2048 or larger Chain Order. Checks the order of the other certificates making the chain is correct. Other Certificates. Ensure no other certificates have been packaged in PFX other than the relevant leaf certificate and its chain. No Profile. Checks a new user can load the PFX data without a user profile loaded, mimicking the behavior of gMSA accounts during certificate servicing. .EXAMPLE To Check certificates are ready for install run the following: Import-Module .\Microsoft.AzureStack.CertificateValidation.psm1 $password = Read-Host -Prompt "Enter PFX Password" -AsSecureString Start-CertChecker -CertificatePath .\Certificates\ -pfxPassword $password -deploymentDataJSONPath .\DeploymentData.json To import/export certificates as indicated by the output of the above command Import-Module .\Microsoft.AzureStack.CertificateValidation.psm1 $password = Read-Host -Prompt "Enter PFX Password" -AsSecureString Start-CertChecker -pfxPassword $password -pfxPath \certificates\acsblob\old_sslblob.pfx -ExportToPath \certificates\acsblob\new_sslblob.pfx [<CommonParameters>] .NOTES The script expects the certificates in the same directory structure as the install: i.e. \Certificates\ \ACSblob \ssl.pfx \ADFS \ssl.pfx The script requires the deploymentdata.json that will be used for deployment. .LINK #> $mod = Import-Module $PSScriptRoot\PublicCertHelper.psd1 -Force -PassThru Import-Module $PSScriptRoot\..\Microsoft.AzureStack.ReadinessChecker.Utilities.psm1 -Force #setting global variable to true $GLOBAL:standalone = $true $ErrorActionPreference = 'Stop' function Test-AzsCertificatePlacement { param ($certificatePath, $certConfig, $UseADFS) $thisFunction = $MyInvocation.MyCommand.Name # set expected folder names $validContainers = $certConfig.Keys | Foreach-Object {$PSITEM} if ($validContainers.count -eq 1) { if ($validContainers -eq (Split-Path $certificatePath -leaf)) { Write-AzsReadinessLog -message ("Single container expected: {0}" -f ($validContainers)) -Type Info -Function $thisFunction $folders = (Get-Item -Path $certificatePath) $actualContainers = (Get-Item -Path $certificatePath).Name } else { Write-AzsReadinessLog -Message ("Invalid folder name used {0}, expecting {1}. Please correct the folder name and retry. Exiting." -f (Split-Path -Path $certificatePath -leaf),$validContainers) -Type Error -Function $thisFunction -toScreen break } } elseif ($validContainers.count -gt 1) { Write-AzsReadinessLog -message ("Multiple containers found. Checking for folders: {0}" -f ($validContainers -join ',')) -Type Info -Function $thisFunction # Check directory structure is valid $actualContainers = (Get-ChildItem -Path $certificatePath -Directory).Name $folders = (Get-ChildItem -Path $certificatePath -Directory) if (-not $actualContainers) { Write-AzsReadinessLog -message ("Invalid folder structure found in certificate folder {0}, ensure only required folders are present. `nRequired folders: {1}" -f ` $CertificatePath, ` ($validContainers -join ', ')` ) -Type Error -Function $thisFunction -toScreen break } } else { Write-AzsReadinessLog -Message "Unable to determine expected certificate placement. Exiting." -Type Error -Function $thisFunction break } $compareContainers = Compare-Object -ReferenceObject $validContainers -DifferenceObject $actualContainers if ($compareContainers) { $invalidContainers = $compareContainers | Where-Object SideIndicator -eq '=>' | Select-Object -ExpandProperty InputObject $missingContainers = $compareContainers | Where-Object SideIndicator -eq '<=' | Select-Object -ExpandProperty InputObject if (-not $invalidContainers) {$invalidContainers = '[none]'} if (-not $missingContainers) {$missingContainers = '[none]'} Write-AzsReadinessLog -Message ("Invalid folder structure found in certificate folder {0}, ensure only required folders are present. `nRequired folders: {1} `nInvalid folders: {2} `nMissing folders: {3}" -f ` $CertificatePath, ` ($validContainers -join ', '), ` ($invalidContainers -join ', '), ` ($missingContainers -join ', ') ) -Type Error -Function $thisFunction -toScreen Write-AzsReadinessLog -Message 'Expected folder structure is as follows:' -Type Info -Function $thisFunction -toScreen Write-AzsReadinessLog -Message "`t$certificatePath" -Type Info -Function $thisFunction -toScreen $i = 0 foreach ($key in $certConfig.keys) { $i++ Write-AzsReadinessLog -Message "`t +--$key" -Type Info -Function $thisFunction -toScreen if ($i -lt $certConfig.Keys.count) { Write-AzsReadinessLog -Message "`t | \-<customFileName>.pfx" -Type Info -Function $thisFunction -toScreen } else { Write-AzsReadinessLog -Message "`t \-<customFileName>.pfx" -Type Info -Function $thisFunction -toScreen } } Write-AzsReadinessLog -Message "`nCorrect the folder structure and rerun validation." -Type Info -Function $thisFunction -toScreen break } else { Write-AzsReadinessLog -Message "Folder structure verified." -Type Info -Function $thisFunction } # Check there is only a single cert in each folder foreach ($folder in $folders) { Set-PFXPlacement -path $folder.fullname -certConfig $certConfig } } function Invoke-AzsCertificateValidation { <# .SYNOPSIS Invoke-Microsoft.AzureStack.CertificateValidation is a standalone wrapper for "certchecker" .DESCRIPTION Either invokes certificate validation for Azure Stack public certificates or import/export routine to correct Azure Stack public certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ CertificateType = 'Deployment' certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\Deployment" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' IdentitySystem = 'AAD' } Invoke-AzsCertificateValidation @certificateValidationParams Validates multiple certificates are ready for Azure Stack Deployment and Secret Rotation. .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ CertificateType = 'Deployment' certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\Deployment" pfxPassword = $pfxPassword DeploymentDataJSONPath = "$ENV:USERPROFILE\Documents\AzureStack\DeploymentData.json" } Invoke-AzsCertificateValidation @certificateValidationParams Validates multiple certificates are ready for Azure Stack Deployment and Secret Rotation using the DeploymentData.json. .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ CertificateType = 'AppServices' certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AppServices" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsCertificateValidation @certificateValidationParams Validates multiple Certificates are ready for AppServices and Azure Stack. Requires certificates in folders DefaultDomain, API, Publishing, Identity respectively. .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ CertificateType = 'IoTHub' certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\IoTHub" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsCertificateValidation @certificateValidationParams Validates single Certificates are ready for IoTHub and Azure Stack. Also applicable to EventHubs, DBAdapter and DataboxEdge certificate types. .EXAMPLE $customCertConfig = @{ 'NWTradersRP' = @{ DNSName = @('*.nwtraders','admin.nwtraders') KeyLength = 4096 } 'TailSpinRP' = @{ DNSName = @('*.tailspin') HashAlgorithm = 'SHA386' } } $certificateValidationParams = @{ CustomCertConfig = $customCertConfig certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\CustomRPs" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsCertificateValidation @certificateValidationParams Validates multiple Certificates. Each single certificates should be placed in a subfolder (of CertificatePath) named the same as the key in the custom hashtable e.g. NWTraderRP and TailSpinRP as in the example. .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ CertificateType = 'AzureStackEdgeDevice' DeviceName = 'DBG-KARB2NP5J' NodeSerialNumber = 'WIN-KARB2NP5J3O' certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AzureStackEdgeDevice" pfxPassword = $pfxPassword ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsCertificateValidation @certificateValidationParams Validates multiple certificates are ready for Azure Stack Edge device certificates. .PARAMETER CertificateType Specifies the Azure Stack certificate type to generate a request for e.g. Deployment, AppServices, EventHubs, IoTHub etc. .PARAMETER CertificatePath Path to directory structure for Azure Stack Public Certificates. The path given for this parameter is expected to contain one of the following sets of sub-directories, each with a single pfx certificate: Identity System AAD: ACSBlob, ACSQueue, ACSTable, Admin Portal, ARM Admin, ARM Public, KeyVault, KeyVaultInternal, Public Portal Identity System ADFS: ADFS, Graph, ACSBlob, ACSQueue, ACSTable, Admin Portal, ARM Admin, ARM Public, KeyVault, KeyVaultInternal, Public Portal .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER deploymentDataJSONPath Specifies the Azure Stack deployment deployment data JSON configuration file. Generally only available to the deployment team. .PARAMETER ExternalFQDN Specifies the Azure Stack deployment's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName .PARAMETER RegionName Specifies the Azure Stack deployment's region name when deploymentdata.json is not used, must be alphanumeric. .PARAMETER DeviceName Specifies the Device Name of an Azure Stack Edge device. .PARAMETER NodeSerialNumber Specifies the node serial number(s) of an Azure Stack Edge device. .PARAMETER IdentitySystem Specifies the Azure Stack deployment's Identity System valid values, AAD or ADFS, for Azure Active Directory and Active Directory Federated Services respectively .PARAMETER CustomCertConfig Specifies a custom hashtable for custom validation. Minimum required info: @{'CertificateName' = @{DNSName= @('*.rpnamespace')}} where DNSName declared everything left of region.domain.com. .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. .LINK Deployment Certificate Validation - https://aka.ms/AzsValidateCerts PaaS Certificate Validation - https://aka.ms/AzsValidatePaaSCerts Azure Stack Readiness Checker Tool - https://aka.ms/AzsReadinessChecker #> [CmdletBinding()] [Alias("Start-CertChecker", "Start-AzsCertChecker", "Start-AzureStackCertChecker", "CertChecker", "Invoke-AzureStackCertificateValidation")] Param( [Parameter(Mandatory = $true, HelpMessage = "Specify the Azure Stack certificate type to generate a request")] [ArgumentCompleter({Get-AzsCertificateTypes | Sort-Object})] [ValidateScript({$_ -in (Get-AzsCertificateTypes)})] [string] $CertificateType, [Parameter(Mandatory=$true,HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $CertificatePath, [ValidatePattern('(?# Region must be alphanumeric)^[a-zA-Z0-9]+$')] [string] $RegionName, [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [ValidateScript({` Test-PasswordLength -MinimumCharactersInPassword 8 -Password $PSITEM -CredentialDescription 'pfxPassword' Test-PasswordComplexity -Password $PSITEM -CredentialDescription 'pfxPassword' })] [securestring] $pfxPassword, [ValidateScript( {Test-Path $_ -Include *.json})] [string] $deploymentDataJSONPath, [Parameter(HelpMessage="Enter Azure Stack Edge Device Name")] [string] $DeviceName, [Parameter(HelpMessage="Enter Azure Stack Edge Node Serial Number")] [string[]] $NodeSerialNumber, [Parameter(HelpMessage="Enter Azure Stack Edge Wifi Server Name")] [string] $RadiusServerName, [Parameter(HelpMessage="Enter Azure Stack Hub deployment identity system, AAD or ADFS.")] [ValidateSet('AAD', 'ADFS')] [string] $IdentitySystem, [hashtable] $customCertConfig, [Parameter(HelpMessage = "Directory path for log and report output")] [string]$OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch]$CleanReport = $false ) process { try { $thisFunction = $MyInvocation.MyCommand.Name $GLOBAL:OutputPath = $OutputPath # Get/Clean Existing Report Import-Module $PSScriptRoot\..\Microsoft.AzureStack.ReadinessChecker.Reporting.psm1 -Force Write-Header -invocation $MyInvocation -params $PSBoundParameters $readinessReport = Get-AzsReadinessProgress -clean:$CleanReport $readinessReport = Add-AzsReadinessCheckerJob -report $readinessReport # Check the user provided appropriate parameters # NodeSerialNumber is AzureStackEdgeDevice or AzureStackEdgeWifiClient if ($certificateType -in 'AzureStackEdgeDevice','AzureStackEdgeWifiClient' -and !$NodeSerialNumber) { throw "CertificateType is $certificateType and NodeSerialNumber not provided. Please re-run providing -NodeSerialNumber and the appropriate value for your system." } if ($certificateType -eq 'AzureStackEdgeWifiServer' -and !$RadiusServerName) { throw "CertificateType is $certificateType and RadiusServerName not provided. Please re-run providing -RadiusServerName and the appropriate value for your system." } if ($deploymentDataJSONPath) { # detect deployment type, get region name and fqdn, and set useADFS flag and directory name $deploymentDataJSON = ConvertTo-DeploymentData -path $deploymentDataJSONPath $RegionName = $deploymentDataJSON.DeploymentData.RegionName $externalFQDN = $deploymentDataJSON.DeploymentData.ExternalDomainFQDN if ($deploymentDataJSON.DeploymentData.UseAdfs) { $UseADFS = $true $dirName = 'ADFS' } elseif ($deploymentDataJSON.DeploymentData.InfraAzureEnvironment) { $UseADFS = $false $dirName = 'AAD' } else { Write-Error -message "Failed to parse identity store in DeploymentJSON" } } else { switch ($IdentitySystem) { 'ADFS' { $UseADFS = $true; $dirName = 'ADFS' } 'AAD' { $UseADFS = $false; $dirName = 'AAD' } } } # Join RegionName and ExternalFQDN if ($regionName -and $CertificateType -ne 'AzureStackEdgeDevice') { $ExternalFQDN = "{0}" -f (($regionName,$ExternalFQDN) -join '.') } # Get certificate Config if ($customCertConfig) { # Test custom cert structure $customCertConfig = Test-CustomCertConfig -customCertConfig $customCertConfig if (-not $customCertConfig) { Write-AzsReadinessLog -Message "Please correct the custom certificate configuration and retry." -Type Error -Function $thisFunction -toScreen break } $certConfig = $customCertConfig } else { # Get declared configs $CertificateType = $PSBoundParameters.CertificateType $certificateConfigDataFile = Import-PowerShellDataFile -Path $PSScriptRoot\Microsoft.AzureStack.CertificateConfig.psd1 $certConfig = $certificateConfigDataFile.CertificateTypes[$certificateType] if (-not $UseADFS) { $certConfig.Remove('Graph') $certConfig.Remove('ADFS') } } # Add support for multiple multi node Edge device (NodeSerialNumbers) # Split them in to their own folders if ($certificateType -in 'AzureStackEdgeDevice' -and $NodeSerialNumber.count -gt 1) { Write-AzsReadinessLog -Message "Configuring multi-node Edge device validation. Finding DNS matches for nodeserialnumbers in PFXs present" -Type Info Import-Module $PSScriptRoot\PublicCertHelper.psm1 -Force $num = 0 $PSBoundParameters.nodeSerialNumber | ForEach-Object { $newNode = $certConfig.node.Clone() $nodeKey = "Node{0:d2}" -f $num $certConfig.Add($nodeKey,$newNode) $certConfig[$nodeKey].DnsName = $PSITEM $num++ $edgeNodePfxs = Get-ChildItem -Path $CertificatePath\Node -filter *.pfx foreach ($edgeNodePfx in $edgeNodePfxs) { $certificate = Get-PFXData -FilePath $edgeNodePfx.fullname -Password $pfxPassword | Select-Object -ExpandProperty EndEntityCertificates $testDNSNames = Test-DNSNames -cert $Certificate -ExpectedDomain $ExternalFQDN -certConfig $certConfig[$nodeKey] if ($testDNSNames.Result -eq 'OK') { # copy pfx Write-AzsReadinessLog -Message "DNS match found for $PSITEM." -Type Info New-Item -Path "$CertificatePath\$nodeKey" -Force -ItemType Directory | Out-Null Copy-Item -Path $edgeNodePfx.FullName -Destination ("{0}\{1}\{2}" -f $CertificatePath,$nodeKey,$edgeNodePfx.Name) break } else { Write-AzsReadinessLog -Message "DNS match not found for $PSITEM. Ensure all required Node certificates are in Node folder" -Type Error } } } if ((Get-ChildItem -path $CertificatePath\Node*).count -ne ($num + 1)) { Write-AzsReadinessLog "Ensure all required Node certificates are in Node folder" -Type Error -ToScreen throw "Ensure all required Node certificates are in Node folder" } # Finally remove the Node from the config $certConfig.remove('Node') # Backup a previous execution instead of overwriting and move the original directory to TEMP for the during of the validation if (Test-Path $ENV:Temp\AzsReadinessChecker\Node) { Move-Item -Path $ENV:Temp\AzsReadinessChecker\Node -Destination ("{0}{1}" -f "$ENV:Temp\AzsReadinessChecker\Node",(Get-Date -f 'yyyyMMddHHmmss')) -Force } Move-Item -Path $CertificatePath\Node -Destination $ENV:Temp\AzsReadinessChecker\Node -Force } # Validate certificate placement (single cert in one folder for single certs, multiple correctly named folders for multiple certs (e.g. infra/AppServices)) Test-AzsCertificatePlacement -UseADFS:$UseADFS -certificatePath $CertificatePath -certConfig $certConfig #Validate any certificates Write-Log -Message ("Starting Azure Stack {0} Certificate Validation {1} " -f $certificateType[0],$mod.Version) -Type Info -Function $thisfunction -toScreen $TestAzsCertificatesResults = foreach ($key in $certConfig.keys) { # Handle SANs for Azure Stack Edge certificates with DeviceName and Node serial numbers instead of regionname and fqdn # Append region & fqdn to dnsname for the rest Write-AzsReadinessLog -Message ("Getting pfx content {0}" -f $certConfig.$key.pfxPath) -Type Info -Function $thisFunction if ((Get-Command Get-Content).Parameters.AsByteStream) { [byte[]]$pfxBinary = Get-Content -Path $certConfig.$key.pfxPath -AsByteStream } else { [byte[]]$pfxBinary = Get-Content -Path $certConfig.$key.pfxPath -Encoding Byte } if (-not $pfxBinary) { Write-AzsReadinessLog -Message ("Invalid PFX {0}" -f $certConfig.$key.pfxPath) -Type Error -Function $thisFunction } # Handle SANs for AzureStackEdgeDevice appliance certificates with DeviceName and NodeSerialNumbers # Append region & fqdn to dnsname for the rest $AzureStackEdgeDeviceApplianceCertificates = $certificateConfigDataFile.CertificateTypes.AzureStackEdgeDevice.Keys + ` $certificateConfigDataFile.CertificateTypes.AzureStackEdgeVPN.Keys + ` $certificateConfigDataFile.CertificateTypes.AzureStackEdgeWifiClient.Keys + ` $certificateConfigDataFile.CertificateTypes.AzureStackEdgeWifiServer.Keys if ($key -in $AzureStackEdgeDeviceApplianceCertificates) { $certConfig.$key.DNSName = $certConfig.$key.DNSName | Foreach-Object { ` $PSITEM.replace('[[DeviceName]]',$DeviceName).replace('[[NodeSerialNumber]]',$NodeSerialNumber).replace('[[RadiusServerName]]',$RadiusServerName) } | Sort-Object $TestAzsRPCertificatesResult = Test-AzsCertificate -CertificateBinary $pfxBinary -CertificatePassword $pfxPassword -ExpectedDomainFQDN $externalFQDN -certConfig $certConfig.$key } else { $TestAzsRPCertificatesResult = Test-AzsCertificate -CertificateBinary $pfxBinary -CertificatePassword $pfxPassword -ExpectedDomainFQDN $externalFQDN -certConfig $certConfig.$key } $TestAzsRPCertificatesResult } # Copy the log certchecker log for now, until migration can occur. Copy-AzsReadinessLogging -ComponentLogFile CertChecker # Write results to readiness report $readinessReport.CertificateValidation.$certificateType = $TestAzsCertificatesResults $readinessReport = Close-AzsReadinessCheckerJob -report $readinessReport $readinessReport.CertificateValidation.$certificateType = Test-CertificateReuse -validationResult $readinessReport.CertificateValidation.$certificateType } catch { Write-AzsReadinessLog -message ("Certificate Validation failed with error: {0}" -f $_.exception.message) -Type Error throw } finally { Write-AzsReadinessProgress -report $readinessReport Write-AzsReadinessReport -report $readinessReport Write-Footer -invocation $MyInvocation # Restore users original folders if ($certificateType -in 'AzureStackEdgeDevice' -and $NodeSerialNumber.count -gt 1) { Move-Item $ENV:TEMP\AzsReadinessChecker\Node -Destination $CertificatePath\Node -ErrorAction SilentlyContinue $NodeTempPath = Get-ChildItem -Path $CertificatePath -Filter Node* -Directory | Where-Object Name -ne 'Node' | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue } } } } function Repair-AzsPfxCertificate { <# .SYNOPSIS Re-package PFX files to remediate common packaging problems .DESCRIPTION Import PFX into local machine store, export the package ensuring chain export, encryption usage etc .EXAMPLE PS C:\> Repair-AzsPfxCertificate -PfxPassword $pfxPassword -PfxPath .\certificates\ACSBlob\ACSBlob.pfx -ExportPFXPath .\certificates\ACSBlob\ACSBlob_new.pfx Import ACSBlob PFX and re-exports it to the same folder with a new name. .PARAMETER PfxPassword Specifies the password associated with PFX certificate files. .PARAMETER PfxPath Specifies the path to a problematic certificate that requires import/export routine to fix, as indicated by certificate validation in this tool .PARAMETER ExportPFXPath Specifies the destination path for the resultant PFX file from import/export routine. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. .LINK Remediate common issues for Azure Stack PKI certificates - https://aka.ms/AzsRemediateCerts Azure Stack Readiness Checker Tool - https://aka.ms/AzsReadinessChecker #> [CmdletBinding()] Param( [Parameter(Mandatory = $false, HelpMessage = "Enter Password for PFX Certificates as a secure string")] [ValidateScript({` Test-PasswordLength -MinimumCharactersInPassword 8 -Password $PSITEM -CredentialDescription 'pfxPassword' Test-PasswordComplexity -Password $PSITEM -CredentialDescription 'pfxPassword' })] [securestring] $pfxPassword, [Parameter(Mandatory = $true, HelpMessage = "Path to PFX on disk", ParameterSetName = "ImportExport")] [ValidateScript( {Test-Path $_ -Include *.pfx -PathType Leaf})] [string] $pfxPath, [Parameter(Mandatory = $true, HelpMessage = "Destination Path for PFX export", ParameterSetName = "ImportExport")] [ValidateScript( {Test-Path -Path (split-path -Path $_ -Parent)})] [string] $ExportPFXPath, [Parameter(HelpMessage = "Directory path for log")] [string]$OutputPath = "$ENV:TEMP\AzsReadinessChecker" ) $thisFunction = $MyInvocation.MyCommand.Name $GLOBAL:OutputPath = $OutputPath Import-Module $PSScriptRoot\..\Microsoft.AzureStack.ReadinessChecker.Reporting.psm1 -Force Write-Header -invocation $MyInvocation -params $PSBoundParameters Write-AzsReadinessLog -Message ("Starting Azure Stack Certificate Import/Export") -Type Info -Function $thisfunction -toScreen Write-AzsReadinessLog -Message "Importing PFX $pfxPath into Local Machine Store" -Type Info -Function $thisfunction -toScreen $certificate = Import-AzsCertificate -pfxPath $pfxPath -pfxPassword $pfxPassword if (-not $certificate) { Write-AzsReadinessLog -Message "Import Failed. Please review log." -Type Error -Function $thisfunction -toScreen } else { Write-AzsReadinessLog -Message "Exporting certificate to $exportPFXPath" -Type Info -Function $thisfunction -toScreen Export-AzsCertificate -filePath $ExportPFXPath -certPath $certificate -pfxPassword $pfxPassword Write-AzsReadinessLog -Message "Export complete. Removing certificate from the local machine store." -Type Info -Function $thisfunction -toScreen Remove-Item $certificate.pspath -Force if (-not (Test-Path $certificate.pspath)) { Write-AzsReadinessLog -Message "Removal complete." -Type Info -Function $thisfunction -toScreen } else { Write-AzsReadinessLog -Message ("Removal incomplete. Please manually remove {0}." -f $certificate.pspath) -Type Warning -Function $thisfunction -toScreen } } Copy-AzsReadinessLogging -ComponentLogFile CertChecker Write-Footer -invocation $MyInvocation } function Set-PFXPlacement { # checks for a single certificate and sets pfxPath in the certConfig param ($path,$certConfig) $thisFunction = $MyInvocation.MyCommand.Name $pfxfiles = Get-ChildItem $path -Filter *.pfx -ErrorAction SilentlyContinue if ($pfxfiles.count -ne 1) { Write-AzsReadinessLog -Message ("The certificate path '{0}' should only contain 1 PFX certificate. {1} PFX files found. `nEnsure all certificate folders only contain a single certificate." -f $path, $pfxfiles.count) -Type Error -Function $thisFunction -toScreen break } else { Write-AzsReadinessLog -Message ("Single PFX found with name '{0}'. Setting pfxPath in certConfig." -f $pfxfiles.FullName) -Type Info -Function $thisFunction $certConfig.$($pfxfiles.Directory.Name).pfxPath = $pfxfiles.FullName } } function Test-CustomCertConfig { param ([hashtable]$customCertConfig) if ($customCertConfig -isnot [HashTable]) { Write-AzsReadinessLog -Message ("Custom Cert Config is not a valid hashtable. `nExpecting at least: `n@{'CertificateName' = @{DNSName= @('*.certificate.domain')}}.") -Type Error -Function $thisfunction -toScreen return $false } foreach ($customCertName in $customCertConfig.Keys) { $customCertHash = $customCertConfig.$customCertName # Check its a hashtable if ($customCertHash -isnot [HashTable]) { Write-AzsReadinessLog -Message ("Custom Cert {0} is not a valid hashtable. `nExpecting at least: `n@{'CertificateName' = @{DNSName= @('*.certificate.domain')}}." -f $customCertName) -Type Error -Function $thisfunction -toScreen return $false } else { $hashToString = ($customCertHash.GetEnumerator() | ForEach-Object { "$($_.Key)=$($_.Value)" }) -join '; ' Write-AzsReadinessLog -Message ("Custom Cert is a valid hashtable @{{{0} = @{{{1}}}}}" -f $customCertName,$hashToString) -Type Info -Function $thisfunction } # Check it has at least a DNSName if (-not $customCertHash.DNSName){ Write-AzsReadinessLog -Message ("Custom cert {0} must contain at least DNSName key. Exiting." -f $customCertName) -Type Error -Function $thisfunction -toScreen return $false } else { Write-AzsReadinessLog -Message ("Custom Config {0} contains DNSName to check" -f $customCertName) -Type Info -Function $thisfunction } # Add include and exclude test if they're not present if (-not $customCertHash.IncludeTests) { Write-AzsReadinessLog -Message ("Custom Config {0}. Adding IncludeTests as 'All'" -f $customCertName) -Type Info -Function $thisfunction $customCertConfig.$customCertName.IncludeTests = 'All' } else { Write-AzsReadinessLog -Message ("Custom Config {0}. IncludeTests contains {1}" -f $customCertName, $customCertHash.IncludeTests) -Type Info -Function $thisfunction } if (-not $customCertHash.ExcludeTests) { Write-AzsReadinessLog -Message ("Custom Config {0}. Adding ExcludeTests as 'CNG Key'" -f $customCertName) -Type Info -Function $thisfunction $customCertConfig.$customCertName.ExcludeTests = 'CNG Key' } else { Write-AzsReadinessLog -Message ("Custom Config {0}. ExcludeTests contains {1}" -f $customCertName, $customCertHash.ExcludeTests) -Type Info -Function $thisfunction } } $customCertConfig } function New-AzsCertificateFolder { <# .SYNOPSIS Create folder structure Azure Stack Certificates .DESCRIPTION Create folder structure Azure Stack Certificates .EXAMPLE New-AzsCertificateFolder -certificateType Deployment -IdentitySystem AAD -OutputPath C:\SecureStore\AzureStack Create Deployment Folders in C:\SecureStore\AzureStack\Deployment .EXAMPLE New-AzsCertificateFolder -certificateType AppServices -OutputPath C:\SecureStore\AzureStack Create AppServices Folders in C:\SecureStore\AzureStack\AppServices .EXAMPLE New-AzsCertificateFolder -certificateType EventHubs -OutputPath C:\SecureStore\AzureStack Create EventHubs Folders in C:\SecureStore\AzureStack\EventHubs .EXAMPLE New-AzsCertificateFolder -certificateType IoTHub -OutputPath C:\SecureStore\AzureStack Create IoTHub Folders in C:\SecureStore\AzureStack\IoTHub .EXAMPLE New-AzsCertificateFolder -certificateType DataboxEdge -OutputPath C:\SecureStore\AzureStack Create DataboxEdge Folders in C:\SecureStore\AzureStack\DataboxEdge .EXAMPLE New-AzsCertificateFolder -certificateType AzureStackEdgeDevice -OutputPath C:\SecureStore\AzureStack Create Azure Stack Edge Folders in C:\SecureStore\AzureStack\AzureStackEdgeDevice .EXAMPLE New-AzsCertificateFolder -certificateType DBAdapter -OutputPath C:\SecureStore\AzureStack Create DBAdapter Folders in C:\SecureStore\AzureStack\DBAdapter #> [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param ( [Parameter(Mandatory = $true, HelpMessage = "Specify the Azure Stack certificate type to generate a request")] [ArgumentCompleter({Get-AzsCertificateTypes | Sort-Object})] [ValidateScript({$_ -in (Get-AzsCertificateTypes)})] [string] $CertificateType, [Parameter(Mandatory = $true, HelpMessage = "Destination Path for Certificate")] [string]$OutputPath, [Parameter(Mandatory = $false, HelpMessage = "Enter Azure Stack Identity System (AAD or ADFS) when generating deployment certificates")] [ValidateSet('AAD', 'ADFS')] [string]$IdentitySystem ) process { try { # Get Certificate Config $certificateConfigDataFile = Import-PowerShellDataFile -Path $PSScriptRoot\..\CertificateValidation\Microsoft.AzureStack.CertificateConfig.psd1 $certificateConfig = $certificateConfigDataFile.CertificateTypes[$CertificateType] if ($certificateType -eq 'Deployment' -AND $IdentitySystem -ne 'ADFS') { $certificateConfig.Remove('Graph') $certificateConfig.Remove('ADFS') } # Create Folder Structure if ($certificateConfig.Keys.count -eq 1) { $destination = $OutputPath } else{ $destination = Join-Path -Path $OutputPath -ChildPath $CertificateType } Foreach ($key in $certificateConfig.keys) { $newFolder = Join-Path -Path $destination -ChildPath $key New-Item -Path $newFolder -ItemType Directory -Force } } catch { throw $_.exception } } } function Get-AzsCertificateTypes { param ([string[]]$certificateTypeExclusions = @('Hardware')) $certificateConfigDataFile = Import-PowerShellDataFile -Path $PSScriptRoot\Microsoft.AzureStack.CertificateConfig.psd1 $certificateTypes = $certificateConfigDataFile.CertificateTypes | Select-Object -ExpandProperty Keys | Where-Object {$PSITEM -notin $certificateTypeExclusions} $certificateTypes + 'Custom' | Sort-Object } function Invoke-AzsEdgeDeviceCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Edge Device Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Edge Device certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ DeviceName = 'DBG-KARB2NP5J' NodeSerialNumber = 'WIN-KARB2NP5J3O' certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AzureStackEdgeDevice" pfxPassword = $pfxPassword ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsEdgeDeviceCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Edge Device Certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ DeviceName = 'DBG-KARB2NP5J' NodeSerialNumber = 'WIN-KARB2NP5J3O','WIN-GBWB7ML4K9O' certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AzureStackEdgeDevice" pfxPassword = $pfxPassword ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsEdgeDeviceCertificateValidation @certificateValidationParams Run certificate validation for multi-node Azure Stack Edge Device Certificates .PARAMETER CertificatePath Path to directory structure for Azure Stack Edge Device Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName. Does not need to be resolved. .PARAMETER DeviceName Specifies the Device Name of an Azure Stack Edge device. .PARAMETER NodeSerialNumber Specifies the node serial number(s) of an Azure Stack Edge device. .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true,HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, HelpMessage="Enter the Device Name of an Azure Stack Edge device.")] [string] $DeviceName, [Parameter(Mandatory=$true, HelpMessage="Enter the Node Serial Number of an Azure Stack Edge device.")] [string[]] $NodeSerialNumber, [Parameter(HelpMessage = "Directory path for log and report output")] [string]$OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch]$CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType AzureStackEdgeDevice } function Invoke-AzsEdgeVPNCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Edge VPN Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Edge VPN certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatePath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AzureStackEdgeVPN" pfxPassword = $pfxPassword ExternalFQDN = "azurestackedge.contoso.com" } Invoke-AzsEdgeVPNCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Edge VPN Certificates .PARAMETER CertificatePath Path to directory structure for Azure Stack Edge VPN Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName. Does not need to be resolved. .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true,HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType AzureStackEdgeVPN } function Invoke-AzsEdgeWifiClientCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Edge Wifi Client Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Edge Wifi Client certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatePath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AzureStackEdgeWifiClient" pfxPassword = $pfxPassword ExternalFQDN = "azurestackedge.contoso.com" NodeSerialNumber = "WIN-KARB2NP5J3O" } Invoke-AzsEdgeWifiClientCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Edge Wifi Client Certificates .PARAMETER CertificatePath Path to directory structure for Azure Stack Edge Wifi Client Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName. Does not need to be resolved. .PARAMETER NodeSerialNumber Specifies the node serial number(s) of an Azure Stack Edge device. .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true,HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, HelpMessage="Enter the Node Serial Number of an Azure Stack Edge device.")] [string] $NodeSerialNumber, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType AzureStackEdgeWifiClient } function Invoke-AzsEdgeWifiServerCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Edge Wifi Server Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Edge Wifi Server certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatePath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AzureStackEdgeWifiServer" pfxPassword = $pfxPassword RadiusServerName = "radiusserver01.azurestackedge.contoso.com" } Invoke-AzsEdgeWifiServerCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Edge Wifi Server Certificates .PARAMETER CertificatePath Path to directory structure for Azure Stack Edge Wifi Server Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER RadiusServerName Specifies the fully qualifed Radius Server Name of an Azure Stack Edge wifi server. .PARAMETER ExternalFQDN Specifies the Azure Stack's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName. Does not need to be resolved. .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true,HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, HelpMessage="Enter the Radius Server Name of an Azure Stack Edge wifi server.")] [string] $RadiusServerName, [Parameter(Mandatory=$false, HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType AzureStackEdgeWifiServer } function Invoke-AzsHubDeploymentCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Hub Deployment/Infrastructure Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Hub Deployment certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\Deployment" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' IdentitySystem = 'AAD' } Invoke-AzsHubDeploymentCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub Deployment/Infrastructure Certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\Deployment" pfxPassword = $pfxPassword DeploymentDataJSONPath = "$ENV:USERPROFILE\Documents\AzureStack\DeploymentData.json" } Invoke-AzsHubDeploymentCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub Deployment/Infrastructure Certificates using deploymentdata.json from deployment team. .PARAMETER CertificatePath Path to directory structure for Azure Stack Hub Deployment Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER deploymentDataJSONPath Specifies the Azure Stack Hub deployment data JSON configuration file. This enables the deployment team and/or system integrators to validate directly against the deployment asset that seeds deployment. Replaces user input for region name, external FQDN and identity system (if applicable). .PARAMETER ExternalFQDN Specifies the Azure Stack deployment's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName .PARAMETER RegionName Specifies the Azure Stack deployment's region name when deploymentdata.json is not used, must be alphanumeric. .PARAMETER IdentitySystem Specifies the Azure Stack deployment's Identity System valid values, AAD or ADFS, for Azure Active Directory and Active Directory Federated Services respectively .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack Hub Region Name")] [ValidatePattern('(?# Region must be alphanumeric)^[a-zA-Z0-9]+$')] [string] $RegionName, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter the Radius Server Name of an Azure Stack Edge wifi server.")] [ValidateSet('AAD', 'ADFS')] [string] $IdentitySystem, [Parameter(Mandatory = $true, ParameterSetName = "JSON", HelpMessage = "Enter Path to DeploymentData.json")] [ValidateScript( {Test-Path $_ -Include *.json})] [string] $deploymentDataJSONPath, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType Deployment } function Invoke-AzsHubAppServicesCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Hub AppServices Resource Provider Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Hub AppServices certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AppServices" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsHubAppServicesCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub AppServices Resource Provider Certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\AppServices" pfxPassword = $pfxPassword DeploymentDataJSONPath = "$ENV:USERPROFILE\Documents\AzureStack\DeploymentData.json" } Invoke-AzsHubAppServicesCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub AppServices Resource Provider Certificates using deploymentdata.json from Deployment team. .PARAMETER CertificatePath Path to directory structure for Azure Stack Hub AppServices Certificates. Should contain sub folders named API, DefaultDomain, Identity and Publishing with appropriate certificates placed in each. Use New-AzsCertificateFolder -certificateType AppServices for help with generation. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack deployment's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName .PARAMETER RegionName Specifies the Azure Stack deployment's region name, must be alphanumeric. .PARAMETER deploymentDataJSONPath Specifies the Azure Stack Hub deployment data JSON configuration file. This enables the deployment team and/or system integrators to validate directly against the deployment asset that seeds deployment. Replaces user input for region name, external FQDN and identity system (if applicable). .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack Hub Region Name")] [ValidatePattern('(?# Region must be alphanumeric)^[a-zA-Z0-9]+$')] [string] $RegionName, [Parameter(Mandatory = $true, ParameterSetName = "JSON", HelpMessage = "Enter Path to DeploymentData.json")] [ValidateScript( {Test-Path $_ -Include *.json})] [string] $deploymentDataJSONPath, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType AppServices } function Invoke-AzsHubEventHubsCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Hub EventHubs Resource Provider Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Hub EventHubs certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\EventHubs" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsHubEventHubsCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub EventHubs Resource Provider Certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\EventHubs" pfxPassword = $pfxPassword DeploymentDataJSONPath = "$ENV:USERPROFILE\Documents\AzureStack\DeploymentData.json" } Invoke-AzsHubEventHubsCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub EventHubs Resource Provider Certificates with deploymentdata.json from Deployment team. .PARAMETER CertificatePath Path to directory structure for Azure Stack Hub EventHubs Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack deployment's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName .PARAMETER RegionName Specifies the Azure Stack deployment's region name, must be alphanumeric. .PARAMETER deploymentDataJSONPath Specifies the Azure Stack Hub deployment data JSON configuration file. This enables the deployment team and/or system integrators to validate directly against the deployment asset that seeds deployment. Replaces user input for region name, external FQDN and identity system (if applicable). .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack Hub Region Name")] [ValidatePattern('(?# Region must be alphanumeric)^[a-zA-Z0-9]+$')] [string] $RegionName, [Parameter(Mandatory = $true, ParameterSetName = "JSON", HelpMessage = "Enter Path to DeploymentData.json")] [ValidateScript( {Test-Path $_ -Include *.json})] [string] $deploymentDataJSONPath, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType EventHubs } function Invoke-AzsHubIoTHubCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Hub IoTHub Resource Provider Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Hub IoTHub certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\IoTHub" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsHubIoTHubCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub IoTHub Resource Provider Certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\IoTHub" pfxPassword = $pfxPassword DeploymentDataJSONPath = "$ENV:USERPROFILE\Documents\AzureStack\DeploymentData.json" } Invoke-AzsHubIoTHubCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub IoTHub Resource Provider Certificates using deploymentdata.json from Deployment team. .PARAMETER CertificatePath Path to directory structure for Azure Stack Hub IoTHub Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack deployment's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName .PARAMETER RegionName Specifies the Azure Stack deployment's region name, must be alphanumeric. .PARAMETER deploymentDataJSONPath Specifies the Azure Stack Hub deployment data JSON configuration file. This enables the deployment team and/or system integrators to validate directly against the deployment asset that seeds deployment. Replaces user input for region name, external FQDN and identity system (if applicable). .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack Hub Region Name")] [ValidatePattern('(?# Region must be alphanumeric)^[a-zA-Z0-9]+$')] [string] $RegionName, [Parameter(Mandatory = $true, ParameterSetName = "JSON", HelpMessage = "Enter Path to DeploymentData.json")] [ValidateScript( {Test-Path $_ -Include *.json})] [string] $deploymentDataJSONPath, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType IoTHub } function Invoke-AzsHubDBAdapterCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Hub DBAdapter Resource Provider Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Hub DBAdapter certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\DBAdapter" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsHubDBAdapterCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub DBAdapter Resource Provider Certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\DBAdapter" pfxPassword = $pfxPassword DeploymentDataJSONPath = "$ENV:USERPROFILE\Documents\AzureStack\DeploymentData.json" } Invoke-AzsHubDBAdapterCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub DBAdapter Resource Provider Certificates using deploymentdata.json from Deployment team. .PARAMETER CertificatePath Path to directory structure for Azure Stack Hub DBAdapter Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack deployment's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName .PARAMETER RegionName Specifies the Azure Stack deployment's region name, must be alphanumeric. .PARAMETER deploymentDataJSONPath Specifies the Azure Stack Hub deployment data JSON configuration file. This enables the deployment team and/or system integrators to validate directly against the deployment asset that seeds deployment. Replaces user input for region name, external FQDN and identity system (if applicable). .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack Hub Region Name")] [ValidatePattern('(?# Region must be alphanumeric)^[a-zA-Z0-9]+$')] [string] $RegionName, [Parameter(Mandatory = $true, ParameterSetName = "JSON", HelpMessage = "Enter Path to DeploymentData.json")] [ValidateScript( {Test-Path $_ -Include *.json})] [string] $deploymentDataJSONPath, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType DBAdapter } function Invoke-AzsHubDataBoxEdgeCertificateValidation { <# .SYNOPSIS Run certificate validation for Azure Stack Hub Databox Edge Resource Provider Certificates .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate Azure Stack Hub DBAdapter certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\DataboxEdge" pfxPassword = $pfxPassword RegionName = 'east' ExternalFQDN = 'azurestack.contoso.com' } Invoke-AzsHubDataBoxEdgeCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub Databox Edge Resource Provider Certificates .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $certificateValidationParams = @{ certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\DataboxEdge" pfxPassword = $pfxPassword DeploymentDataJSONPath = "$ENV:USERPROFILE\Documents\AzureStack\DeploymentData.json" } Invoke-AzsHubDataBoxEdgeCertificateValidation @certificateValidationParams Run certificate validation for Azure Stack Hub Databox Edge Resource Provider Certificates using deploymentdata.json from Deployment team. .PARAMETER CertificatePath Path to directory structure for Azure Stack Hub DBAdapter Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the Azure Stack deployment's External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName .PARAMETER RegionName Specifies the Azure Stack deployment's region name, must be alphanumeric. .PARAMETER deploymentDataJSONPath Specifies the Azure Stack Hub deployment data JSON configuration file. This enables the deployment team and/or system integrators to validate directly against the deployment asset that seeds deployment. Replaces user input for region name, external FQDN and identity system (if applicable). .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, ParameterSetName = "User", HelpMessage="Enter Azure Stack Hub Region Name")] [ValidatePattern('(?# Region must be alphanumeric)^[a-zA-Z0-9]+$')] [string] $RegionName, [Parameter(Mandatory = $true, ParameterSetName = "JSON", HelpMessage = "Enter Path to DeploymentData.json")] [ValidateScript( {Test-Path $_ -Include *.json})] [string] $deploymentDataJSONPath, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType DataboxEdge } function Invoke-AzsCustomCertificateValidation { <# .SYNOPSIS Run certificate validation for Custom Certificates. .DESCRIPTION Calls Invoke-AzsCertificateValidation with neccessary parameters to validate custom certificates, by default attributes will be validated against Azure Stack standards. .EXAMPLE $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString $customCertConfig = @{ 'NWTradersRP' = @{ DNSName = @('*.nwtraders','admin.nwtraders') KeyLength = 4096 } 'TailSpinRP' = @{ DNSName = @('*.tailspin') HashAlgorithm = 'SHA386' } } $certificateValidationParams = @{ CustomCertConfig = $customCertConfig certificatepath = "$ENV:USERPROFILE\Documents\AzureStack\Certificates\CustomRPs" pfxPassword = $pfxPassword ExternalFQDN = 'east.azurestack.contoso.com' } Invoke-AzsCustomCertificateValidation @certificateValidationParams Validates multiple Certificates. Each single certificates should be placed in a subfolder (of CertificatePath) named the same as the key in the custom hashtable e.g. NWTraderRP and TailSpinRP as in the example. .PARAMETER CertificatePath Path to directory structure for Azure Stack Hub DBAdapter Certificates. .PARAMETER pfxPassword A securestring containing a single password that is common across all certificates .PARAMETER ExternalFQDN Specifies the certificates External FQDN, also aliased as ExternalFQDN and ExternalDomainName, must be valid DNSHostName, optional parameter, DNSName can contain full fqdn, or prefix .PARAMETER CustomCertConfig Specifies the custom hashtable to check a certificate against. .PARAMETER CleanReport Specifies whether to purge the existing report and start again with a clean report. Execution history and validation data is lost for all Readiness Checker validations. .PARAMETER OutputPath Specifies custom path to save Readiness JSON report and Verbose log file. #> [CmdletBinding()] param ( [Parameter(Mandatory=$true, HelpMessage="Enter Path to Certificates Directory")] [ValidateScript( {Test-Path $_ -PathType Container})] [string] $certificatepath, [Parameter(Mandatory = $true, HelpMessage = "Enter Password for PFX Certificates as a secure string" )] [securestring] $pfxPassword, [Parameter(Mandatory=$false, ParameterSetName = "User", HelpMessage="Enter External FQDN")] [Alias("ExternalDomainName", "FQDN")] [ValidateScript( {[System.Uri]::CheckHostName($_) -eq 'dns' <#FQDN must be valid DNSHostName#>})] [string] $ExternalFQDN, [Parameter(Mandatory=$true, HelpMessage="Enter custom hashtable to check a certificate against")] [hashtable] $customCertConfig, [Parameter(HelpMessage = "Directory path for log and report output")] [string] $OutputPath = "$ENV:TEMP\AzsReadinessChecker", [Parameter(HelpMessage = "Remove all previous progress and create a clean report")] [switch] $CleanReport = $false ) Invoke-AzsCertificateValidation @PSBoundParameters -CertificateType Custom } # SIG # Begin signature block # MIIjnwYJKoZIhvcNAQcCoIIjkDCCI4wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAvJeZ7eCUmNrlO # zyfRAlGxk7JSncsQvyv+d7Qnt5xTGKCCDYEwggX/MIID56ADAgECAhMzAAAB32vw # LpKnSrTQAAAAAAHfMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjAxMjE1MjEzMTQ1WhcNMjExMjAyMjEzMTQ1WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQC2uxlZEACjqfHkuFyoCwfL25ofI9DZWKt4wEj3JBQ48GPt1UsDv834CcoUUPMn # s/6CtPoaQ4Thy/kbOOg/zJAnrJeiMQqRe2Lsdb/NSI2gXXX9lad1/yPUDOXo4GNw # PjXq1JZi+HZV91bUr6ZjzePj1g+bepsqd/HC1XScj0fT3aAxLRykJSzExEBmU9eS # yuOwUuq+CriudQtWGMdJU650v/KmzfM46Y6lo/MCnnpvz3zEL7PMdUdwqj/nYhGG # 3UVILx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