Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
In deze quickstart ziet u hoe u een Azure Application Gateway implementeert met mutual TLS (mTLS) passthrough met behulp van een Azure Resource Manager-sjabloon (ARM-sjabloon) en API-versie 2025-03-01. In de passthrough-modus vraagt de gateway een clientcertificaat aan, maar valideert het niet. Validatie van certificaten en het afdwingen van beleid vindt plaats in de back-end.
Belangrijkste kenmerken
- Koppel een SSL-profiel aan de listener voor mTLS passthrough.
- Er is geen client-CA-certificaat vereist bij de gateway.
- De
verifyClientAuthModeeigenschap ondersteuntStrictenPassthroughwaarden. - Portal-ondersteuning: u kunt mTLS-passthrough rechtstreeks configureren in de Azure-portal.
Opmerking
PowerShell- en CLI-ondersteuning voor passthrough-configuratie zijn momenteel niet beschikbaar. U kunt mTLS-passthrough configureren met behulp van de Azure-portal of ARM-sjablonen.
MTLS-passthrough configureren met behulp van Azure-portal
U kunt mTLS-passthrough rechtstreeks configureren in de Azure-portal door een SSL-profiel te maken met de Passthrough clientverificatiemethode:
Navigeer naar uw Application Gateway-resource in de Azure-portal.
Selecteer onder InstellingenSSL-profielen.
Selecteer + Toevoegen om een nieuw SSL-profiel te maken.
Voer een naam in voor uw SSL-profiel.
Selecteer Passthrough op het tabblad Clientverificatie.
In de Passthrough-modus is het clientcertificaat optioneel en is de back-endserver verantwoordelijk voor clientverificatie.
- Configureer indien nodig SSL-beleidsinstellingen.
- Selecteer Toevoegen om het SSL-profiel te maken.
- Koppel het SSL-profiel aan uw HTTPS-listener.
Vereiste voorwaarden
- Een Azure-abonnement en -resourcegroep.
- Azure CLI lokaal geïnstalleerd.
- Een SSL-certificaat (Base64-gecodeerde PFX) en een wachtwoord.
- Een SSH-sleutel voor linux-VM-beheerder (indien van toepassing).
- API-versie
2025-03-01of hoger voor de passthrough-eigenschap.
Application Gateway implementeren met mTLS passthrough-listener
Met deze sjabloon maakt u de volgende bronnen:
- Een virtueel netwerk met twee subnetten (één gedelegeerd aan Application Gateway).
- Een openbaar IP-adres voor de gatewayfront-end.
- Een Application Gateway (Standard_v2) met:
- SSL-certificaat en SSL-profiel voor passthrough van client-certificaten.
- HTTPS-listener en routeringsregel.
- Back-endpool die naar een app-dienst verwijst.
Werk de sjabloon bij met uw configuratiegegevens en voeg een geldig SSL-certificaat toe.
Parameterbestand: deploymentParameters.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"addressPrefix": {
"value": "10.0.0.0/16"
},
"subnetPrefix": {
"value": "10.0.0.0/24"
},
"skuName": {
"value": "Standard_v2"
},
"capacity": {
"value": 2
},
"adminUsername": {
"value": "ubuntu"
},
"adminSSHKey": {
"value": "<your-ssh-public-key>"
},
"certData": {
"value": "<Base64-encoded-PFX-data>"
},
"certPassword": {
"value": "<certificate-password>"
}
}
}
Sjabloonbestand: deploymentTemplate.json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"addressPrefix": {
"defaultValue": "10.0.0.0/16",
"type": "String",
"metadata": {
"description": "Address prefix for the Virtual Network"
}
},
"subnetPrefix": {
"defaultValue": "10.0.0.0/24",
"type": "String",
"metadata": {
"description": "Subnet prefix"
}
},
"skuName": {
"defaultValue": "Standard_Medium",
"type": "String",
"metadata": {
"description": "Sku Name"
}
},
"capacity": {
"defaultValue": 2,
"type": "Int",
"metadata": {
"description": "Number of instances"
}
},
"adminUsername": {
"type": "String"
},
"adminSSHKey": {
"type": "securestring"
},
"certData": {
"type": "String",
"metadata": {
"description": "ssl cert data"
}
},
"certPassword": {
"type": "SecureString",
"metadata": {
"description": "ssl cert password"
}
}
},
"variables": {
"applicationGatewayName": "mtlsAppGw",
"idName": "identity",
"publicIPAddressName": "mtlsPip",
"virtualNetworkName": "mtlsVnet",
"subnetName": "appgwsubnet",
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
"publicIPRef": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]",
"applicationGatewayID": "[resourceId('Microsoft.Network/applicationGateways',variables('applicationGatewayName'))]",
"apiVersion": "2025-03-01",
"identityID": "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities',variables('idName'))]",
"backendSubnetId": "[concat(variables('vnetID'),'/subnets/backendsubnet')]"
},
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"name": "[variables('virtualNetworkName')]",
"apiVersion": "2024-07-01",
"location": "[resourceGroup().location]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[parameters('addressPrefix')]"
]
},
"subnets": [
{
"name": "[variables('subnetName')]",
"properties": {
"addressPrefix": "[parameters('subnetPrefix')]",
"delegations": [
{
"name": "Microsoft.Network/applicationGateways",
"properties": {
"serviceName": "Microsoft.Network/applicationGateways"
}
}
]
}
},
{
"name": "backendSubnet",
"properties": {
"addressPrefix": "10.0.2.0/24"
}
}
]
}
},
{
"type": "Microsoft.Network/publicIPAddresses",
"sku": {
"name": "Standard"
},
"name": "[variables('publicIPAddressName')]",
"apiVersion": "2024-07-01",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "Static"
}
},
{
"type": "Microsoft.Network/applicationGateways",
"name": "[variables('applicationGatewayName')]",
"apiVersion": "[variables('apiVersion')]",
"location": "[resourceGroup().location]",
"properties": {
"sku": {
"name": "Standard_v2",
"tier": "Standard_v2",
"capacity": 3
},
"sslCertificates": [
{
"name": "sslCert",
"properties": {
"data": "[parameters('certData')]",
"password": "[parameters('certPassword')]"
}
}
],
"sslPolicy": {
"policyType": "Predefined",
"policyName": "AppGwSslPolicy20220101"
},
"sslProfiles": [
{
"name": "sslnotrustedcert",
"id": "[concat(resourceId('Microsoft.Network/applicationGateways', variables('applicationGatewayName')), '/sslProfiles/sslnotrustedcert')]",
"properties": {
"clientAuthConfiguration": {
"VerifyClientCertIssuerDN": false,
"VerifyClientRevocation": "None",
"VerifyClientAuthMode": "Passthrough"
}
}
}
],
"gatewayIPConfigurations": [
{
"name": "appGatewayIpConfig",
"properties": {
"subnet": {
"id": "[variables('subnetRef')]"
}
}
}
],
"frontendIPConfigurations": [
{
"name": "appGatewayFrontendIP",
"properties": {
"PublicIPAddress": {
"id": "[variables('publicIPRef')]"
}
}
}
],
"frontendPorts": [
{
"name": "port2",
"properties": {
"Port": 444
}
}
],
"backendAddressPools": [
{
"name": "pool2",
"properties": {
"BackendAddresses": [
{
"fqdn": "headerappgw-hsa5gjh8fpfebcfd.westus-01.azurewebsites.net"
}
]
}
}
],
"backendHttpSettingsCollection": [
{
"name": "settings2",
"properties": {
"Port": 80,
"Protocol": "Http"
}
}
],
"httpListeners": [
{
"name": "listener2",
"properties": {
"FrontendIPConfiguration": {
"Id": "[concat(variables('applicationGatewayID'), '/frontendIPConfigurations/appGatewayFrontendIP')]"
},
"FrontendPort": {
"Id": "[concat(variables('applicationGatewayID'), '/frontendPorts/port2')]"
},
"Protocol": "Https",
"SslCertificate": {
"Id": "[concat(variables('applicationGatewayID'), '/sslCertificates/sslCert')]"
},
"sslProfile": {
"id": "[concat(variables('applicationGatewayID'), '/sslProfiles/sslnotrustedcert')]"
}
}
}
],
"requestRoutingRules": [
{
"Name": "rule2",
"properties": {
"RuleType": "Basic",
"priority": 2000,
"httpListener": {
"id": "[concat(variables('applicationGatewayID'), '/httpListeners/listener2')]"
},
"backendAddressPool": {
"id": "[concat(variables('applicationGatewayID'), '/backendAddressPools/pool2')]"
},
"backendHttpSettings": {
"id": "[concat(variables('applicationGatewayID'), '/backendHttpSettingsCollection/settings2')]"
}
}
}
]
},
"dependsOn": [
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"
]
}
]
}
De sjabloon implementeren
Voer de volgende Azure CLI opdracht uit om de sjabloon te implementeren:
az deployment group create \
--resource-group <your-resource-group> \
--template-file deploymentTemplate.json \
--parameters @deploymentParameters.json
Valideren en testen
De implementatie valideren
Ga in Azure Portal naar de Application Gateway-resource.
Selecteer JSON-weergave en selecteer API-versie
2025-03-01.Controleer of
verifyClientAuthModeis ingesteld opPassthroughin het SSL-profiel."sslProfiles": [ { "name": "sslnotrustedcert", "id": "<sample-subscription-id>", "etag": "W/\"851e4e20-d2b1-4338-9135-e0beac11aa0e\"", "properties": { "provisioningState": "Succeeded", "clientAuthConfiguration": { "verifyClientCertIssuerDN": false, "verifyClientRevocation": "None", "verifyClientAuthMode": "Passthrough" }, "httpListeners": [ { "id": "<sample-subscription-id>" } ] } } ]
Een clientcertificaat verzenden naar de back-end
Als u het clientcertificaat naar de back-end wilt doorsturen, configureert u een herschrijfregel. Zie HTTP-headers en URL herschrijven met Application Gateway voor meer informatie.
Wanneer de client een certificaat verzendt, zorgt dit herschrijven ervoor dat het clientcertificaat is opgenomen in de aanvraagheaders voor back-endverwerking.
Connectiviteit testen
Controleer of er verbindingen tot stand zijn gebracht, zelfs wanneer er geen clientcertificaat is opgegeven.
mTLS-passthrough-parameters
In de volgende tabel worden de parameters voor de mTLS-passthrough-configuratie beschreven:
| Naam | Typologie | Description |
|---|---|---|
verifyClientCertIssuerDN |
Boolean | Hiermee geeft u op of de naam van de certificaatverlener van het clientcertificaat op de gateway moet worden gecontroleerd. |
verifyClientRevocation |
String | Hiermee geeft u de verificatiemodus voor het intrekken van clientcertificaten op. |
verifyClientAuthMode |
String | Geeft de modus voor clientcertificaten aan. Geldige waarden zijn Strict en Passthrough. |
Passthrough-modus: De gateway vraagt een clientcertificaat aan, maar dwingt dit niet af. De back-end valideert het certificaat en dwingt het beleid af.
Beveiligingsoverwegingen
Volg de aanbevolen procedures voor beveiliging en gegevensverwerking van uw organisatie wanneer u deze oplossing implementeert en beheert.