davsclaus commented on code in PR #31051:
URL: https://github.com/apache/camel/pull/31051#discussion_r4723470089
##########
components/camel-pg-replication-slot/src/main/docs/pg-replication-slot-component.adoc:
##########
@@ -58,6 +58,22 @@ instead of `INSERT`, etc). This will make sure repeated
messages won't affect yo
The log sequence number (LSN) of a message is in the
`CamelPgReplicationSlotLsn` header. It is not unique: several
messages can have the same LSN, for example the `BEGIN` and the first change
of a transaction with `test_decoding`.
+=== TLS
+
+The `sslMode` option sets how the connection uses TLS. When it is not set, the
default of the PostgreSQL JDBC driver
+applies, which is `prefer`: TLS when the server offers it, without checking
the server certificate, and a plain
+connection otherwise. To require TLS and check the server, use `verify-full`
(certificate and host name) or
+`verify-ca` (certificate only), with the root certificates of the server in
`sslRootCert`:
+
+[source,text]
+----
+pg-replication-slot:db.example.com:5432/mydb/myslot:test_decoding?user=replicator&password=RAW(secret)&sslMode=verify-full&sslRootCert=/etc/certs/root.crt
+----
+
+For a server that checks client certificates, set `sslCert` and `sslKey` (and
`sslPassword` when the key has a
+password). The PostgreSQL JDBC driver expects the key in PKCS-8 DER format, or
a PKCS-12 file (`.p12` or `.pfx`) that
+holds the certificate and the key.
Review Comment:
Right, pgjdbc 42.7.14 detects a PEM key by the `.pem` extension or by the
`-----BEGIN PRIVATE KEY-----` header (`Pk8OrPemKeyManager`). Fixed in
e6f4069033cf, with both ways of detecting it.
_Claude Code on behalf of davsclaus_
##########
components/camel-pg-replication-slot/src/main/java/org/apache/camel/component/pg/replication/slot/PgReplicationSlotEndpoint.java:
##########
@@ -105,6 +109,31 @@ public class PgReplicationSlotEndpoint extends
ScheduledPollEndpoint {
+ " while the route is stopped.",
label = "advanced", defaultValue = "true")
private Boolean autoCreateSlot = true;
+ @UriParam(description = "The SSL mode of the connection to the PostgreSQL
server: disable, allow, prefer, require,"
+ + " verify-ca or verify-full. When not set, the
default of the PostgreSQL JDBC driver applies,"
+ + " which is prefer: TLS when the server offers
it, without checking the server certificate, and"
+ + " a plain connection otherwise. Use verify-full
to require TLS and check both the certificate"
+ + " and the host name of the server.",
+ label = "security", enums =
"disable,allow,prefer,require,verify-ca,verify-full")
+ private String sslMode;
+ @UriParam(description = "The file of the root certificates (PEM) that the
server certificate is checked against with"
+ + " sslMode verify-ca or verify-full. When not
set, the PostgreSQL JDBC driver reads"
+ + " root.crt in the .postgresql folder of the home
directory of the user.",
+ label = "security")
+ private String sslRootCert;
+ @UriParam(description = "The file of the client certificate (PEM) for a
server that checks client certificates. When"
+ + " not set, the PostgreSQL JDBC driver reads
postgresql.crt in the .postgresql folder of the home"
+ + " directory of the user, if it exists.",
+ label = "security")
+ private String sslCert;
+ @UriParam(description = "The file of the private key of the client
certificate: PKCS-8 in DER format, or a PKCS-12 file"
+ + " (.p12 or .pfx) that holds the certificate and
the key, as the PostgreSQL JDBC driver expects."
+ + " When not set, the driver reads postgresql.pk8
in the .postgresql folder of the home directory"
+ + " of the user, if it exists.",
+ label = "security")
Review Comment:
Fixed in e6f4069033cf, same wording as the doc page. The endpoint DSL and
the catalog copies are regenerated.
_Claude Code on behalf of davsclaus_
--
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]