turbot/steampipe-mod-azure-compliance

Control: Azure SignalR Service should use private link

Description

Azure Private Link lets you connect your virtual network to Azure services without a public IP address at the source or destination. The private link platform handles the connectivity between the consumer and services over the Azure backbone network. By mapping private endpoints to your Azure SignalR Service resource instead of the entire service, you'll reduce your data leakage risks.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.signalr_service_private_link_used

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.signalr_service_private_link_used --share

SQL

This control uses a named query:

with signalr_service_connection as (
select
distinct a.id
from
azure_signalr_service as a,
jsonb_array_elements(private_endpoint_connections) as connection
where
connection -> 'PrivateLinkServiceConnectionState' ->> 'status' = 'Approved'
)
select
a.id as resource,
case
when sku ->> 'tier' = 'Free' then 'skip'
when c.id is null then 'alarm'
else 'ok'
end as status,
case
when sku ->>'tier' = 'Free' then a.name || ' is of ' || (sku ->>'tier' )|| ' tier.'
when c.id is null then a.name || ' not uses private link.'
else a.name || ' uses private link.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_signalr_service as a
left join signalr_service_connection as c on c.id = a.id,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id;

Tags