Claus Ibsen created CAMEL-27664:
-----------------------------------

             Summary: camel-weather - the CamelWeatherQuery header and the 
debug log contain the appid
                 Key: CAMEL-27664
                 URL: https://issues.apache.org/jira/browse/CAMEL-27664
             Project: Camel
          Issue Type: Bug
          Components: camel-weather
            Reporter: Claus Ibsen
             Fix For: 4.24.0


The {{appid}} option (the OpenWeatherMap API key) is a secret option, but it 
shows up in plain text in three places:

* {{WeatherQuery.getQuery()}} appends {{&APPID=<appid>}} to the request URL, 
and both {{WeatherConsumer}} and {{WeatherProducer}} put that URL in the 
{{CamelWeatherQuery}} header. The header then travels with the message to the 
next endpoints, and into tracers, the message history and logs.
* The consumer and the producer log the URL at DEBUG ("Going to execute the 
Weather query ..."), and the consumer logs it at WARN when the HTTP status is 
not 200.
* The producer puts the URL in the message of the exception it throws for a bad 
HTTP status or an empty response.

Proposed change: keep sending the real appid in the HTTP request, but mask it 
({{APPID=xxxxxx}}, as Camel masks secret options in endpoint URIs) in the 
{{CamelWeatherQuery}} header, the log messages and the exception messages.

_Claude Code on behalf of Claus Ibsen_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to