Skip to content

fix(namespace): build the mTLS REST client with rustls - #9582

Merged
BubbleCal merged 1 commit into
mainfrom
xuanwo/fix-rest-tls-identity-backend
Sep 26, 2026
Merged

BubbleCal merged 1 commit into
mainfrom
xuanwo/fix-rest-tls-identity-backend

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Sep 26, 2026

Copy link
Copy Markdown
Member

The REST namespace loads its client identity with reqwest::Identity::from_pem, which only produces a rustls identity. lance-namespace-impls enables only reqwest's rustls features, but when another crate in the same build enables reqwest's default-tls (native-tls), reqwest's ClientBuilder defaults to native-tls and rejects the identity when the client is built. In the workspace this happens through lance-examples (via hf-hub's default features), which is why the four rest::tls tests from #8456 fail in the Linux CI jobs on main. Downstream builds hit the same thing whenever any dependency pulls in reqwest's default features, and then mTLS stops working.

build_client now selects rustls explicitly, so the identity and CA certificate are always applied by the backend that parsed them.

test_malformed_ca_certificate_is_dropped_on_its_own no longer requires the malformed CA certificate to be rejected at build time. With native-tls compiled in, reqwest parses the certificate when it is read, so it is dropped at load time instead. The test still checks that the identity survives and that the dropped material is retried.

Checked with cargo test -p lance-namespace-impls -p lance-examples --features lance-namespace-impls/rest --lib rest on Linux (4 failures on main, all pass here) and on macOS, and with --features rest alone.

@github-actions github-actions Bot added A-namespace Namespace impls bug Something isn't working labels Sep 26, 2026
@Xuanwo
Xuanwo marked this pull request as ready for review September 26, 2026 08:37

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

The REST client now selects rustls, matching the PEM identity it loads and fixing client construction when other dependencies enable reqwest's native default. The focused TLS tests pass with both mixed and rustls-only feature sets.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 26, 2026
@BubbleCal
BubbleCal merged commit 8bd1a7f into main Sep 26, 2026
39 checks passed
@BubbleCal
BubbleCal deleted the xuanwo/fix-rest-tls-identity-backend branch September 26, 2026 17:56
Xuanwo added a commit to lancedb/lancedb that referenced this pull request Sep 29, 2026
Updates the Rust workspace dependencies, Cargo lockfile, and Java
`lance-core` to [Lance
v13.0.0-beta.18](https://github.com/lance-format/lance/releases/tag/v13.0.0-beta.18).
It includes lance-format/lance#9574, which bounds the memory an IVF
partition split uses when it re-reads raw vectors during
`optimize_indices`, and lance-format/lance#9582, which keeps the mTLS
REST namespace client on rustls.

Lance's new combined-fields FTS query variant (introduced by
v13.0.0-beta.17) is handled the same way as in #4336: the remote
capability check and Rust/Node bindings accept it, with a regression
test for the remote request payload, and the Python conversion reports
that this query type is not yet supported. This PR supersedes #4336.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-namespace Namespace impls bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants