Mask Azure App Insight Connection String

Terru Ahmad 40 Reputation points Microsoft Employee
2024-11-06T16:40:22.04+00:00

Hello,

I have a customer who is looking for a way to mask the App Insight connection string. Is there a way to do that?

Thanks.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,363 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pavan Minukuri 765 Reputation points Microsoft Vendor
    2024-11-07T00:24:21.2566667+00:00

    Hi @Terru Ahmad ,
    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    There are ways to mask the Application Insights connection string in your application. Here are some options:

    Use Azure Key Vault: You can store the Application Insights connection string in Azure Key Vault and retrieve it at runtime in your application. This way, the connection string is not exposed in your application code or configuration files. You can use Azure Managed Identity to authenticate your application to Azure Key Vault.

    Use Azure App Configuration: You can store the Application Insights connection string in Azure App Configuration and retrieve it at runtime in your application. This way, the connection string is not exposed in your application code or configuration files. You can use Azure Managed Identity to authenticate your application to Azure App Configuration.

    Use environment variables: You can store the Application Insights connection string as an environment variable on the machine where your application is running. Your application can retrieve the connection string from the environment variable at runtime. This way, the connection string is not exposed in your application code or configuration files.

    Use Azure Functions: You can create an Azure Function that retrieves the Application Insights connection string from a secure location such as Azure Key Vault or Azure App Configuration and returns it to your application. Your application can call the Azure Function to retrieve the connection string at runtime. This way, the connection string is not exposed in your application code or configuration files.

    These are some of the options to mask the Application Insights connection string in your application. You can choose the option that best suits your requirements and security needs.

    If you have any further queries, do let us know. If the Answer is helpful, please click "Accept Answer".


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.