azuretls1.2azure-log-analyticsazureportalazure-webapps

How to see TLS version with incoming API request in Azure portal?


In the Microsoft Azure portal, is there a way to see request URLs along with the TLS version negotiated?

Background

I have a web app that includes an API that used by several third parties. I would like to set the minimum TLS version to TLS 1.2 in my web app settings.

Before I update the minimum TLS version, I want to see what requests are being made using old TLS versions.

I know with my storage account I also have, I can include logs in the log analytics to detect TLS versions, so I was hoping there was something similar I could use for my web app.

So far, all I can find for my web app is the Minimum TLS Version Checker under Diagnose & Solve Problems. This isn't very helpful since it only gives me the number of requests with no further detail. Surely the detail has to be available somewhere? I am not an expert in the Azure portal, so I am hoping there is an easy way to find the request URL + TLS version. enter image description here


Solution

  • We can check TLS version with the incoming requests either in Application Insights or by using Diagnostic Setting.

    Using Application Insights:

    enter image description here

    enter image description here

    enter image description here

    I know with my storage account I also have, I can include logs in the log analytics to detect TLS versions

    Another option is from Diagnostic Setting.

    enter image description here

    enter image description here

    Update:

    The TLS Version which is set in the Configuration section can be seen in KUDU Console => Environment => HTTP headers and Server variables

    enter image description here

    enter image description here

    string ?tlsVersion= HttpContext.Request.Headers["X-Forwarded-TlsVersion"];
    _logger.LogInformation($"TLS : {tlsVersion}" );