davsclaus opened a new pull request, #31024: URL: https://github.com/apache/camel/pull/31024
JIRA: https://issues.apache.org/jira/browse/CAMEL-27665 ## What was wrong `GeoCoderEndpoint.configureProxyAuth()` accepted `proxyAuthMethod` `Basic` and `Digest`, and for both called `GeoApiContext.Builder.proxyAuthentication(user, password)`. In google-maps-services 2.2.0, `OkHttpRequestHandler.Builder.proxyAuthentication()` installs an OkHttp proxy authenticator that always answers with `Credentials.basic(user, password)` in the `Proxy-Authorization` header (checked with `javap` on the jar). The library has no Digest support. So with `proxyAuthMethod=Digest` the producer still sent Basic proxy credentials, the password Base64 encoded in clear text, while the option description and the docs said Basic or Digest. ## What changed - `proxyAuthMethod` accepts only `Basic` (case-insensitive, as before). Any other value, `Digest` included, fails when the producer starts with an `IllegalArgumentException`: `Unsupported proxyAuthMethod Digest: only Basic proxy authentication is supported`. - The option has `enums = "Basic"`, and its description (and the ones of `proxyAuthDomain` / `proxyAuthHost`) say that only Basic is supported. - `AuthenticationMethod.Digest` is deprecated. - Implementing Digest was not chosen: the library only lets you plug in a whole OkHttp authenticator, so it would mean writing the Digest challenge handling in the component. ## Tests `GeoCoderProxyAuthMethodTest` (5 cases): `Digest`, `digest` and `NTLM` fail at startup with the message above, and `Basic` / `basic` start. The proxy is never contacted. Before the fix, the 3 rejection cases fail (`Digest` and `digest` started without error) and the 2 Basic cases pass. The whole module passes. ## Docs - New section "Using a proxy" in `geocoder-component.adoc` (and the catalog copy). - Upgrade guide 4.24: `camel-geocoder - proxyAuthMethod accepts only Basic`, as a route with `Digest` that started before now fails at startup. - Regenerated the component JSON, the catalog JSON and the endpoint DSL. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
