envoyproxy / envoyproxy/envoy

ext_proc: xds.virtual_host_metadata unparseable due to DebugString serialization (Envoy 1.37.0)

Open
#43,466 2 comments 1 reaction 0 assignees View on GitHub
area/ext_proc bug help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

**Title**: Virtual host metadata uses DebugString instead of TextFormat (Protobuf 30+ incompatible)

**Description**:

Envoy 1.37.0 serializes the `xds.virtual_host_metadata` attribute using `DebugString()` instead of `TextFormat::PrintToString()`. With Protobuf 30+, this produces unparseable output prefixed with `goo.gle/debugonly` or `goo.gle/debugstr`.

External processor (ext_proc) implementations cannot parse the virtual host metadata because Protobuf 30+ intentionally adds these prefixes to prevent parsing (see https://protobuf.dev/programming-guides/deserialize-debug/).

**Expected behavior**: Metadata should be serialized using `TextFormat::PrintToString()` to produce machine-readable protobuf text format that can be parsed by standard protobuf libraries.

**Repro steps**:

1. Deploy Envoy 1.37.0 with an external processor configuration
2. Configure virtual host metadata.
3. External processor receives `xds.virtual_host_metadata` attribute in ProcessingRequest
4. Attempt to parse the string value as protobuf text format
5. Parsing fails with: `proto: syntax error (line 1:1): invalid field name: goo.gle/debugonly`

**Environment**:
Envoy 1.37.0

**Logs**:

Sample metadata received by ext_proc:
```
goo.gle/debugonly filter_metadata { key: "someKey" value { fields { key: "apiIdentifier" value { string_value: "..." } } fields { key: "extHost" value { string_value: "..." } } } }
```

Error when parsing:
```
proto: syntax error (line 1:1): invalid field name: goo.gle/debugonly
```

**Impact**:

Breaking change from 1.36 to 1.37 - makes virtual host metadata unparseable by ext_proc implementations using standard protobuf libraries (Go, Python, Java, C++).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.