Ensure secrets have content type set for Azure Key Vault Secret

MEDIUM

Description

Without content type tag, it would be difficult to figure out type of secret in Azure Key Vault Secret.

Remediation

In Azure Console -

  1. Open the Azure Portal and go to Key Vaults.
  2. Choose the Key vault you wish to edit.
  3. Under Objects, select Secrets.
  4. Select the secret you wish to update.
  5. Add a value for Content type and select Save.

In Terraform -

  1. In the azurerm_key_vault_secret resource, set the content_type field as needed.

References:
https://learn.microsoft.com/en-us/azure/key-vault/general/overview
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret#content_type

Policy Details

Rule Reference ID: AC_AZURE_0162
CSP: Azure
Remediation Available: Yes
Resource Category: Management
Resource Type: Key Vault

Frameworks