Summary
When decoding WebBrokerApi policies from xDS EventChannelResource in event-gateway/gateway-runtime/internal/xdsclient/handler.go, the current implementation treats on_connection_init only as a flat []interface{} and maps all policies into OnConnectionInit.Request. This means any xDS payload using the nested request/response form will silently drop response policies, which can never reach the runtime.
Fix Required
Update toWebBrokerApiBinding (and its per-channel equivalent) to accept both forms:
- If
on_connection_init is a map[string]interface{} with request and/or response keys, decode each side separately into OnConnectionInit.Request and OnConnectionInit.Response.
- Otherwise, fall back to the existing flat-array behavior and populate
Request for backward compatibility.
The same fix applies at both the API-level policies block and the per-channel policies block in toWebBrokerApiBinding.
References
Requested by
@senthuran16
Summary
When decoding WebBrokerApi policies from xDS
EventChannelResourceinevent-gateway/gateway-runtime/internal/xdsclient/handler.go, the current implementation treatson_connection_initonly as a flat[]interface{}and maps all policies intoOnConnectionInit.Request. This means any xDS payload using the nestedrequest/responseform will silently drop response policies, which can never reach the runtime.Fix Required
Update
toWebBrokerApiBinding(and its per-channel equivalent) to accept both forms:on_connection_initis amap[string]interface{}withrequestand/orresponsekeys, decode each side separately intoOnConnectionInit.RequestandOnConnectionInit.Response.Requestfor backward compatibility.The same fix applies at both the API-level policies block and the per-channel policies block in
toWebBrokerApiBinding.References
Requested by
@senthuran16