Skip to content

Fix uni-gRPC server wiring and URL password redaction - #1180

Merged
FZambia merged 3 commits into
masterfrom
fix-strippassword-leak-and-unigrpc
Jul 6, 2026
Merged

FZambia merged 3 commits into
masterfrom
fix-strippassword-leak-and-unigrpc

Conversation

@FZambia

@FZambia FZambia commented Jul 6, 2026

Copy link
Copy Markdown
Member

Wiring and logging fixes.

Fixes

  • Use the uni-gRPC TLS config for the uni-gRPC server (was using the API-gRPC TLS config).
  • Gracefully shut down the uni-gRPC server (shutdown was assigned to the wrong variable, so it was never stopped).
  • Redact URL passwords containing special characters in logs (use url.Redacted()).

FZambia added 3 commits July 4, 2026 23:48
StripPassword string-replaced the decoded password inside the re-encoded URL, so
a password containing a URL-special character (most commonly "@", also spaces or
non-ASCII) never matched and was logged verbatim - e.g. the NATS broker URL is
logged at startup via this function. Use url.Redacted, which redacts the password
in the parsed userinfo before re-encoding, so any well-formed URL is redacted
regardless of the password's characters.
runGRPCUniServer's result was assigned to grpcAPIServer instead of grpcUniServer,
so grpcUniServer stayed nil and was never GracefulStop-ed on shutdown. With both
grpc_api and uni_grpc enabled this also overwrote the grpc_api server reference,
so the API server's in-flight requests were dropped abruptly at exit instead of
draining. Assign to grpcUniServer.
runGRPCUniServer built its TLS from cfg.GrpcAPI.TLS instead of cfg.UniGRPC.TLS,
so uni_grpc.tls.enabled was silently ignored (the uni-gRPC listener served
plaintext) while grpc_api.tls was unexpectedly applied to it. Read the uni-gRPC
TLS section.
@FZambia
FZambia merged commit 85e1a7e into master Jul 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant