ingress: add opt-in support for udp:// URL pull ingress (#4810)
* ingress: add opt-in support for udp:// URL pull ingress URL pull ingress previously accepted only http, https and srt source URLs. Add udp:// as an accepted scheme, gated behind a new `ingress.enable_udp_url_pull` config option that defaults to false, so unauthenticated UDP sources are not reachable unless the operator opts in. Also add a counterfeiter fake for IngressLauncher and a test covering the scheme validation matrix. The ingress handler binds a local socket on the caller supplied address and port instead of connecting out like the http and srt sources do. Spell out what that means for operators in both the config field doc comment and config-sample.yaml: caller controlled local port binding, unauthenticated and spoofable input, and multicast relaying of traffic on the handler's local network. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0aae7a4894
commit
91f33da004
@@ -439,6 +439,19 @@ func (l LimitConfig) CanAddDataBlob(dataBlobs []*livekit.DataBlob, toAdd *liveki
|
||||
type IngressConfig struct {
|
||||
RTMPBaseURL string `yaml:"rtmp_base_url,omitempty"`
|
||||
WHIPBaseURL string `yaml:"whip_base_url,omitempty"`
|
||||
// Allow URL pull ingresses with a udp:// source URL. Disabled by default, and should only be
|
||||
// enabled if both the callers allowed to create ingresses and the network the ingress handlers
|
||||
// run on are trusted. Unlike an http or srt source url, a udp source url doesn't make the ingress
|
||||
// handler connect out to the url host: the handler binds a local socket on the address and port
|
||||
// taken from the url, and joins the multicast group if one is given. This lets the caller:
|
||||
// - Choose which local port the handler binds, potentially colliding with other services on
|
||||
// the host.
|
||||
// - Feed the session unauthenticated traffic. UDP is connectionless, so any host able to reach
|
||||
// that port can inject media, or spoof the sender address to disrupt a legitimate feed.
|
||||
// - Make the handler join arbitrary multicast groups and republish whatever it receives into a
|
||||
// room, using the ingress as a relay for streams on the handler's local network the caller has
|
||||
// no direct access to.
|
||||
EnableUDPURLPull bool `yaml:"enable_udp_url_pull,omitempty"`
|
||||
}
|
||||
|
||||
type SIPConfig struct{}
|
||||
|
||||
Reference in New Issue
Block a user