|
| 1 | +--- |
| 2 | +title: Access the payShield manager for your Azure Payment HSM |
| 3 | +description: Access the payShield manager for your Azure Payment HSM |
| 4 | +services: payment-hsm |
| 5 | +ms.service: payment-hsm |
| 6 | +author: msmbaldwin |
| 7 | +ms.author: mbaldwin |
| 8 | +ms.topic: quickstart |
| 9 | +ms.date: 04/06/2023 |
| 10 | +--- |
| 11 | + |
| 12 | +# How to inspect Azure Payment HSM traffic |
| 13 | + |
| 14 | +Intent of this article is to explain how to inspect traffic to Azure Payment HSM. |
| 15 | + |
| 16 | +Payment Hardware Security Module (Payment HSM or PHSM) is a [bare-metal service](overview.md) providing cryptographic key operations for real-time and critical payment transactions in the Azure cloud. |
| 17 | + |
| 18 | +Payment HSM devices are a variation of Dedicated HSM devices with more advanced cryptographic modules and features: a Payment HSM never decrypts the PIN value in transit for example. |
| 19 | + |
| 20 | +The Azure Payment HSM solution uses hardware from [Thales](https://cpl.thalesgroup.com/encryption/hardware-security-modules/payment-hsms/payshield-10k) as a vendor. Customers have [full control and exclusive access](overview.md#customer-managed-hsm-in-azure) to the Payment HSM. |
| 21 | + |
| 22 | +## Azure Payment HSM - Networking |
| 23 | + |
| 24 | +When Payment HSM is deployed, it comes with a host network interface and a management network interface. There are several deployment scenarios: |
| 25 | +1. [With host and management ports in same VNet](create-payment-hsm.md?tabs=azure-cli) |
| 26 | +2. [With host and management ports in different VNets](create-different-vnet.md?tabs=azure-cli) |
| 27 | +3. [With host and management port with IP addresses in different VNets](create-different-ip-addresses.md?tabs=azure-cli) |
| 28 | + |
| 29 | +In all of the above scenarios, Payment HSM is a VNet-injected service in a delegated subnet: `hsmSubnet` and `managementHsmSubnet` must be delegated to `Microsoft.HardwareSecurityModules/dedicatedHSMs` service. |
| 30 | + |
| 31 | +## FastPathEnabled feature flag & fastpathenabled VNet tag |
| 32 | + |
| 33 | +In addition, the `FastPathEnabled` **feature** must be [registered and approved](https://learn.microsoft.com/en-us/azure/payment-hsm/register-payment-hsm-resource-providers?tabs=azure-cli#register-the-resource-providers-and-features) on all subscriptions that need access to Payment HSM. |
| 34 | + |
| 35 | +A second step consists in enabling the `fastpathenabled` **tag** on the VNet hosting the Payment HSM delegated subnet and on every peered VNet requiring [connectivity to the Payment HSM devices](https://learn.microsoft.com/en-us/azure/payment-hsm/peer-vnets?tabs=azure-cli). This operation must be done via CLI. |
| 36 | + |
| 37 | +For the `fastpathenabled` VNet tag to be valid, the `FastPathEnabled` feature needs to be enabled on the subscription where that VNet is deployed: make sure to complete both steps to enable resources to connect to the Payment HSM devices. |
| 38 | + |
| 39 | +Adding the `FastPathEnabled` feature and enabling the `fastpathenabled` tag don't cause any downtime. |
| 40 | + |
| 41 | +The public documentation related to these 2 settings is now available [here](fastpathenabled.md). |
| 42 | + |
| 43 | +## Azure Payment HSM - Networking limitations |
| 44 | + |
| 45 | +Payment HSM comes with some policy [restrictions](solution-design.md#constraints) on these subnets: **Network Security Groups (NSGs) and User-Defined Routes (UDRs) are currently not supported**. |
| 46 | + |
| 47 | +> Note: PHSM is not compatible with vWAN topologies or cross region VNet peering, as listed in the [topology supported](solution-design.md#supported-topologies). |
| 48 | +
|
| 49 | +This article present two ways to inspect traffic destined to a Payment HSM: a firewall with source network address translation (SNAT), and a firewall with reverse proxy |
| 50 | + |
| 51 | +# Firewall with source network address translation (SNAT) |
| 52 | + |
| 53 | +This design is inspired by the [Dedicated HSM solution architecture](networking.md#solution-architecture). |
| 54 | + |
| 55 | +The firewall **SNATs the client IP address** before forwarding traffic to the PHSM NIC, guaranteeing that the return traffic will automatically be directed back to the Firewall. Either an Azure Firewall or a 3rd party FW NVA can be used in this design. |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +:::image type="content" source="./media/firewall-snat-architecture-diagram.png" alt-text="Architecture diagram of the firewall with SNAT"::: |
| 60 | + |
| 61 | +Route tables required: |
| 62 | +- On-Prem to PHSM: a Route Table containing a UDR for the Payment HSM VNet range and pointing to the central hub Firewall is applied to the GatewaySubnet. |
| 63 | +- Spoke VNet(s) to PHSM: a Route Table containing the usual default route pointing to the central hub Firewall is applied to the Spoke VNet(s) subnets. |
| 64 | + |
| 65 | +Results: |
| 66 | +- UDRs not being supported on the PHSM subnet is addressed by the Firewall doing SNAT on the client IP: when forwarding traffic to PHSM, the return traffic will automatically be directed back to the Firewall. |
| 67 | +- Filtering rules that cannot be enforced using NSGs on the PHSM subnet can be configured on the Firewall. |
| 68 | +- Both Spoke traffic and On-Prem traffic to the PHSM environment are secured. |
| 69 | + |
| 70 | +## Firewall with reverse proxy |
| 71 | + |
| 72 | +This design is a good option when performing SNAT on the Firewall is not approved by network security teams, requiring instead to keep the source and destination IPs unchanged for traffic crossing the Firewall. |
| 73 | + |
| 74 | +This architecture leverages a reverse proxy, deployed in a dedicated subnet in the PHSM VNet directly or in a peered VNet. Instead of sending traffic to the PHSM devices, the destination is set to the reverse proxy IP, located in a subnet that does not have the restrictions of the PHSM delegated subnet: both NSGs and UDRs can be configured, and combined with a Firewall in the central hub. |
| 75 | + |
| 76 | +:::image type="content" source="./media/firewall-reverse-proxy-architecture-diagram.png" alt-text="Architecture diagram of the firewall with reverse proxy"::: |
| 77 | + |
| 78 | +This solution requires a reverse proxy, such as: |
| 79 | + |
| 80 | +- F5 (Azure Marketplace ; VM-based) |
| 81 | +- NGINXaaS (Azure Marketplace ; PaaS fully managed) |
| 82 | +- Reverse proxy Server using NGINX (VM-based) |
| 83 | +- Reverse proxy Server using HAProxy (VM-based) |
| 84 | + |
| 85 | +Example of reverse proxy Server using NGINX (VM-based) configuration: |
| 86 | + |
| 87 | +```conf |
| 88 | +# Nginx.conf |
| 89 | +stream { |
| 90 | + server { |
| 91 | + listen 1500; |
| 92 | + proxy_pass 10.221.8.4:1500; |
| 93 | + } |
| 94 | +
|
| 95 | + upstream phsm { |
| 96 | + server 10.221.8.5:443; |
| 97 | + } |
| 98 | +
|
| 99 | + server { |
| 100 | + listen 443; |
| 101 | + proxy_pass phsm; |
| 102 | + proxy_next_upstream on; |
| 103 | + } |
| 104 | +} |
| 105 | +``` |
| 106 | + |
| 107 | +Route tables required: |
| 108 | +- On-Prem to PHSM: a Route Table containing a UDR for the Payment HSM VNet range and pointing to the central hub Firewall is applied to the GatewaySubnet. |
| 109 | +- Spoke VNet(s) to PHSM: a Route Table containing the usual default route pointing to the central hub Firewall is applied to the Spoke VNet(s) subnets. |
| 110 | + |
| 111 | +> [!IMPORTANT] |
| 112 | +> Gateway Route propagation must be disabled on the reverse proxy subnet, so that a 0/0 UDR is enough to force the return traffic via the firewall. |
| 113 | +
|
| 114 | +Results: |
| 115 | +- UDRs not being supported on the PHSM subnet can be configured on the reverse proxy subnet. |
| 116 | +- The reverse proxy SNATs the client IP: when forwarding traffic to PHSM, the return traffic will automatically be directed back to the reverse proxy. |
| 117 | +- Filtering rules that cannot be enforced using NSGs on the PHSM subnet can be configured on the Firewall and/or on NSGs applied to the reverse proxy subnet. |
| 118 | +- Both Spoke traffic and On-Prem traffic to the PHSM environment are secured. |
| 119 | + |
| 120 | +## Next steps |
0 commit comments