Disabling certificate-based authentication can reduce an organization's ability to react against attacks on its critical functions and data if any.
Azure offers various authentication options to access resources: Anonymous connections, Basic authentication, password-based authentication, and certificate-based authentication.
Choosing certificate-based authentication helps bring client/host trust by allowing the host to verify the client and vice versa.
In case of a security incident, certificates help bring investigators traceability and allow security operations teams to react faster (by massively revoking certificates, for example).
== Ask Yourself Whether
* This Azure resource is essential for the information system infrastructure.
* This Azure resource is essential for mission-critical functions.
* Compliance policies require access to this resource to be authenticated with certificates.
There is a risk if you answered yes to any of those questions.
== Recommended Secure Coding Practices
Enable certificate-based authentication.
== Sensitive Code Example
For https://azure.microsoft.com/en-us/services/app-service/[App Service]:
----
resource "azurerm_app_service" "example" {
client_cert_enabled = false # Sensitive
}
----
For https://azure.microsoft.com/en-us/services/logic-apps/[Logic App Standards] and https://azure.microsoft.com/en-us/services/functions/[Function Apps]:
----
resource "azurerm_function_app" "example" {
client_cert_mode = "Optional" # Sensitive
}
----
For https://azure.microsoft.com/en-us/services/data-factory/[Data Factory Linked Services]:
For https://azure.microsoft.com/en-us/services/logic-apps/[Logic App Standards] and https://azure.microsoft.com/en-us/services/functions/[Function Apps]: