Tollef Fog Heen wrote:
> ]] Paul Tagliamonte 
> > So, when are we going to push this? If not now, what criteria need to
> > be met? Why can't we https-ify the default CDN mirror today?
> The usual crypto answer: because key handling is hard.
> Doing this for the per-country mirrors means that repointing mirrors
> becomes a lot harder than it currently is, and this is something we do
> on a daily basis.  We'd need a solution for deploying the TLS cert for,
> say, to (or ftp.d.o) if ftp.d.o is down for
> maintenance.
> Doing this for deb.d.o would mean we need to get certs on both Fastly
> and Cloudfront deployed, which is, frankly, a more realistic proposition
> than jury-rigging something on the per-country mirrors.


Since the Debian project controls the mirror client (in particular the
code responsible for performing certificate validation), surely there is
some way we can engineer our way to a less painful solution? We don't
have to imitate the way web browsers or other HTTP clients perform
certificate validation, right?

We currently use DNS SRV records for a few mirror domains to direct apt
traffic, e.g. for


;; ANSWER SECTION: 3600 IN SRV 0 1 80 3600 IN SRV 0 2 80 3600 IN SRV 0 1 80

If there were some way to be able to trust the SRV target names (the
right-most names in the above output like "",
which tend to be very stable since they're chosen by the mirror
operator), we could use those names as the domain name in the TLS
certificate to be validated by apt, and it would be easy for a mirror
operator to go off and acquire a TLS certificate for the "canonical"
name of their server, rather than the alias. Unfortunately,
the data in the SRV records comes from the DNS, and even though the zone is signed, we cannot currently rely on DNSSEC validation
occurring (and occurring successfully) on every Debian system running

Some possibilities:


Maybe we could securely distribute the list of canonical mirror names
via (using traditional certificate validation
rules), either in a package or in metadata stored in the archive?


Maybe we could constrain apt so that it would use the (untrusted) DNS
SRV target names for certificate validation only if the names were
rooted in a base domain name on a whitelist? E.g., if the SRV target
name ends in "", then that name can be used as
the name to be validated in the TLS certificate. Then we could set up
SRV RRs that use aliased mirror hostnames like this: SRV 0 1 443 SRV 0 2 443 SRV 0 1 443

and then alias those target names to the canonical mirror hostnames: CNAME CNAME CNAME

Then the operator of only has to go off and set
up a vhost for "" in the
mirror server's HTTP config, and acquire a TLS certificate for that

Both of these options have the problem that a potential MITM can just
become a rogue mirror operator, but perhaps more fine-grained
constraints could be defined, or we could require the same level of
trust for HTTPS mirror operators that we do for new maintainers (i.e.,
PGP signatures from two active developers)?

Robert Edmonds

Reply via email to