davsclaus opened a new pull request, #3173:
URL: https://github.com/apache/camel-kamelets/pull/3173

   Part of #3170: `solr-sink` and `solr-source` can connect to Solr over HTTPS. 
`solr-source` can also return more than 10 documents per query.
   
   ### New options
   
   | Option | Kamelets | What it does |
   |---|---|---|
   | `enableSSL` | both | If true, connects with HTTPS. Default `false`, which 
keeps today's plain HTTP. |
   | `certificate` | both | Optional. The certificate of Solr, or of its CA, as 
base64 on one line (PEM or DER). Use it for a self-signed certificate, or one 
that Java does not trust. When it is not set, the certificates Java trusts are 
used. There is no option to trust any certificate. |
   | `size` | `solr-source` | The most documents each query returns (Solr's 
`rows`). When it is not set, Solr returns its default of 10. |
   
   The "Good to know" paragraphs and the `solr-source` partial page describe 
the new options.
   
   `certificate` maps to camel-solr's `certificatePath` as `RAW(base64:...)`, 
the same way the Elasticsearch and OpenSearch Kamelets pass a certificate. One 
difference: here the value is wrapped in `RAW(...)`. A base64-encoded DER 
certificate contains `+` and `/`, and without `RAW` the `+` became a space and 
the Kamelet failed to start.
   
   ### Verification
   
   Tested with Camel JBang against Solr 9.10.1 in Docker, one instance with 
HTTPS (self-signed certificate) and one with plain HTTP:
   
   | Case | Result |
   |---|---|
   | HTTPS with `certificate` (PEM, and then DER) | The sink indexed 2 
documents and the source found them |
   | HTTPS without `certificate` | `PKIX path building failed`, as expected. 
With a JVM trust store (`-Djavax.net.ssl.trustStore`) instead, it works |
   | Plain HTTP with the new options unset | Works as before. The endpoint URI 
drops `certificatePath` and `size` |
   | `size` of 1, 50, and unset | 1, 20 (all of them) and 10 documents |
   | The Kamelets from `main` against HTTPS | Hang, with no answer and no error 
|
   
   `./mvnw clean install` passed twice, the first time with `-DskipTests`.
   
   ### Not changed here
   
   - With `certificate` set, camel-solr builds its trust context with 
`TLSv1.3`, so a Solr limited to TLS 1.2 would probably fail. This was not 
tested, and it belongs to `apache/camel`.
   - `solr-source` sets `CamelSolrOperation=QUERY`. Camel 4.24 logs on every 
poll that this will be deprecated and that `SEARCH` should be used instead. 
That is a separate change.
   
   _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]

Reply via email to