From #618 (comment)
Expected Behavior
K8s Services and VirtualServices owned or created by other actors never conflict with Channel Services.
Actual Behavior
At least in the GCP Pubsub implementation, the Channel controller adopts a Service with the expected name even if that Service is not owned by the Channel (it logs a warning if this happens). The adopted Service is set as the address of the Channel.
The effect is that all messages sent to that Channel will be rejected or lost, and the actual owner of the Channel will start receiving invalid requests. Depending on relative throughput and upstream retry policies, this might cause a DoS of the Service endpoints.
The VirtualService has a similar but worse problem in that it's spec is updated to be what the Channel controller expects. So in addition to the above, the routing configuration of the owning endpoints will be altered.
Steps to Reproduce the Problem
I haven't tried this, but I imagine the repro is as simple as:
- Create a Knative Service named
foo-channel.
- Create a Channel named
foo in the same namespace as the Knative Service.
- Send a message to that Channel. The Knative Service will receive that message instead of the channel dispatcher.
Additional Info
Possible solutions include using generated names for Channel-owned objects (this may not be possible according to @Harwayne) or giving the Channel a terminal error state when encountering a resource that isn't owned by the Channel.
From #618 (comment)
Expected Behavior
K8s Services and VirtualServices owned or created by other actors never conflict with Channel Services.
Actual Behavior
At least in the GCP Pubsub implementation, the Channel controller adopts a Service with the expected name even if that Service is not owned by the Channel (it logs a warning if this happens). The adopted Service is set as the address of the Channel.
The effect is that all messages sent to that Channel will be rejected or lost, and the actual owner of the Channel will start receiving invalid requests. Depending on relative throughput and upstream retry policies, this might cause a DoS of the Service endpoints.
The VirtualService has a similar but worse problem in that it's spec is updated to be what the Channel controller expects. So in addition to the above, the routing configuration of the owning endpoints will be altered.
Steps to Reproduce the Problem
I haven't tried this, but I imagine the repro is as simple as:
foo-channel.fooin the same namespace as the Knative Service.Additional Info
Possible solutions include using generated names for Channel-owned objects (this may not be possible according to @Harwayne) or giving the Channel a terminal error state when encountering a resource that isn't owned by the Channel.