Skip to content

gRPC active health check sends invalid :authority #10091

Closed

Description

@YaroShkvorets

Envoy Gateway doesn't set an authority on gRPC active health checks (cluster.go only sets ServiceName), so Envoy falls back to the name of the Envoy cluster, which Envoy Gateway generates per route rule, e.g. grpcroute/my-ns/my-route/rule/0, and sends it as :authority.

Slashes aren't valid in an authority (RFC 3986), and newer Go HTTP/2 servers now reject it (golang.org/x/net v0.59.0, golang/net@580cba3). The backend resets the stream with PROTOCOL_ERROR, every endpoint is marked failed_active_hc, and clients get no healthy upstream, even though the service is healthy.

BackendTrafficPolicy offers no way to override the authority for gRPC checks. Perhaps need a way to override it.

Reproduce:

grpcurl -plaintext -authority 'grpcroute/ns/route/rule/0' <go-grpc-server> grpc.health.v1.Health/Check
# rpc error: ... RST_STREAM with error code: PROTOCOL_ERROR

Environment: Envoy Gateway v1.8.2; backend is a Go gRPC server built with golang.org/x/net v0.59.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions