bcgov / Cloud-Pathfinder-Azure

Apache License 2.0
0 stars 0 forks source link

Azure Firewall Features Testing #154

Open AErmie opened 2 weeks ago

AErmie commented 2 weeks ago

Azure Firewall includes the following features that need to be evaluated and tested. This will influence what will be enabled and configured in the LIVE environment.

Acceptance Criteria

Generated by Zenhub AI

AErmie commented 2 weeks ago

Preliminary Terraform code has been created that is used to create a Firewall Policy resource, along with configuring most of the features listed.

The only feature that has not yet been tested, is the TLS Inspection. This will require the creation of additional resources including a Managed Identity, a Key Vault, and a certificate.

This code can be found in the azure-lz-terraform-modules repo, under /azure_firewall/firewall_policy/ on the fw-policy branch.

AErmie commented 2 weeks ago

TLS Inspection Update

We now have Terraform code that creates a Managed Identity, a Key Vault, and a IAM Role Assignment (of the User-Assigned Managed Identity on the Key Vault resource).

Additionally, Terraform code has been developed to upload a certificate into the Key Vault.

Challenges

We are experiencing permissions issues that prevent changing the Key Vault from using Access Policies (default), to RBAC. We require Microsoft.Authorization/roleAssignments/write permissions.

AErmie commented 1 week ago

TLS Inspection Update #2

After testing the Azure RBAC permission model for Key Vault, it has been determined that Azure role-based access control (Azure RBAC) is not currently supported for authorization. Use the access policy model instead. See Azure Firewall Premium certificates for more details.

Created a shared module for Azure Key Vault > Access Policy, and confirmed that the Managed Identity only requires Secret: GET permissions. No other permissions (ie. Key / Certificate) are required.

Deployment Workflow

When creating an Azure Firewall Policy, if enabling the TLS Inspection premium feature, the Managed Identity, Key Vault, Key Vault Access Policy (granting the Managed ID access to the Key Vault), and Certificate, are expected to created (before the Policy itself is created).

This means the prescribed creating workflow would be:

AErmie commented 1 day ago

Based on the following Microsoft documentation (Deploy and configure Azure Firewall Premium), the following firewall features have been tested: