Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restrict what/who can send data to Azure Application Insights

I would like to ensure that only specific applications are able to send data to my Application insights resource. The situation I'm trying to avoid is if some developer or attacker has the instrumentation key, telemetry data from their machines are not sent to my application insights resource.

More concrete: I have an Azure VM running 3 IIS ASP.NET web apps. Each report to their own respective Application Inisghts resource. Currently, if a developer spins up one of those apps locally and points to the same app insights resource, it will accept the data and skew the metric data. I want to ensure that this is not possible.

Additional Context: I am experimenting with the codeless ApplicationInsights agent, but mostly using the manual SDK instrumentation method for ASP.NET.

I have looked at the network isolation method, but this seems like a huge cost increase because I will be charged extra for data going through privatelink, on top of data charges from AppInsights.

Currently, anyone on the public internet with my instrumentation key can send data to the appinsights resource. I would like to somehow restrict this to a specific AD application role or VM.

Can anyone help here? Thanks in advance.

like image 847
wishiwasabigdataguy Avatar asked Feb 02 '26 19:02

wishiwasabigdataguy


1 Answers

We recently released support of Azure AD authentication for Application Insights (https://learn.microsoft.com/en-us/azure/azure-monitor/app/azure-ad-authentication?tabs=net).

You can assign either user-assigned or system-assigned managed identity to your VM and give this identity rights to ingest telemetry.

On top of it you can disable local authentication. This will block ingestion based instrumentation key alone.

like image 139
ZakiMa Avatar answered Feb 05 '26 13:02

ZakiMa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!