我正在开发Angular应用程序,我想在我的Angular SPA中添加Azure应用程序见解。
我已经添加了所有必需的配置,并且一切正常。
Application Insights将在InstrumentationKey的帮助下记录所有必需的详细信息,例如PageView和自定义事件。
但是我有一个疑问,如果ApplicationInsights InstrumentationKey被盗,将会发生什么?
InstrumentationKey暴露给外部世界,任何人都可以看到。
所以我的问题是,如果有人拿到了这个 key 有什么问题吗?
如果InstrumentationKey被盗,复制是什么?我们如何避免复制?
我已经阅读了这篇文章-
https://blogs.msdn.microsoft.com/premier_developer/2017/12/14/alternative-way-to-protect-your-application-insights-instrumentation-key-in-javascript/
最佳答案
如blog中所述,
Alternatively, the most secure way would be to send data from the browser to your custom API on your server then forward to Application Insights resource with the correct instrumentation key (see diagram below).
您应该先验证自定义API中的数据是否有意义,然后再将其发送到Application Insights实例。
这是关于同一问题的其他两个线程:
Application Insights security and spoofing
https://github.com/MicrosoftDocs/azure-docs/issues/24287
关于azure-application-insights - 如果ApplicationInsights InstrumentationKey被盗,将会发生什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54535275/