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

Viewed 311

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.

2 Answers

You can easily use a custom API as your proxy. Your browser/client would be able to send data to that API where you can filter those. Obviously, that API would be able to send the proper telemetries to your Azure Application Insight.

Besides that, you can enrich the properties with some sort of signature to determine if your data is coming from your clients or not.

Related