Disabling http2 can be a big deal. My service is primarily made up of gRPC APIs. Not an option for me to disable http2.
Luckily I'm not using nginx at the moment - but I easily could have been.
If you're using grpc, http2, etc you're so much better off using Envoy proxy
You basically get to piggyback off of a large chunk of big tech's infrastructure and security work. Obviously everything has the risk of security flaws (and I kind of hate that default Envoy builds ship with half-baked filter impls) but it's a generally more mature ecosystem than projects with a lot of smaller/legacy users like nginx
I'm not 100% informed on this, but it seems very unbelievable to me that Envoy could be considered more robust or widely used than nginx at any point in history including today. I started using ConnectRPC instead of GRPC almost entirely because it didn't leave me subject to (what I consider to be) an unnecessary dependency in Envoy.
I guess I would just say, wordpress is also more widely used than many other projects, but that doesn't necessarily make it more robust or secure than the projects Google, Cloudflare, and security companies develop.
The main reason I see to not use Envoy is that it's very annoying to set up and build, and requires familiarity with things like grpc/proto/low level networking to get right. But if you're using grpc and http2 I think you're generally past that "infra overhead" threshold already and it's going to better serve your needs.
I have pretty much only worked at big tech or my own infrastructure startup, and did some systems/infra work at Google using Envoy for a while. I can't say it's 100% better than nginx but I can say that I've evaluated nginx and a lot of software like it (ie with a similar customer base, ecosystem, and history; like coturn) over the years for my personal use, and every time I've immediately been annoyed by constant security issues or poor http2/L4 networking support that I don't see when I use what Netflix/Google/etc use.
Envoy probably has the advantage that it’s only a reverse proxy server, unlike nginx which has other uses too like a general-purpose web server with optional modules.
The documentation, DX/UX, and discoverability for these features are pretty bad. But they work well if you know how to do it.
Implementing a custom HTTP filter itself is actually easy, I can share examples I did in the last year for a voice inference stack if anybody is interested. The problem is just that the devloop is very painful, because Envoy doesn't make it easy to know why something isn't working (this is actually most of what I did with it at Google, tons of testing/verification and compatability infra for relatively simple http stuff) and the builds take a very long time.
On all my small projects (eg rails apps) the reverse proxy to the app servers is the same server expected to serve the static assets directly. In fact the majority of bot nonsense never goes through the proxy due to path rules.
Yes [0]. For a single node you can just use this, it works like the Golang/language rate limiters you might already be familiar with [1]
In a multiple node/distributed architecture you need away to coordinate rate limits across nodes and not try to fight the CAP theorem.
There is a way to do this [2] [3] and although it sounds complicated the shape of the solution (delegating to a third party service that aggregates and provides client-level rate limit metrics across multiple proxies) would still be the same any way you cut it.
Well that is of course because it is the only proxy that seems to speak gRPC fluently. Anyone who's ever tried to configure bare nginx to serve gRPC knows this. And yet, I would wager that many stacks use both.
This requirement turns me off of gRPC entirely. Maybe Envoy truly is more secure than nginx, but it's still a whole-ass additional attack surface. It seemed to me that eliminating it if possible was best.
I don't know what nginx security vetting looks like, but just being older isn't a security guarantee.
I know Google spends a lot of manpower on making envoy secure.
Hopefully Envoy is using bounded checked collection types and no C like tricks, with modern C++ best practices, otherwise there is not much benefit, security wise.
What WAF would you suggest to use with envoy? Have been working with Coraza and tbh satisfying is something else. So i wonder what someone that recommends envoy would recommend as WAF for it
Personally I serve all static, public content off a CDN and only serve dynamic content through Envoy after it passes AuthN/AuthZ.
I use JWT-based sessions + a remote JWKS (which is remote static content that Envoy can cache) + either a third-party IDP or dedicated login service (this being the only application logic besides Envoy's routing exposed to the public Internet). That way, every envoy auth check is immediate and stateless.
In this setup you don't really need a WAF because all unauthenticated requests redirect to signin or 403, which get strict rate limits on login. An abusive peer that sends a ton of traffic anyway gets blocked at the network/firewall level outside of Envoy. The tradeoff is you need to decide that you aren't going to do unauthenticated SSR, and I will admit this pretty complicated to set up in its entirety.
It's patched so anyone can upgrade to the latest nginx to fix it, thankfully. I agree that just shutting off HTTP/2 is probably non-ideal for a lot of web services.
Neither Ubuntu nor Debian have released patches yet, so if you're using one of these mainstream distributions and install nginx through the distro's package manager, you can't easily "upgrade to the latest nginx" yet. You can however disable HTTP/2 for now.
Both the Debian and the Red Hat packaging systems are awfully convenient ways to build software from source. It has to be, that's package maintainers do daily. They will install all dependencies, apply the distribution specific patches, build, and package in one operation.
Should your distributor fall of the face of the Earth and you still need to patch software, it is often the fastest way to take the source package, put the security patch in the patch directory, and run.
There is more it, such as versioning it between the last release but below the official upgrade so it's convenient when the offical one comes along, and preparing keys if you require signatures, but that's basically it.
Not quite. The kernel bug is only the worker-to-root step. Code execution as the nginx worker through the two HTTP/2 CVEs needs nothing but HTTP/2 enabled. Three of the five CVEs don't need HTTP/2 at all: one is HTTP/3 with an upstream, one is resolver + variable proxy_pass + subrequests, and one is the mail proxy with auth_http.
Luckily we could not see your face during writing this, as I’m pretty sure no serious person in the industry can say this with a straight face… Maybe Theo de Raadt, but there it is a running joke I guess.
Not saying that thie image is affected (I don't know), but small footprint does not guarantee security either. It can hit systems of any complexity these days.
That is a very well written page. I am pleasantly surprised that they provide detailed instructions to verify the package signature before installation.
FWIW, for nodes that don't have packages, I compiled from source under /opt and deploy scripts check equal or higher version so it will auto switch back when the new packages are installed. Seemed less risky than disabling http 2.
The distributions can customize packages with sensible defaults. Debian usually does, and is incredibly convenient. They usually disable features most people don't use, and allow you to easily switch them on if you choose.
It was patched but the docker containers were a few hours behind, I nearly had to build from source on a few servers, until I noticed they were pushing all the tags as I was patching a few hours after the release was cut
One idea that might work for you is client certificates if those are only internal APIs. I don't know about you, but I have a lot more confidence in openssl than the people who use openssl.
You basically get to piggyback off of a large chunk of big tech's infrastructure and security work. Obviously everything has the risk of security flaws (and I kind of hate that default Envoy builds ship with half-baked filter impls) but it's a generally more mature ecosystem than projects with a lot of smaller/legacy users like nginx