Surface SSL/TLS certificate errors clearly when SSL inspection proxies intercept connections#4857
Draft
Surface SSL/TLS certificate errors clearly when SSL inspection proxies intercept connections#4857
Conversation
…ction environments Agent-Logs-Url: https://github.com/Azure/azure-functions-core-tools/sessions/4f728d35-f54c-4f7f-b256-8633a5ad0e98 Co-authored-by: liliankasem <2198905+liliankasem@users.noreply.github.com>
…cated call sites Agent-Logs-Url: https://github.com/Azure/azure-functions-core-tools/sessions/4f728d35-f54c-4f7f-b256-8633a5ad0e98 Co-authored-by: liliankasem <2198905+liliankasem@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix incorrect logging of SSL certificate-related issues
Surface SSL/TLS certificate errors clearly when SSL inspection proxies intercept connections
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running behind SSL inspection proxies (Zscaler, Cisco Umbrella, etc.), connections fail silently with generic gRPC timeouts or networking errors, giving no indication that certificate validation is the root cause. Users waste time debugging what is ultimately a trust-store issue.
Changes
SSL detection helpers (
ColoredConsoleLogger)ContainsSslKeywords(string)— matches known SSL failure phrases:CERTIFICATE_VERIFY_FAILED,certificate signed by unknown authority,The remote certificate is invalid,The SSL connection could not be established,SSL handshake failed,certificate verify failedIsSslCertificateException(Exception)— walks the full exception chain forAuthenticationExceptionor any exception whose message matches the above keywordsLogToConsoleWithSslHint(...)— unified helper called fromLog()that emits the original message then, if SSL is detected, appends twoWarning-level lines:SslCertificateErrorDetected— what happenedSslCertificateHint— how to fix it (add proxy root cert to system trust store)PublishFunctionAppAction—HttpRequestExceptioncatch now checksIsSslCertificateExceptionfirst; SSL-caused failures get the targeted message instead of the generic networking error.ExtensionBundleHelper.GetExtensionBundle— newcatchblock for SSL exceptions fires before the generic network-failure handler; logs error + hint and falls back to cached bundle.Constants.Errors— two new constants:SslCertificateErrorDetectedandSslCertificateHint.Tests
ColoredConsoleLoggerTestsextended with:ContainsSslKeywords_Tests(11 inline cases, positive + negative)IsSslCertificateException_*(5 fact tests: directAuthenticationException, nested, keyword-in-message, unrelated, null)Pull request checklist
release_notes.mdAdditional information
SSL errors originating in worker processes (Python, Node) appear as gRPC timeouts in the host — the host never sees an
AuthenticationException. The detection inColoredConsoleLoggercovers the .NET-side surface (HTTP calls made by Core Tools itself, extension bundle downloads, publish). Worker-side SSL failures surfaced via log message text (e.g.CERTIFICATE_VERIFY_FAILEDfrom Python'ssslmodule) are also caught viaContainsSslKeywords.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
azfunc.pkgs.visualstudio.com/usr/bin/dotnet dotnet build src/Cli/func/Azure.Functions.Cli.csproj /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/Core/BaseUserSecretsTests.cs /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/Core/BaseOfflineBundleTests.cs /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/Core/BaseLogLevelTests.cs /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/Core/BaseMissingConfigTests.cs /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/ConsoleEncodingTests.cs /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/AuthTests.cs /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Fun�� /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/UserSecretsTests.cs /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/InProcTests/LogLevelTests.cs -l cert\|Cert re-functions-corhelp,version,id,description,release,codename,all,short(dns block)/usr/bin/dotnet dotnet build src/Cli/func/Azure.Functions.Cli.csproj /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/test/Cli/Func.E2ETests/Commands/FuncStart/InProcTests/LogLevelTests.cs -l cert\|Cert re-functions-core-tools/src/Cli/func/Helpers/PlatformHelper.cs rep cert\|Cert ActionHelper.cs de/node/bin/grep grep -l cert\|Cert re-functions-core-tools/src/Cli/func/Helpers/SetupProgressLogger.cs nfig/composer/vendor/bin/grep cert\|Cert xception.cs rep grep(dns block)/usr/bin/dotnet dotnet build test/Cli/Func.UnitTests/Azure.Functions.Cli.UnitTests.csproj conntrack --ctstate INVALID,NEW -j DROP cert\|Cert s tnet/tools/grep grep -l cert\|Cert re-functions-cor-d /home/REDACTED/wor168.63.129.16 cert\|Cert sions.cs ep grep(dns block)st8vsblobprodcus339.vsblob.vsassets.io/usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/azure-functions-core-tools/azure-functions-core-tools/Azure.Functions.Cli.sln --packages /tmp/codeql-scratch-50c7d6e9ded3e5a4/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-50c7d6e9ded3e5a4/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-50c7d6e9ded3e5a4/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true -l cert\|Cert s-core-tools/azure-functions-cor/home/REDACTED/work/azure-functions-core-tools/azure-functions-corshow /home/REDACTED/work/_temp/ghcca-no/home/REDACTED/work/azure-functions-core-tools/azure-functions-cor9ee53cf3cd394c97d2740e1343fff59bf1b26d0a:test/Cli/Func.UnitTests/ConsoleTests/ColoredConsoleLoggerTests.cs cert\|Cert .cs ep grep(dns block)If you need me to access, download, or install something from one of these locations, you can either: