Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default configs in Docker images dont work very well out of the box #13497

Closed
phlax opened this issue Oct 11, 2020 · 11 comments · Fixed by #13612
Closed

Default configs in Docker images dont work very well out of the box #13497

phlax opened this issue Oct 11, 2020 · 11 comments · Fixed by #13612
Assignees
Labels
area/docs no stalebot Disables stalebot from closing an issue
Milestone

Comments

@phlax
Copy link
Member

phlax commented Oct 11, 2020

description

The default Envoy docker image comes with an example configuration that:

  • listens on 127.0.0.1:9901 with an admin interface
  • proxies http 0.0.0.0:10000 to https www.google.com

Running this with

docker run -it --rm -p 10000:10000 -p 9901:9901 envoyproxy/envoy:v1.16.0

...and browsing to http://localhost:PORT neither works very well.

The admin doesnt work at all out-of-the-box because its listening to 127.0.0.1

The google proxy creates an overlay with a spinning wheel and borks (im guessing that playing with eg /etc/resolv.conf it might work differently)

I would propose that we change and/or document the admin UI

For the proxy, how about we proxy to the www.envoyproxy.io website

refs

@phlax phlax added bug triage Issue requires triage labels Oct 11, 2020
@mattklein123 mattklein123 added area/docs no stalebot Disables stalebot from closing an issue and removed bug triage Issue requires triage labels Oct 11, 2020
@mattklein123 mattklein123 added this to the 1.17.0 milestone Oct 11, 2020
@phlax
Copy link
Member Author

phlax commented Oct 14, 2020

also noticing that they are using v2 configs (related to #13529 (comment))

@phlax
Copy link
Member Author

phlax commented Oct 16, 2020

@mattklein123 there are kinda 2 questions/propositions here

use envoyproxy.io as default/demo proxy

proxying http://localhost to https://anything.else is always going to be imperfect, but proxying to the envoy website works better than proxying to google and is more "neutral" i think.

make admin listen on 0.0.0.0 in default/demo configuration

this one im a bit more ambivalent about because there is an obvious security implication.

in the docker image it doesnt matter much because without it it doesnt work at all - with it, it will still only expose admin according to your Docker configuration

running envoy outside of docker with admin on 0.0.0.0 is a bit more complex, but at least to do this you would have to download the config and run with it - so we can document that you would probs not want to do this in normal operation - or at least to take measures to protect this endpoint

@phlax
Copy link
Member Author

phlax commented Oct 16, 2020

i would quite like to move on this quicly - once #13562 is landed.

If i can fix this before #13490 it will make "getting-started" easier to document

@phlax
Copy link
Member Author

phlax commented Oct 16, 2020

@lizan do you have any thoughts on above suggestions ?

@mattklein123
Copy link
Member

I think both of these changes are fine with me, as long as we very carefully document the security implications of the admin config in the example.

IIRC the google proxy used to work, so it would be nice to understand why it no longer works, but I guess that is a separate issue. I think proxying to the website as a neutral location makes sense to me.

@phlax
Copy link
Member Author

phlax commented Oct 16, 2020

it would be nice to understand why it no longer works

almost certainly Content Security Policy

@phlax
Copy link
Member Author

phlax commented Oct 16, 2020

as long as we very carefully document the security implications

here is the (wip) bit in the updated quick start instructions

https://storage.googleapis.com/envoy-pr/13490/docs/start/quick-start.html#configuration-admin

@phlax
Copy link
Member Author

phlax commented Oct 16, 2020

running envoy outside of docker with admin on 0.0.0.0

thinking about this further - this is how it is already documented. So the only change i think is to the config in the Docker image

@lizan
Copy link
Member

lizan commented Oct 16, 2020

in the docker image it doesnt matter much because without it it doesnt work at all - with it, it will still only expose admin according to your Docker configuration

It does matter if you run with --network=host, which I've been seeing people doing this in many cases.

@phlax
Copy link
Member Author

phlax commented Oct 17, 2020

which I've been seeing people doing this in many cases.

im sure the image is used in many different ways - but the default config - ie the one that proxies to google etc is less likely to be used in this way.

currently we have the worst of all worlds. The Docker image config doesnt work, and the documentation encourages you to listen on 0.0.0.0 without any word to secure it

@phlax
Copy link
Member Author

phlax commented Oct 17, 2020

the other option - which i think is not a bad idea - remove the config altogether (as getenvoy does i think)

htuch pushed a commit that referenced this issue Oct 22, 2020
This updates the defaut container config to:
- use the envoyproxy.io website as the default upstream proxy
- listen for admin interface on 0.0.0.0 address

Fixes #13497

Signed-off-by: Ryan Northey <ryan@synca.io>
chradcliffe pushed a commit to chradcliffe/envoy that referenced this issue Oct 23, 2020
This updates the defaut container config to:
- use the envoyproxy.io website as the default upstream proxy
- listen for admin interface on 0.0.0.0 address

Fixes envoyproxy#13497

Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Craig Radcliffe <craig.radcliffe@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs no stalebot Disables stalebot from closing an issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants