[ 
https://issues.apache.org/jira/browse/CAMEL-27668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-27668:
-----------------------------------

    Assignee: Claus Ibsen

> camel-solr - certificatePath and sslContextParameters are ignored without 
> enableSSL, and certificatePath accepts http URLs
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27668
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27668
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-solr
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>              Labels: bug
>             Fix For: 4.24.0
>
>
> The client that camel-solr creates ({{SolrEndpoint.createSolrClient}}) builds 
> its base URL from the {{enableSSL}} option 
> ({{SolrConfiguration.getSolrBaseUrl}}): {{http}} when it is false, which is 
> the default. The {{certificatePath}} and {{sslContextParameters}} options 
> only set the SSL context of the {{HttpJdkSolrClient}}, so with 
> {{enableSSL=false}} they are ignored without any notice and the requests 
> (including the basic authentication credentials) are sent in clear text over 
> plain HTTP.
> The {{certificatePath}} option is resolved with {{ResourceHelper}}, and the 
> documentation lists the {{http:}} prefix as supported. The CA certificate 
> that the client trusts can then be loaded over plain HTTP.
> Proposed change:
> * When Camel creates the client and {{certificatePath}} or an 
> {{sslContextParameters}} of the endpoint or component is set while 
> {{enableSSL}} is false, the endpoint fails at startup with a clear message to 
> set {{enableSSL=true}}. The global SSL context parameters 
> ({{useGlobalSslContextParameters=true}}) only log a WARN in that case, as 
> they are shared with other components.
> * {{certificatePath}} refuses an {{http:}} URL with a clear message; 
> {{classpath:}}, {{file:}}, {{https:}} and the other resource prefixes stay 
> allowed.
> * Update the option descriptions, the component doc and the upgrade guide.
> _Claude Code on behalf of Claus Ibsen_



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

Reply via email to