Should we store ClientID (ApplicationID) as Secret name in azure key vault?

Subhash Kumar Mahato 265 Reputation points
2024-10-22T06:02:44.64+00:00

Hi,

We want to store the app registration secret value in Azure Key Vault and I’m looking for best practices regarding this. In addition, I have the following question:

Should we store the app registration client ID as the secret name in Azure Key Vault?

Additionally, we can use the client ID (Application ID) as the secret name, so is that advisable? What are the recommended practices for naming conventions and structuring secrets in Azure Key Vault?

Thank you for your assistance

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,455 questions
0 comments No comments
{count} votes

Accepted answer
  1. Deepanshu katara 17,025 Reputation points MVP Moderator
    2024-10-22T06:13:56.2666667+00:00

    Hello Subash , Welcome to MS Q&A

    Answer to 1st question -->Storing the app registration client ID as the secret name in Azure Key Vault is not recommended. Instead, you should use Azure Key Vault to store sensitive information such as client application secrets, connection strings, and passwords. The client ID itself is not a secret and is typically used to identify the application rather than to secure it.

    For best practices, it's advisable to store secrets in a secure manner and avoid exposing sensitive information unnecessarily.

    Answer to 2nd question -->Using the client ID (Application ID) as the secret name in Azure Key Vault is not advisable. It's important to avoid using easily identifiable information as secret names, as this can expose sensitive data and increase the risk of unauthorized access. Instead, consider using more generic or non-identifiable names for secrets to enhance security.

    Answer to 3rd question-->

    Storing app registration secret values in Azure Key Vault involves several best practices:

    Use Key Vault for Secrets: Store all sensitive information like app registration secrets in Azure Key Vault instead of hardcoding them in your application. This enhances security by centralizing secret management.

    Naming Conventions: Adopt a consistent naming convention for your secrets. This can include the application name, environment (e.g., dev, test, prod), and the type of secret. For example, MyApp_Prod_AppSecret helps in identifying the secret's purpose and context easily.

    1. Structuring Secrets: For complex secrets, such as those containing multiple values (e.g., username and password), consider storing them as a JSON object or a connection string. This allows for easier management and retrieval.

    Tags for Management: Use tags to store additional metadata about your secrets, such as rotation schedules or the purpose of the secret, to facilitate management.

    By following these practices, you can effectively secure and manage your app registration secrets in Azure Key Vault.

    please go through this for detailed steps https://stackoverflow.com/questions/47245232/storing-azure-vault-client-id-and-client-secret

    References:

    Please let us know if you have further question

    kindly accept answer if it helps

    Thanks

    Deepanshu


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.