Home > Back-end >  How should I secure my Application Insights connection URL?
How should I secure my Application Insights connection URL?

Time:09-02

I'm following the guide here to setup Application Insight telemetry on a frontend web form. I wish to use the snippet-based setup. I notice, however, that it requires me to embed the connection url in the html page. Is that a security issue?

There would be nothing to stop a malicious user from using browser dev tools to grab that url and then send any API calls to that url. Should I be concerned about this? If so, what is the recommended approach for securing this connection url.

CodePudding user response:

... what is the recommended approach for securing this connection url.

There is none. For now you have to accept it is visible somehow. See also this open issue regarding the topic

Should I be concerned about this?

Not so much. The instrumentation key cannot be used to read any telemetry. However, it could be used to send bogus telemetry to your application insigths resource. This could lead to higher costs depending on the amount of data ingested and it could clutter your logs, possible masking possibly relevant telemetry.

CodePudding user response:

Unless the application is hosted on a vnet integrated resource you cannot restrict access to application insights resource. If it is, then you can set application insights to deny queries or ingestion from external sources in the network isolation setting. https://docs.microsoft.com/en-us/azure/azure-monitor/logs/private-link-security

So even if someone gets the url they cannot access.

  • Related