[BUG] 407 Proxy Authentication Required should not trigger warning log #30148
Labels
Azure.Core
azure-core
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
HttpClient
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
When we attempt to connect to a container through a proxy which requires authentication, initially the library tries to connect without authentication and then if it's needed a
com.azure.core.util.AuthorizationChallengeHandler
will do the authentication. The problem is that even in a successful login flow, between the first failed request and the authentication challenge handlingreactor.netty.http.client.HttpClientConnect
logs a warning message that it failed to connect to a proxy. This is misleading in that situation because it is part of the normal flow and doesn't necessarily mean that the authentication is failed or will fail.This happens because in HttpProxy:handleResponse an exception is thrown, even if the challenge handling started by setting value to
proxyChallengeHolderReference
.Exception or Stack Trace
To Reproduce
https://github.com/nandorsoma/azure-blob-proxy-warning-example
Code Snippet
azure-sdk-for-java/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/HttpProxyHandler.java
Line 208 in 457609b
Expected behavior
WARNING log should not be logged for the first authentication challenge.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: