Commit Graph
3 Commits
Author SHA1 Message Date
José M. Requena Plens d071dc78ed test(search): pin the TLS failure and declare the plaintext server
The insecure-mode spec only asserted an error, so against main it
passed on a refused connection to the hardcoded endpoint. Match the
TLS handshake error instead. Pass insecure credentials to the test
server explicitly, which is what it already did, so the static
analysis no longer reports a server without credentials.
2026-10-04 23:34:06 +02:00
José M. Requena Plens 828f7fe8f1 test(search): rewrite the index command test with Ginkgo
Run the command against a search service without TLS only: what the
command decides is whether to turn TLS off, how the mode maps and which
endpoint it dials. What pool.NewConn does with each mode belongs to
reva. Also cover the endpoint default.
2026-10-04 23:34:06 +02:00
José M. Requena Plens 3dfae3b984 fix(search): honor the gRPC client TLS mode in the index command
The index command read OC_GRPC_CLIENT_TLS_MODE with a meaning of its
own: "insecure" dialed without TLS, and every other value, including
the default and "off", dialed with verified TLS and ignored
OC_GRPC_CLIENT_TLS_CACERT. Against the default setup, where the gRPC
services run without TLS, it failed unless --insecure was passed, and
against services with TLS enabled it only connected when their
certificate was trusted by the system roots, never with the generated
certificate or a private CA.

Map the mode with pool.StringToTLSMode and dial with pool.NewConn, the
mapping and dialer the other services' reva clients use: "off" dials
without TLS, "insecure" uses TLS without verifying the certificate and
"on" verifies it against the configured CA. --insecure still forces a
connection without TLS, and then the mode is not read at all.
2026-10-04 23:34:06 +02:00