It is possible to bypass the queue-proxy
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 1.2k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 2
Description
/area networking
## What version of Knative?
v0.11.0-125-gb8f7090cc
## Expected Behavior
From within the cluster, it shouldn't be possible to connect directly to the user container and bypass the queue proxy for a revision.
I would expect that this would be prohibited, possibly via network policy.
## Actual Behavior
Port 8080 of the user container is exposed and available
Note: this only works if the revision is scaled to 1 or more instances already
## Steps to Reproduce the Problem
### Deploy a knative service ("webapp" in my example)
### get the PodIP
```
% kubectl get pods/webapp-mrpn8-deployment-6559dcff9b-c2pxx -oyaml | grep "podIP:"
podIP: 10.36.0.28
```
### Able to (from on cluster) connect directly to port 8080 on that pod
```
# curl http://10.36.0.28:8080
Hello there...
```
Contributor guide
Research direction
Start by reproducing the issue with the provided Kubernetes deployment, PodIP lookup, and curl request to port 8080. Trace how the revision's user-container networking is configured and evaluate the proposed network-policy approach; done means in-cluster access cannot bypass the queue proxy while normal revision traffic still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100