1APT-SECURE(8)                         APT                        APT-SECURE(8)
2
3
4

NAME

6       apt-secure - Archive authentication support for APT
7

DESCRIPTION

9       Starting with version 0.6, APT contains code that does signature
10       checking of the Release file for all repositories. This ensures that
11       data like packages in the archive can't be modified by people who have
12       no access to the Release file signing key. Starting with version 1.1
13       APT requires repositories to provide recent authentication information
14       for unimpeded usage of the repository. Since version 1.5 changes in the
15       information contained in the Release file about the repository need to
16       be confirmed before APT continues to apply updates from this
17       repository.
18
19       Note: All APT-based package management front-ends like apt-get(8),
20       aptitude(8) and synaptic(8) support this authentication feature, so
21       this manpage uses APT to refer to them all for simplicity only.
22

UNSIGNED REPOSITORIES

24       If an archive has an unsigned Release file or no Release file at all
25       current APT versions will refuse to download data from them by default
26       in update operations and even if forced to download front-ends like
27       apt-get(8) will require explicit confirmation if an installation
28       request includes a package from such an unauthenticated archive.
29
30       You can force all APT clients to raise only warnings by setting the
31       configuration option Acquire::AllowInsecureRepositories to true.
32       Individual repositories can also be allowed to be insecure via the
33       sources.list(5) option allow-insecure=yes. Note that insecure
34       repositories are strongly discouraged and all options to force apt to
35       continue supporting them will eventually be removed. Users also have
36       the Trusted option available to disable even the warnings, but be sure
37       to understand the implications as detailed in sources.list(5).
38
39       A repository which previously was authenticated but would loose this
40       state in an update operation raises an error in all APT clients
41       irrespective of the option to allow or forbid usage of insecure
42       repositories. The error can be overcome by additionally setting
43       Acquire::AllowDowngradeToInsecureRepositories to true or for Individual
44       repositories with the sources.list(5) option
45       allow-downgrade-to-insecure=yes.
46

SIGNED REPOSITORIES

48       The chain of trust from an APT archive to the end user is made up of
49       several steps.  apt-secure is the last step in this chain; trusting an
50       archive does not mean that you trust its packages not to contain
51       malicious code, but means that you trust the archive maintainer. It's
52       the archive maintainer's responsibility to ensure that the archive's
53       integrity is preserved.
54
55       apt-secure does not review signatures at a package level. If you
56       require tools to do this you should look at debsig-verify and debsign
57       (provided in the debsig-verify and devscripts packages respectively).
58
59       The chain of trust in Debian starts (e.g.) when a maintainer uploads a
60       new package or a new version of a package to the Debian archive. In
61       order to become effective, this upload needs to be signed by a key
62       contained in one of the Debian package maintainer keyrings (available
63       in the debian-keyring package). Maintainers' keys are signed by other
64       maintainers following pre-established procedures to ensure the identity
65       of the key holder. Similar procedures exist in all Debian-based
66       distributions.
67
68       Once the uploaded package is verified and included in the archive, the
69       maintainer signature is stripped off, and checksums of the package are
70       computed and put in the Packages file. The checksums of all of the
71       Packages files are then computed and put into the Release file. The
72       Release file is then signed by the archive key for this Debian release,
73       and distributed alongside the packages and the Packages files on Debian
74       mirrors. The keys are in the Debian archive keyring available in the
75       debian-archive-keyring package.
76
77       End users can check the signature of the Release file, extract a
78       checksum of a package from it and compare it with the checksum of the
79       package they downloaded by hand - or rely on APT doing this
80       automatically.
81
82       Notice that this is distinct from checking signatures on a per package
83       basis. It is designed to prevent two possible attacks:
84
85       •   Network "man in the middle" attacks. Without signature checking,
86           malicious agents can introduce themselves into the package download
87           process and provide malicious software either by controlling a
88           network element (router, switch, etc.) or by redirecting traffic to
89           a rogue server (through ARP or DNS spoofing attacks).
90
91       •   Mirror network compromise. Without signature checking, a malicious
92           agent can compromise a mirror host and modify the files in it to
93           propagate malicious software to all users downloading packages from
94           that host.
95
96       However, it does not defend against a compromise of the master server
97       itself (which signs the packages) or against a compromise of the key
98       used to sign the Release files. In any case, this mechanism can
99       complement a per-package signature.
100

INFORMATION CHANGES

102       A Release file contains beside the checksums for the files in the
103       repository also general information about the repository like the
104       origin, codename or version number of the release.
105
106       This information is shown in various places so a repository owner
107       should always ensure correctness. Further more user configuration like
108       apt_preferences(5) can depend and make use of this information. Since
109       version 1.5 the user must therefore explicitly confirm changes to
110       signal that the user is sufficiently prepared e.g. for the new major
111       release of the distribution shipped in the repository (as e.g.
112       indicated by the codename).
113

USER CONFIGURATION

115       apt-key is the program that manages the list of keys used by APT to
116       trust repositories. It can be used to add or remove keys as well as
117       list the trusted keys. Limiting which key(s) are able to sign which
118       archive is possible via the Signed-By in sources.list(5).
119
120       Note that a default installation already contains all keys to securely
121       acquire packages from the default repositories, so fiddling with
122       apt-key is only needed if third-party repositories are added.
123
124       In order to add a new key you need to first download it (you should
125       make sure you are using a trusted communication channel when retrieving
126       it), add it with apt-key and then run apt-get update so that apt can
127       download and verify the InRelease or Release.gpg files from the
128       archives you have configured.
129

REPOSITORY CONFIGURATION

131       If you want to provide archive signatures in an archive under your
132       maintenance you have to:
133
134Create a toplevel Release file, if it does not exist already. You
135           can do this by running apt-ftparchive release (provided in
136           apt-utils).
137
138Sign it. You can do this by running gpg --clearsign -o InRelease
139           Release and gpg -abs -o Release.gpg Release.
140
141Publish the key fingerprint, so that your users will know what key
142           they need to import in order to authenticate the files in the
143           archive. It is best to ship your key in its own keyring package
144           like Debian does with debian-archive-keyring to be able to
145           distribute updates and key transitions automatically later.
146
147Provide instructions on how to add your archive and key. If your
148           users can't acquire your key securely the chain of trust described
149           above is broken. How you can help users add your key depends on
150           your archive and target audience ranging from having your keyring
151           package included in another archive users already have configured
152           (like the default repositories of their distribution) to leveraging
153           the web of trust.
154
155       Whenever the contents of the archive change (new packages are added or
156       removed) the archive maintainer has to follow the first two steps
157       outlined above.
158

SEE ALSO

160       apt.conf(5), apt-get(8), sources.list(5), apt-key(8), apt-
161       ftparchive(1), debsign(1), debsig-verify(1), gpg(1)
162
163       For more background information you might want to review the Debian
164       Security Infrastructure[1] chapter of the Securing Debian Manual (also
165       available in the harden-doc package) and the Strong Distribution
166       HOWTO[2] by V. Alex Brennen.
167

BUGS

169       APT bug page[3]. If you wish to report a bug in APT, please see
170       /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
171

AUTHOR

173       APT was written by the APT team <apt@packages.debian.org>.
174

MANPAGE AUTHORS

176       This man-page is based on the work of Javier Fernández-Sanguino Peña,
177       Isaac Jones, Colin Walters, Florian Weimer and Michael Vogt.
178

AUTHORS

180       Jason Gunthorpe
181
182       APT team
183

NOTES

185        1. Debian Security Infrastructure
186           https://www.debian.org/doc/manuals/securing-debian-howto/ch7
187
188        2. Strong Distribution HOWTO
189           http://www.cryptnet.net/fdp/crypto/strong_distro.html
190
191        3. APT bug page
192           http://bugs.debian.org/src:apt
193
194
195
196APT 2.5.5                       06 August 2016                   APT-SECURE(8)
Impressum