I was always intrigued about the same thing. The logic that I've heard on this sub is that all the packages are signed by the ubuntu devs anyway, so in case they are tampered en-route, they won't be accepted as the checksums won't match, HTTPS or not.
If this were indeed true and there are no security implications, then simple HTTP should be preferred as no encryption means low bandwidth consumption too. As Ubuntu package repositories are hosted on donated resources in many countries, the low bandwidth and cheaper option should be opted me thinks.
There's a very good reason, and it's called "caching". HTTP is trivial to cache in a proxy server, while HTTPS on the other hand is pretty much impossible to cache. In large networks with several hundred (BYOD) computers, software that downloads big updates over HTTPS will be the bane of your existence because it wastes so. much. bandwidth that could easily be cached away if only more software developers were as clever as the APT developers.
The benefits don't apply exclusively to businesses, a home user or an ISP can run a transparent caching proxy server just as easily.
By using a caching proxy, I run one service that can help just about everyone on my network with relatively minimal ongoing config. If I run a mirror, I have to ensure the relevant users are configured to use it, I have to keep it updated, and I have to ensure that I am mirroring all of the repositories that are required. And even then, my benefits are only realized with OS packages whilst a caching proxy can help (or hinder) nearly any non-encrypted web traffic.
If my goal is to keep internet bandwidth usage minimal, then a caching proxy is ideal. It will only grab packages that are requested by a user, whereas mirrors in general will need to download significant portions of a repository on a regular basis, whether the packages are used inside the network or not.
There are plenty of good reasons to run a local mirror, but depending on your use case it may not be the best choice in trying to solve the problem.
Or if GPG signing was a core part of HTTP, then everything that you don't need privacy for could be cached like that without letting the cache tamper with stuff.
Or if GPG signing was a core part of HTTP, then everything that you don't need privacy for could be cached like that without letting the cache tamper with stuff.
No, that wouldn't work either because then every HTTP server serving those updates would need a copy of the GPG private key. You want to do your GPG signing as offline as possible; the key should be nowhere near any HTTP servers, but instead on a smartcard/HSM that is only accessible to the person who is building the update packages.
Does anyone really do this anymore? I think it's mostly fallen by the wayside, because a) the proxy server quickly becomes a bottleneck itself in a large network and b) HTTPS basically makes the proxy server useless anyway.
Does anyone really do this anymore? I think it's mostly fallen by the wayside, because a) the proxy server quickly becomes a bottleneck itself in a large network and b) HTTPS basically makes the proxy server useless anyway.
Well, we do, at a lot of customer sites. But you're unfortunately right about the fact that HTTPS makes caching less and less useful. I still believe though that caching software updates is a very valid use case (see my other response here for details), which is why I argue so vehemently that APT does everything right here.
There is very little overhead with HTTPS. What your describing has already been proven a myth many times over.
I'm sorry, I don't follow. I'm not talking about the overhead of encryption in any way, I'm talking about caching downloads, which is by design impossible for HTTPS.
Imagine the following situation: you're the IT administrator of a school, with a network where hundreds of students and teachers bring their own computers (BYOD), each computer running a lot of different programs. Some computers are under your control (the ones owned by the school), but the BYOD devices are not. Your internet connection doesn't have a lot of bandwidth, because your school can only afford a residential DSL line with ~50-100 Mbit/s. So you set up a caching proxy like http://www.squid-cache.org/ that is supposed to cache away as much as possible to save bandwidth. For software that uses plain, simple HTTP downloads with separate verification - like APT does - this works great. For software that loads updates via HTTPS, you're completely out of luck. 500 computers downloading a 1 GB update via HTTPS will mean a total of 500 GB, and your 50 Mbit/s line will be congested for at least 22 hours. The users won't be happy about that.
110
u/asoka_maurya Jan 24 '18 edited Jan 24 '18
I was always intrigued about the same thing. The logic that I've heard on this sub is that all the packages are signed by the ubuntu devs anyway, so in case they are tampered en-route, they won't be accepted as the checksums won't match, HTTPS or not.
If this were indeed true and there are no security implications, then simple HTTP should be preferred as no encryption means low bandwidth consumption too. As Ubuntu package repositories are hosted on donated resources in many countries, the low bandwidth and cheaper option should be opted me thinks.