Harden transport config: hostname verification, empty secrets, userinfo in the URL #15

Closed
opened 2026-10-06 12:23:22 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-10-06 12:23:22 +00:00 (Migrated from github.com)

Three gaps in OpenSearchTransportFactory and QuickSearchQBitConfig:

  • tls.hostnameVerification=false disables hostname checks with no warning and no validation gate, unlike insecureSkipVerify. Log a warning at least.
  • An ${env.X} value set to an empty string passes the null check, so BASIC sends an empty password. A missing variable behind a CA, trust store or key store path surfaces as "Failed to create OpenSearch transport: null". Treat empty as missing and name the field.
  • opensearchUrl accepts userinfo such as https://u:p@host. The getter is not @JsonIgnore, so those credentials would be serialized into metadata while the transport ignores them. Reject userinfo in validation.

Found in the PR #10 security review.

Part of #12.

Three gaps in `OpenSearchTransportFactory` and `QuickSearchQBitConfig`: - `tls.hostnameVerification=false` disables hostname checks with no warning and no validation gate, unlike `insecureSkipVerify`. Log a warning at least. - An `${env.X}` value set to an empty string passes the null check, so BASIC sends an empty password. A missing variable behind a CA, trust store or key store path surfaces as "Failed to create OpenSearch transport: null". Treat empty as missing and name the field. - `opensearchUrl` accepts userinfo such as `https://u:p@host`. The getter is not `@JsonIgnore`, so those credentials would be serialized into metadata while the transport ignores them. Reject userinfo in validation. Found in the PR #10 security review. Part of #12.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QRun-IO/qbit-quick-search#15