This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 57470b6fe2ca Upgrade guide notes for 4.22.3 and 4.18.6 - hardening
backports (mongodb, snmp, smpp, nats, pulsar, Authorization header, Google
access token) (#30417)
57470b6fe2ca is described below
commit 57470b6fe2caa027e3bc72f1c4fbca81952e52cc
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 19 14:51:23 2026 +0100
Upgrade guide notes for 4.22.3 and 4.18.6 - hardening backports (mongodb,
snmp, smpp, nats, pulsar, Authorization header, Google access token) (#30417)
The upgrade notes of the LTS backports of CAMEL-27218 (mongodb TLS options),
CAMEL-27224 (snmp traps), CAMEL-27227 (smpp login headers), CAMEL-27206
(nats
host name verification, 4.22.x only), CAMEL-27207 (pulsar host name
verification), CAMEL-27222 (Authorization header) and CAMEL-27226 with
CAMEL-27220 (Google access token only in the Authorization header), in
camel-4x-upgrade-guide-4_22.adoc (4.22.2 to 4.22.3) and
camel-4x-upgrade-guide-4_18.adoc (4.18.5 to 4.18.6).
Docs only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../ROOT/pages/camel-4x-upgrade-guide-4_18.adoc | 70 ++++++++++++++++
.../ROOT/pages/camel-4x-upgrade-guide-4_22.adoc | 93 ++++++++++++++++++++++
2 files changed, 163 insertions(+)
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
index f718f387ec3b..18b497fb56fb 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
@@ -1070,6 +1070,76 @@ then reads and writes the entries in the same format as
the older versions, and
the WARN at startup do not apply. Once the old aggregations have completed and
been recovered, remove the `codec` option
to switch to the Java serialization read through the filter.
+=== camel-mongodb - the tls and tlsAllowInvalidHostnames options are applied
+
+When `hosts` is set, the `tls` and `tlsAllowInvalidHostnames` options are now
applied to the client that the endpoint
+creates; before, they had no effect. A route with `tls=true` now connects with
TLS, so the server must accept TLS and
+its certificate must be trusted by the JVM. The TLS settings inside
`connectionUriString` are kept when these options
+are not set.
+
+=== camel-snmp - the trap consumer receives only the traps of its snmpVersion
+
+The trap consumer (`type=TRAP`) now receives only the traps of the
`snmpVersion` of its endpoint. With `snmpVersion=0`
+(the default) or `snmpVersion=1`, it receives SNMPv1 and SNMPv2c traps, and
drops SNMPv3 traps. With `snmpVersion=3`,
+it drops SNMPv1 and SNMPv2c traps, and receives the SNMPv3 traps of the user
set in `securityName`, checked with the
+`authenticationProtocol`, `authenticationPassphrase`, `privacyProtocol` and
`privacyPassphrase` of the endpoint, and
+with at least its `securityLevel` (the default is 3, authentication and
privacy). The user is held by the consumer
+only, and is no longer taken from another `snmp` endpoint with SNMPv3 in the
JVM.
+
+Before, the consumer received the traps of every version, and received SNMPv3
traps only when another `snmp` endpoint
+with SNMPv3, such as a trap producer, had been started in the same JVM. To
receive traps of several versions, use a
+consumer per version, each on its own port.
+
+=== camel-smpp - the system id and password headers need the
allowSystemIdAndPasswordFromHeaders option
+
+A producer with `lazySessionCreation=true` took the system id and the
password, with which it connects to the SMSC,
+from the `CamelSmppSystemId` and `CamelSmppPassword` headers of the first
message when both were set, over the
+`systemId` and `password` options of the endpoint. It now connects with the
`systemId` and `password` of the endpoint,
+and ignores these headers, unless the endpoint sets the new
`allowSystemIdAndPasswordFromHeaders=true` option (disabled
+by default), or the component sets
`camel.component.smpp.allowSystemIdAndPasswordFromHeaders=true`. A route that
+relies on these headers must set this option.
+
+=== camel-pulsar - the host name of the broker is verified with pulsar+ssl
+
+When the endpoint creates its own Pulsar client, a `pulsar+ssl://` connection
now checks that the certificate of the
+broker matches the host it connects to, with the same rules as an HTTPS
client. Before, the client kept the default of
+the Pulsar client, which accepts any certificate trusted by the trust store,
whatever host the certificate was issued
+for.
+
+A connection to a host name or an IP address that the certificate does not
list now fails the TLS handshake; this also
+applies to the brokers that a lookup returns (their advertised listeners). Use
certificates that match the hosts, or set
+the new `hostnameVerification` option to `false` to keep the previous
behaviour. A `pulsarClient` that is given to the
+component or the endpoint is used as it is.
+
+The new `tlsTrustCertsFilePath` option sets a PEM file with the certificates
of the certificate authorities to trust,
+for a broker whose certificate is not signed by an authority that the JVM
trusts.
+
+=== camel-platform-http-main, camel-netty-http, camel-undertow - the
Authorization header is removed after the login is checked
+
+When Camel checks the credential of an incoming request, the `Authorization`
header of the request is now removed from
+the message before the route gets it. This applies to:
+
+* camel-platform-http-main: the requests under
`camel.server.authenticationPath` when
+ `camel.server.authenticationEnabled=true`, with basic
(`basicPropertiesFile`) or JWT authentication.
+* camel-netty-http: the requests that are checked with basic authentication
(`securityConfiguration`).
+* camel-undertow: the requests that a security provider
(`UndertowSecurityProvider`) has authenticated.
+
+Before, the header was passed on to the route, and from there to the steps
that use the message headers, such as a log
+of the headers or a producer that sends them on. A request that Camel does not
check, for example to a path outside
+`authenticationPath` or to a resource that the netty-http security constraint
does not restrict, keeps the header as
+sent. A route that has to call a backend with credentials sets them on that
producer.
+
+=== camel-google-sheets, camel-google-drive, camel-google-mail,
camel-google-calendar - the OAuth access token is sent only in the
Authorization header
+
+The credential options (`clientId`, `clientSecret`, `accessToken`,
`refreshToken`, `serviceAccountKey`, `delegate`,
+and `p12FileName` for calendar) are no longer set on the request of the Google
API, whether they are given as endpoint
+options or as `CamelGoogleSheets.*`, `CamelGoogleDrive.*`, `CamelGoogleMail.*`
or `CamelGoogleCalendar.*` headers (in
+any case). Before, an `accessToken` option or header could also be added to
the request URL as the `access_token`
+query parameter. The access token is now sent only in the `Authorization`
header, as the client already did.
+
+A route that used a `CamelGoogleXxx.accessToken` header to change the token
for one request no longer gets that;
+configure the token on the endpoint or the component instead.
+
== Upgrading from 4.18.4 to 4.18.5
=== camel-azure-eventhubs
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
index bd034ebba88b..3b5c2910f274 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
@@ -1026,6 +1026,99 @@ then reads and writes the entries in the same format as
the older versions, and
the WARN at startup do not apply. Once the old aggregations have completed and
been recovered, remove the `codec` option
to switch to the Java serialization read through the filter.
+=== camel-mongodb - the tls and tlsAllowInvalidHostnames options are applied
+
+When `hosts` is set, the `tls` and `tlsAllowInvalidHostnames` options are now
applied to the client that the endpoint
+creates, also when `sslContextParameters` is not set. Before, they were
ignored unless `sslContextParameters` was
+configured. A route with `tls=true` now connects with TLS, so the server must
accept TLS and its certificate must be
+trusted by the JVM (or set `sslContextParameters`). The TLS settings inside
`connectionUriString` are kept when these
+options are not set.
+
+=== camel-snmp - the trap consumer receives only the traps of its snmpVersion
+
+The trap consumer (`type=TRAP`) now receives only the traps of the
`snmpVersion` of its endpoint. With `snmpVersion=0`
+(the default) or `snmpVersion=1`, it receives SNMPv1 and SNMPv2c traps, and
drops SNMPv3 traps. With `snmpVersion=3`,
+it drops SNMPv1 and SNMPv2c traps, and receives the SNMPv3 traps of the user
set in `securityName`, checked with the
+`authenticationProtocol`, `authenticationPassphrase`, `privacyProtocol` and
`privacyPassphrase` of the endpoint, and
+with at least its `securityLevel` (the default is 3, authentication and
privacy). The user is held by the consumer
+only, and is no longer taken from another `snmp` endpoint with SNMPv3 in the
JVM.
+
+Before, the consumer received the traps of every version, and received SNMPv3
traps only when another `snmp` endpoint
+with SNMPv3, such as a trap producer, had been started in the same JVM. To
receive traps of several versions, use a
+consumer per version, each on its own port.
+
+=== camel-smpp - the system id and password headers need the
allowSystemIdAndPasswordFromHeaders option
+
+A producer with `lazySessionCreation=true` took the system id and the
password, with which it connects to the SMSC,
+from the `CamelSmppSystemId` and `CamelSmppPassword` headers of the first
message when both were set, over the
+`systemId` and `password` options of the endpoint. It now connects with the
`systemId` and `password` of the endpoint,
+and ignores these headers, unless the endpoint sets the new
`allowSystemIdAndPasswordFromHeaders=true` option (disabled
+by default), or the component sets
`camel.component.smpp.allowSystemIdAndPasswordFromHeaders=true`. A route that
+relies on these headers must set this option.
+
+=== camel-nats - the host name of the server is verified over TLS
+
+When the connection uses TLS (`secure=true`, or a `tls://` server address),
camel-nats now checks that the certificate
+of the NATS server matches the host it connects to, with the same rules as an
HTTPS client. Before, any certificate
+trusted by the trust store was accepted, whatever host the certificate was
issued for. To keep the host name for TLS,
+the client connects to the fastest of the IP addresses of a host name (the
happy eyeballs mode of jnats), instead of
+replacing the host name by its IP addresses first.
+
+A connection to a host name or an IP address that the certificate does not
list now fails the TLS handshake; an IP
+address must be listed as a subject alternative name of the certificate. This
also applies to the servers that the
+NATS cluster announces, which are often IP addresses.
+
+WARNING: The servers announced by the cluster are used only when the client
reconnects, so a certificate without the
+IP addresses that the cluster announces still connects at startup, and fails
only when the client fails over to
+another server. Before upgrading, check that the certificate of each server
lists the host names or IP addresses that
+the cluster announces (the `connect_urls` in the `INFO` of the servers, set
with their `client_advertise` option).
+
+Use certificates that match the hosts, or set the new `hostnameVerification`
option to `false` to keep the previous
+behaviour. An `opentls://` server address still trusts
+any certificate and is not checked.
+
+=== camel-pulsar - the host name of the broker is verified with pulsar+ssl
+
+When the endpoint creates its own Pulsar client, a `pulsar+ssl://` connection
now checks that the certificate of the
+broker matches the host it connects to, with the same rules as an HTTPS
client. Before, the client kept the default of
+the Pulsar client, which accepts any certificate trusted by the trust store,
whatever host the certificate was issued
+for.
+
+A connection to a host name or an IP address that the certificate does not
list now fails the TLS handshake; this also
+applies to the brokers that a lookup returns (their advertised listeners). Use
certificates that match the hosts, or set
+the new `hostnameVerification` option to `false` to keep the previous
behaviour. A `pulsarClient` that is given to the
+component or the endpoint is used as it is.
+
+The new `tlsTrustCertsFilePath` option sets a PEM file with the certificates
of the certificate authorities to trust,
+for a broker whose certificate is not signed by an authority that the JVM
trusts.
+
+=== camel-platform-http-main, camel-netty-http, camel-undertow - the
Authorization header is removed after the login is checked
+
+When Camel checks the credential of an incoming request, the `Authorization`
header of the request is now removed from
+the message before the route gets it, as the OAuth bearer token validation of
these components already does since
+Camel 4.21. This applies to:
+
+* camel-platform-http-main: the requests under
`camel.server.authenticationPath` when
+ `camel.server.authenticationEnabled=true`, with basic
(`basicPropertiesFile`) or JWT authentication.
+* camel-netty-http: the requests that are checked with basic authentication
(`securityConfiguration`).
+* camel-undertow: the requests that a security provider
(`UndertowSecurityProvider`) has authenticated.
+
+Before, the header was passed on to the route, and from there to the steps
that use the message headers, such as a
+log of the headers or a producer that sends them on. A request that Camel does
not check, for example to a path outside
+`authenticationPath` or to a resource that the netty-http security constraint
does not restrict, keeps the header as
+sent. A route that has to call a backend with credentials sets them on that
producer.
+
+=== camel-google-sheets, camel-google-drive, camel-google-mail,
camel-google-calendar - the OAuth access token is sent only in the
Authorization header
+
+The credential options (`clientId`, `clientSecret`, `accessToken`,
`refreshToken`, `serviceAccountKey`, `delegate`,
+and `p12FileName` for calendar) are no longer set on the request of the Google
API, whether they are given as endpoint
+options or as `CamelGoogleSheets.*`, `CamelGoogleDrive.*`, `CamelGoogleMail.*`
or `CamelGoogleCalendar.*` headers (in
+any case). Before, an `accessToken` option or header could also be added to
the request URL as the `access_token`
+query parameter. The access token is now sent only in the `Authorization`
header, as the client already did.
+
+A route that used a `CamelGoogleXxx.accessToken` header to change the token
for one request no longer gets that;
+configure the token on the endpoint or the component instead.
+
== Upgrading from 4.22.1 to 4.22.2
=== camel-lra - only an LRA hosted by the configured coordinator is joined