Azure Database for MariaDB not configured with private endpoint misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC2_AZURE_43
Category - Subcategory
Public Exposure - VPC VCN VNet
Provider
AZURE
Severity
MEDIUM
Framework
Terraform, Terraform Plan
Mapped CSPM/KSPM Rule
d22487ed-9b42-451d-9321-d8471e2e46c3
Impact
This rule checks whether Azure MariaDB database servers are configured with private endpoints. Private endpoint connections are essential for ensuring secure communication, establishing exclusive, private connectivity to Azure Database for MariaDB. Configuring a private endpoint ensures access only from recognized networks, preventing entry from potentially malicious or unknown IP addresses, including those within Azure. It is recommended to establish a private endpoint to enhance the security of communication for your Azure MariaDB database.
How to Fix
Resource: azurerm_mariadb_server, azurerm_private_endpoint
Arguments: private_connection_resource_id
To fix this issue and establish secure communication with your network, configure your Azure MariaDB server with a private endpoint, by adding a private_connection_resource_id connection to the azurerm_mariadb_server service.
This code enhances Azure MariaDB server security by enabling a private endpoint connection. The private endpoint allows secure connections from clients in the same Azure virtual network or peered virtual networks. This control over access to the MariaDB server prevents exposure to the public internet, helping to reduce the threat of data leakage and external threats. [source,go]
resource "azurerm_mariadb_server" "example" { ... }
resource "azurerm_private_endpoint" "example" { ...
private_service_connection { ... private_connection_resource_id = azurerm_mariadb_server.pass.id ... } }
Last updated
Was this helpful?
