Debian Codegraph @

perl/signing-policy.lyx

raw
1 #LyX 1.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 2.15
3 \textclass article
4 \language default
5 \inputencoding latin1
6 \fontscheme default
7 \graphics default
8 \paperfontsize default
9 \spacing single
10 \papersize Default
11 \paperpackage a4
12 \use_geometry 0
13 \use_amsmath 0
14 \paperorientation portrait
15 \secnumdepth 3
16 \tocdepth 3
17 \paragraph_separation indent
18 \defskip medskip
19 \quotes_language english
20 \quotes_times 2
21 \papercolumns 1
22 \papersides 1
23 \paperpagestyle default
24
25 \layout Title
26
27 Progeny Package Signing Policy
28 \layout Author
29
30 John Goerzen <[email protected]>
31 \layout Date
32
33 Draft 2; February, 2001
34 \layout Section
35
36 Introduction & Background
37 \layout Standard
38
39 One weakness commonly associated with installing software off the Internet
40 -- or even a CD-ROM -- is verification of authenticity.
41 Can a system administrator really be sure that the packages he thinks he
42 is downloading from a Debian or Progeny mirror are really official packages?
43 Or that a CD-ROM contains the original packages? These days, it is not
44 impossibly difficult to intercept network traffic and insert trojan packages
45 in place of real ones, or to prepare a fake CD-ROM with a realistic-looking
46 label.
47 To thwart this, the ability to add GPG signatures to Debian packages is
48 being implemented.
49 These signatures add a cryptographic guarantee that the package is authentic
50 in a particular way.
51 \layout Standard
52
53 Each package may carry multiple signatures, and each signature may convey
54 unique information.
55 For instance, one signature might confirm that a legitimate Progeny developer
56 uploaded the package; another, that Progeny Quality Assurance has processed
57 the package; and a final one might confirm that a package is part of a
58 particular release.
59 \layout Standard
60
61 On each customer's computer is a file containing rules for authentication
62 of these GPG signatures.
63 The rules file describes which signatures are required, which are optional,
64 and what keys constitute a valid signature for each signature type.
65 Therefore, Progeny can ship rules that might say something like this:
66 \begin_inset Quotes eld
67 \end_inset
68
69 For each package to be installed, require the Progeny corporate signature,
70 a signature from the Quality Assurance team, and either a signature from
71 a Progeny developer that uploaded a Progeny package or an automated signature
72 indicating that the package came from Debian.
73 \layout Subsection
74
75 Goals
76 \layout Standard
77
78 There are several things that we would like to accomplish with this system.
79 Here is a list of many of them, an explanation of how we accomplish it,
80 and why it is valuable.
81 \layout Subsubsection
82
83 Progeny Developer Verification
84 \layout Standard
85
86 The first thing to check on a package is to verify that it was built by
87 an authorized Progeny developer.
88 To this end, we will have a maintainer (
89 \begin_inset Quotes eld
90 \end_inset
91
92 maint
93 \begin_inset Quotes erd
94 \end_inset
95
96 ) signature applied to each package at upload time by the person that built
97 it.
98 This key provides several benefits:
99 \layout Itemize
100
101 It provides a guarantee that the package was not modified by anyone else
102 within Progeny.
103 No malicious Progeny employee could modify the package on its way.
104 \layout Itemize
105
106 Customers can know that a package was unmodified from the time it was built.
107 \layout Standard
108
109 Additionally, if Progeny ever discovers that a particular developer was
110 malicious or dangerously incompetent in the building of packages, the packages
111 built by that person can be easily identified and can be rendered uninstallable.
112 \layout Subsubsection
113
114 Quality Assurance Verification
115 \layout Standard
116
117 Another useful point to check on a package is whether or not it has passed
118 through Progeny's Quality Assurance department.
119 By doing so, we can guarantee that no package bypassed the QA department
120 (either by accident or maliciously), and introduce an additional level
121 of verification.
122 By having this second signature present on the package, we reduce the damage
123 done if the key for an individual maintainer were to become compromised
124 in some way.
125 Because we have a maintainer signature already, we have already prevented
126 any malicious QA employee from modifying the package, but if Progeny does
127 at some time find cause to suspect a QA person of handling packages in
128 a dangerous way, the key can be removed and the packages rendered uninstallable
129 in the same manner as with the Debian maintainer signature.
130 \layout Subsubsection
131
132 General Malicious Employee Protection
133 \layout Standard
134
135 Because Progeny's business is so highly dependent upon secure and stable
136 software, if a malicious employee were to be ever hired, serious damage
137 could be done.
138 Package signatures and compartmentalization can be used together to provide
139 an effective weapon to significantly lessen the potential harm that could
140 be caused by such a person.
141 In general, the worst harm that could be inflicted upon Progeny by a malicious
142 employee would be the insertion of trojan or otherwise malicious code into
143 the packages that we distribute to customers and use ourselves.
144 The mechanisms outlined above can help to combat this threat in several
145 ways.
146 \layout Itemize
147
148 A malicious system administrator with full access to the machines on which
149 the archive is served from would ordinarily be able to modify the packages
150 on those machines and insert trojan code virtually undetected.
151 Since the packages had already gone through QA, and probably were already
152 installed on Progeny systems, the change would probably be noticed by customers
153 first.
154 With this system, the maintainer signature is applied before the package
155 is even uploaded to the archive in the first place, so any such change
156 would be immediately noticeable.
157 \layout Itemize
158
159 A malicious developer, often also with full access to the archive, could
160 bypass QA to get malicious code into the archive.
161 With this system, no package would be installable unless it bears a signature
162 from a valid QA employee.
163 \layout Itemize
164
165 A malicious QA employee could modify the package after it has been received
166 from the developers but before it is placed onto the archive.
167 With this proposal, such a change would be immediately noticed because
168 the maintainer signature check would fail.
169 \layout Subsubsection
170
171 General Malicious Outsider Protection
172 \layout Standard
173
174 Another category of problems that we have to worry about concern malicious
175 outsiders.
176 There are several ways that such a person could cause Progeny customers
177 to unknowingly install and run code that poses a security risk to them.
178 We can deal with most of them.
179 \layout Itemize
180
181 Someone could intercept the traffic between a customer's computer and the
182 Progeny archive, inserting data containing trojan code without the customer's
183 knowledge.
184 This is already possible and has been done.
185 By placing signatures on the packages, if they are modified any way during
186 download, the customer would immediately be aware.
187 \layout Itemize
188
189 By
190 \begin_inset Quotes eld
191 \end_inset
192
193 social engineering
194 \begin_inset Quotes erd
195 \end_inset
196
197 , that is, convincing someone through non-technical means to install a package,
198 a malicious person could convince one of our customers to install a package
199 that contains a security problem.
200 However, with signature verification, such a package would fail to install.
201 \layout Itemize
202
203 An outsider could replace the data in a current package with that from a
204 previous version of a package, perhaps one with known security vulnerabilities.
205 With our archive and release signatures, we can dramatically reduce the
206 potential pool of packages from which such a person could draw a signed
207 Progeny package containing a known security problem.
208 \layout Itemize
209
210 A cracker or someone else that gains unauthorized access to Progeny archives
211 could modify the .debs that customers download in-place, giving them code
212 that could pose a security risk.
213 With the mechanisms in this proposal, such a modification would cause multiple
214 signatures to fail, providing an instant way to know that the package had
215 been modified.
216 \layout Subsection
217
218 Unaddressed Issues
219 \layout Standard
220
221 While this proposal can deal with a great many potential problems that could
222 occur, there are still several problems that cannot be dealt with solely
223 within the scope of this system.
224 Here are some of them that we should be aware of.
225 \layout Itemize
226
227 A cracker obtaining root maliciously on a customer's machine could bypass
228 all of the checks that are in place here.
229 Such a person could install fake versions of the verifier that could report
230 false positives.
231 In general, if root is compromised, we can no longer make any assumptions
232 about the security of the customer's machine.
233 \layout Itemize
234
235 A cracker or internal person that has obtained root on a Progeny developer's
236 machine could alter files such that packages built by that developer would
237 contain trojan code that the developer may not be aware of.
238 Hopefully, this would be detected during the QA process, but there is no
239 guarantee of that.
240 Such a cracker could also replace GPG with a program that could surreptitiously
241 gather the developer's secret key and passphrase, causing a compromise
242 of the developer's secret key.
243 Again, once someone has obtained root, we can no longer make any assumptions
244 about the security of the machine.
245 \layout Itemize
246
247 We must have a secure way to get the initial keyring and software to the
248 customer.
249 This is a question of how far we go to make the guarantee.
250 Some options include placing the software behind a HTTPS site that bears
251 a signature from a well-known certifying authority.
252 However, if someone's web browser has already been modified by a malicious
253 person, even this would not guarantee success.
254 Another option is to distribute the initial software and keys via CD-ROM
255 shipped directly from our office, though once again, a malicious person
256 could prepare a fake CD-ROM bearing a realistic-looking label and ship
257 it to a customer.
258 These are questions that we have to deal with outside the framework of
259 the package signing software itself, and basically rely upon striking an
260 acceptable balance between paranoia and ease of use.
261 \layout Section
262
263 Criteria For Verification
264 \layout Standard
265
266 The verification process is that which is performed on a customer's machine
267 when a package is to be installed.
268 Verification software has configurable criteria to indicate what signatures
269 are necessary to consider a package to be valid.
270 While the verification policy is up to each individual system administrator,
271 we must supply a default.
272 A package from Progeny will consider to pass the tests if all of these
273 criteria are met:
274 \layout Itemize
275
276 The package must bear an
277 \begin_inset Quotes eld
278 \end_inset
279
280 origin
281 \begin_inset Quotes erd
282 \end_inset
283
284 signature made by a designated origin key.
285 \layout Itemize
286
287 The package must bear a quality assurance (
288 \begin_inset Quotes eld
289 \end_inset
290
291 qa
292 \begin_inset Quotes erd
293 \end_inset
294
295 ) signature made by a member of the Progeny QA team.
296 \layout Itemize
297
298 The package must have a maintainer (
299 \begin_inset Quotes eld
300 \end_inset
301
302 maint
303 \begin_inset Quotes erd
304 \end_inset
305
306 ) signature from either:
307 \begin_deeper
308 \layout Itemize
309
310 A member of the Progeny development team; or
311 \layout Itemize
312
313 An automated signature applied to packages imported unmodified from Debian.
314 \end_deeper
315 \layout Standard
316
317 Possible modifications that we could consider making would be to change
318 some of the logic from
319 \begin_inset Quotes eld
320 \end_inset
321
322 and
323 \begin_inset Quotes erd
324 \end_inset
325
326 to
327 \begin_inset Quotes eld
328 \end_inset
329
330 or
331 \begin_inset Quotes erd
332 \end_inset
333
334 , thus permitting installation even if one signature is missing or somehow
335 invalid.
336 This could make dealing with situations involving lost keys, changing employees
337 , and upgrades easier, but comes at the expense of opening up some potential
338 malicious employee attacks.
339 \layout Section
340
341 Procedures For Signing
342 \layout Standard
343
344 Keys can be added to packages during the development cycle.
345 At each step, we should ensure that all existing keys on the package are
346 valid.
347 The first signature on a package will be added by either the Progeny developer
348 responsible for it or the system that is installing the package from Debian.
349 The next signature will be added by the person in QA that approves the
350 package.
351 After that, the origin signature should be added, and finally, when the
352 package is placed into the archive, an archive signature should be added.
353 All signatures except automated ones are to be made by personal keys.
354 Progeny will maintain keyrings of valid developer and QA keys.
355 Below, the meaning and procedures for each Progeny signature are described.
356 \layout Subsection
357
358 Maintainer Signature
359 \layout Standard
360
361 The maintainer signature is named
362 \begin_inset Quotes eld
363 \end_inset
364
365 maint
366 \begin_inset Quotes erd
367 \end_inset
368
369 .
370 It is to be applied to any package uploaded into the archive by a Progeny
371 developer.
372 The maintainer signature is made with that developer's own GPG key.
373 Its purpose is to let the customer verify that the package was indeed worked
374 on by an authorized Progeny employee.
375 \layout Standard
376
377 Many packages (a majority, in fact) appear in the Progeny distribution directly
378 from Debian with no modification or intervention from Progeny employees.
379 There is no real Progeny developer or uploader in charge of these packages.
380 For these situations, a special key should be generated.
381 A signature from that key should be automatically added to packages that
382 come through from Debian.
383 The username and description for that key should make clear that it does
384 not originate from a particular Progeny developer.
385 \layout Subsection
386
387 Quality Assurance
388 \layout Standard
389
390 As packages move into the distribution, we anticipate that they will be
391 screened by QA.
392 To that end, a
393 \begin_inset Quotes eld
394 \end_inset
395
396 qa
397 \begin_inset Quotes erd
398 \end_inset
399
400 signature will be made for the package.
401 It will be made using the GPG key of the specific QA employee that approves
402 the package.
403 Any package bearing a valid QA signature can thus be assumed to have passed
404 their testing for the distribution.
405 There should be no case in which this key is added automatically.
406 An exception may need to be made for initial bootstrapping; that is, dealing
407 with the thousands of packages already in the distribution prior to QA
408 procedures.
409 \layout Subsection
410
411 Origin
412 \layout Standard
413
414 The only key that must be present in the debsigs system is
415 \begin_inset Quotes eld
416 \end_inset
417
418 origin
419 \begin_inset Quotes erd
420 \end_inset
421
422 .
423 This key certifies the originator of the package (in this case, Progeny
424 Linux Systems) and lets the signature verifier load the appropriate ruleset
425 for the verification of signatures.
426 This key will probably be added automatically, using our corporate key
427 or some designated origin key that bears its signature.
428 \layout Section
429
430 Safeguarding Keys
431 \layout Standard
432
433 The task of safeguarding individual keys is already well-known, understood,
434 and easily manageable.
435 However, safeguarding keys that are used by many people or to apply automated
436 signatures gets more difficult.
437 In some cases, the security of these is not as important -- for instance,
438 an archive key will not inflict much damange if compromised.
439 However, in other cases, the security is still quite important.
440 \layout Standard
441
442 Safeguarding of individual keys is a well-known problem with well-documented
443 answers.
444 To provide a comprehensive system, there are also other cases that we need
445 to consider, which are spelled out below.
446 \layout Section
447
448 Special Cases & Procedures
449 \layout Standard
450
451 While the policy laid out here will work smoothly for day-to-day operation,
452 things can go wrong or get confused and planning for them is a must.
453 In this section, I describe some special cases that can face us, what they
454 mean for the package signing system, and how we can prepare for them ahead
455 of time and deal with them when they occur.
456 \layout Subsection
457
458 Employee Leaves
459 \layout Standard
460
461 If a Progeny employee leaves the company for some reason, and this person
462 was someone whose key was used to create signatures for packages that are
463 used by customers, then Progeny will need to decide, on a case-by-case
464 basis, several things:
465 \layout Itemize
466
467 Do we have any reason to believe that the packages in the archive now bearing
468 this person's signature are in any way damaged or tampered with?
469 \layout Itemize
470
471 Do we have any reason to believe that this person may, in the future, intend
472 to inflict harm on Progeny through the use of the key used to apply those
473 signatures?
474 \layout Standard
475
476 If the answer to the first question is
477 \begin_inset Quotes eld
478 \end_inset
479
480 yes
481 \begin_inset Quotes erd
482 \end_inset
483
484 , then we would immediately need to remove the key of this employee from
485 all keyrings and rebuild the effected packages.
486 If the answer to the second question is
487 \begin_inset Quotes eld
488 \end_inset
489
490 yes
491 \begin_inset Quotes erd
492 \end_inset
493
494 , then we would need to immediately remove this person's key from all internal
495 keyrings (such that the maintainer signature check made by QA would fail
496 if somehow the person uploads a package after leaving the company), but
497 removing the key from the external keyrings is not a priority and can be
498 done at a more leisurely pace.
499 If both answers are
500 \begin_inset Quotes eld
501 \end_inset
502
503 no
504 \begin_inset Quotes erd
505 \end_inset
506
507 , then Progeny should, as a precaution, rebuild packages signed by that
508 user eventually, but there is no need to do so before the next release.
509 \layout Subsection
510
511 People Join Progeny
512 \layout Standard
513
514 When a new person is hired for a development or QA position, this person
515 will need to generate a personal key and have it inserted onto the keyring.
516 Customers will not be able to verify a signature made by this new person
517 until they have upgraded their Progeny keyring package.
518 Once that is done, packages will be able to verify with no difficulty.
519 We may need to ensure that the new keyring package gets installed early
520 in any upgrade procedure, but beyond that, there is little that we must
521 do specially in this case.
522 Note, though, that an existing employee must be the one to sign the new
523 keyring package.
524 \layout Subsection
525
526 Many Employees Leave
527 \layout Standard
528
529 In the event that enough employees from a particular department leave the
530 company such that there no longer exists anyone with a key that can make
531 a valid signature for a particular category, we need to have a way to allow
532 customers to continue receiving updates in a secure fashion.
533 For this purpose, I suggest that Progeny create a generic key for both
534 the QA and maintainer categories, store it in some physically secure area
535 (such as a safe or deposit box) on removable media in a fashion that only
536 authorized company officers could get the key in an emergency.
537 The public key would be inserted on the distributed keyring files, but
538 would never be used unless absolutely necessary.
539 \layout Subsection
540
541 Key Compromises
542 \layout Standard
543
544 If a key becomes compromised (that is, an intruder obtains the secret key
545 and passphrase, enabling unauthorized signatures), then we must take steps
546 to rectify the problem immediately.
547 Depending on the type of key that was compromised and the circumstances,
548 we might opt to immediately remove the compromised key from all keyrings
549 and rebuild any effected packages.
550 In all cases, the victim of the compromise should issue a revocation
551 certificate, discard the old key, and generate a new one for future use.
552 \layout Subsection
553
554 Compartmentalization
555 \layout Standard
556
557 One of the benefits of having multiple signatures on a package is to reduce
558 the damage that can be inflicted if one of those keys becomes untrusted
559 in some fashion.
560 For this reason, we should make sure that we do not have overlap between
561 those that make signatures for different parts of the operation.
562 Specifically, nobody should be both on the maintainer and the QA keyring.
563 \layout Section
564
565 Future Options
566 \layout Standard
567
568 In the course of preparing this policy, some ideas were discussed but discarded
569 for the moment.
570 This section will explain them as possible options for future use.
571 \layout Subsection
572
573 Goal: Release & Dating of Packages
574 \layout Standard
575
576 One potential problem that could arise for a customer is that a malicious
577 person could present an old package as if it were current.
578 If this old package contains problems, such as known security vulnerabilities,
579 doing so could be an avenue for attack.
580 Preventing this problem entirely is not really feasible; however, we can
581 significantly lessen the potential vulnerability by providing a limited
582
583 \begin_inset Quotes eld
584 \end_inset
585
586 window
587 \begin_inset Quotes erd
588 \end_inset
589
590 of time for which we consider a particular package valid.
591 \layout Standard
592
593 For this situation, we must consider CD-ROM and online distribution separately.
594 For online distribution, we can apply an
595 \begin_inset Quotes eld
596 \end_inset
597
598 archive
599 \begin_inset Quotes erd
600 \end_inset
601
602 signature, automatically, to each package in the archive.
603 Because all signatures contain a timestamp indicating when they were made,
604 the signature verifier on the customer's machine can ensure that the signature
605 was placed on the package within a certain timeframe -- for example, two
606 weeks.
607 On our side, we would automatically re-sign all packages with the archive
608 key periodically -- in this example, perhaps once a week.
609 In this way, a customer installing a package knows that it is no more than
610 two weeks out of date.
611 Packages distributed via CD-ROM will either not have the archive signature
612 or will have it ignored.
613 \layout Standard
614
615 This solution won't work for a CD-ROM because they are frequently used more
616 than two weeks from the release and because there is no way to propagate
617 signature updates to people using them.
618 Therefore, the best we can do is guarantee the customer that a given package
619 is indeed part of the release that is expected -- that is, if Progeny 2.1
620 is current, that a given package was released as part of Progeny 2.1 and
621 does not date back to version 1.1.
622 Another benefit of the release signature is that it can be virtually uncompromi
623 sable.
624 The release signature can be applied to the packages at release time, and
625 then the key behind it can be destroyed.
626 However, as a practical matter, we will need to publish at least one future
627 release key in the current keyring so that people upgrading will be able
628 to do so in a secure fashion.
629 \layout Subsubsection
630
631 Archive
632 \layout Standard
633
634 The
635 \begin_inset Quotes eld
636 \end_inset
637
638 archive
639 \begin_inset Quotes erd
640 \end_inset
641
642 signature is to be automatically applied by dinstall when a package is
643 installed into Progeny's publically-accessible archive, regardless of the
644 particular area that it is installed into.
645 A valid signature can be used to assure that a package was indeed posted
646 by Progeny on a specific date.
647 \layout Subsubsection
648
649 Release
650 \layout Standard
651
652 The release key should be kept in a secure, safe place accessible only by
653 authorized company officers prior to use.
654 After it has been used, it should be permanently destroyed.
655 Release keys will need to be generated at least one release ahead of use
656 to provide a suitable upgrade path for users.
657 \the_end