Think of an organization that maintains most of its IT infrastructure on Azure. It applies a segmentation strategy by branch office, where the assets underlying each regional branch office are deployed to their specific landing zone subscription, i.e. SUB-BRANCH-A, SUB-BRANCH-B, etc.
The landing zones share the same Microsoft Entra ID Tenant as their Identity Provider, and may span several Azure regions.
The subscription SUB-OPERATIONS is a technical subscription whose resources implement common services for all the other landing zones. For example, monitoring services, as well as the distribution and management of secrets from the common Tenant to Key Vaults deployed to each particular branch subscription, are two examples of shared services. The development, implementation, maintenance and operation of the common services are the responsibility of specialized operational IT teams.
As the diagram clearly shows, all communication is secured in two ways:
This can be considered a baseline design in terms of security. It meets the minimum requirements for industry-grade solutions, but falls short of some security practices that would eliminate well-known security risks.
Some examples of open security risks concerning this design are:
The current implementation enables data flow between SUB-BRANCH-X and SUB-OPERATIONS over the public internet via HTTPS, relying on public IP addresses to provide access to resources. Furthermore, the security is implemented at the following OSI layers:
It’s possible to improve the security of this solution by transmitting data through private IP routes within the Azure backbone and by removing the public endpoint of any service whenever possible, or if not possible, by applying a downstream firewall.
The design strategy involves making as few changes as possible to the current design at any one time, and gradually transforming it by increasing its complexity in a step-by-step fashion until a new design emerges that meets as many of the design goals as possible.
Let’s focus on app-a1 and its backend app-ops-1 to illustrate the point and make it easier to introduce the essential topic of Service Endpoint. The article Premium Data Security on a Budget with Azure offers a gentle introduction to this topic; in essence, the technology allows sub-a1-1 to advertise its private IP range to the PaaS service App Service, the backend server app-ops-0.
This has the following important consequences:
The same pattern can be replicated and expanded elsewhere in the design providing the same advantages on multiple fronts and integrations. However, before discussing this in detail, a new topic must be introduced:
In summary, you can associate an Azure VNet (a virtual network within Azure) as the outbound traffic network of an App Service resource (this includes Azure Functions and Web Jobs). This opens up several possibilities to improve the security posture of the design by leveraging the same Service Endpoint mechanism (Virtual Network service endpoints), just illustrated for the communication from app-a-1 to app-ops-1.
The crucial point to understand from the documentation, Virtual Network service endpoints, is that Service Endpoints offer a simple mechanism to securely connect a network and its resources to many Azure services, improving the security posture considerably with minimal effort at no cost.
The security of the design can be improved further in the following way.
Suppose that app-a-1 is a front-end app or any app that uses app-ops-1 as its backend API server, while it’s also the case that the app-a-1 can also be used by app-ops-1 to push data or perform queries on resources located on SUB-BRANCH-X.
Then by choosing to implement the receiving end of this communication app-a-1 as an App Service (a PaaS) rather than an Azure VM (IaaS), there is the opportunity to retain the integration app-a-1 => app-ops-1 by using Azure App Service Virtual Network Integration with delegated-sub-1 and the the SE se-appservice and at the same time use the se-app-ops-1 from delegated-sub-0 to enforce secure communication from the opposite side.
At this point, app-a-1 becomes a convenient PaaS and can also be isolated through its downstream, free downstream service firewall, as was the case in all the preceding examples.
Rounds 1 and 2 of security improvements are based on Virtual Network service endpoints and introduce additional security controls at the Application-Layer (layer 7 of the OSI Model) in the design. However, this step introduces a new concept to illustrate another mechanism that adds security control at the Network-Layer (layer 3 OSI Model) / Data-Link (layer 2).
This is the integration of eg-a-1 with app-ops-1, from the Event Grid in the subscription SUB-BRANCH-X to the backend server. This time we implement the Network security for Azure Event Grid resources – Private Endpoint. The Azure Event Grid is a subscription-level global service, and it offers mechanisms to subscribe to event cross-subscription and even cross-tenant:
However, there is a much simpler way to implement this integration by using a private endpoint. This integration is suitable and preferable when:
In this case, for example, we assume that the backend server app-ops-1 must be the recipient of the Near Expiry Event (NEE) emitted for the secrets stored in the Key Vault kv-a-1. This is a well-documented, consolidated pattern:
In the implementation represented in the schematic, the Private Endpoint pe-del-sub-0-1 is reserved to resolve to the DNS zone pl-a-1, and can pull the NEE events from the Event Grid through a dedicated private route.
This is based on the following recommended patterns, in particular the mechanism of Pull delivery:
The difference to the solution based on the service endpoint is that, in this case, there is no longer a public IP address; therefore, the channel is truly between private networks. There is no longer the possibility of accidentally opening a public IP address by misconfiguration of the service firewall at one end of the route.
This security improvement comes at a cost as, contrary to service endpoints which are completely free in Azure, private endpoints add some costs (Azure Private Link pricing), although in this specific case this cost increment will be very negligible as the traffic between the backend service and the Event Grid to detect NEE events is bound to be minimal in all practical cases.
Finally in this last round of improvements, you can see that the technique based on the private endpoint is definitely not an isolated case with the Event Grid; instead, it;s a consolidated Azure pattern for security.
In this case, the SQL Server can be completely isolated from the internet by removing its public IP address and replacing it with the private endpoint pe-del-sub-0-2 in the outbound network of the backend server, which resolves over private DNS to the private IP address of the Azure SQL Server sql-srv-0. The backend server will now have exclusive access to the SQL Server as it should be in most productive scenarios.
The same concept may be applied to other parts of this design in that, in general, any integration based on a service endpoint can be replaced by an integration based on a private endpoint / private link as illustrated.
The factors to consider in the process of replacing service endpoints with private endpoints are the following:
The original design implements basic industry-standard security features:
The improved design adds the following security features:
In addition:
Did you learn from this article? Perhaps you’re already familiar with some of the techniques above? If you find cybersecurity issues interesting, maybe you could start in a cybersecurity or similar position here at Würth Phoenix.