Skip to content

Commit da321ff

Browse files
authored
Merge pull request #3 from SystemsApproach/principles
First pass on principles.rst
2 parents 45a3740 + e2c8355 commit da321ff

File tree

2 files changed

+87
-13
lines changed

2 files changed

+87
-13
lines changed

intro.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,5 +358,7 @@ from Saltzer and Kaashoek.
358358
.. admonition:: Further Reading
359359

360360
J. Saltzer and F. Kaashoek. `Principles of Computer System Design: An
361-
Introduction. Chapter 11 <https://ocw.mit.edu/courses/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/pages/online-textbook/>`__.
361+
Introduction. Chapter 11
362+
<https://ocw.mit.edu/courses/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/pages/online-textbook/>`__. Morgan
363+
Kaufmann Publishers, 2009.
362364

principles.rst

Lines changed: 84 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ secret. The idea is that rather than trying to keep something as large
169169
and complex as an encryption algorithm secret, it is better for that
170170
algorithm to be published and only the key(s) be secret. There are two
171171
reasons for this principle:
172+
172173
* It is hard to keep an algorithm secret, especially if it is in
173174
widespread use as is the case with encryption on the Internet;
174175
* Making security mechanisms robust against all forms of attack is, as
@@ -215,7 +216,89 @@ such old ideas as network firewalls and virtual private networks,
215216
along with more modern approaches such as microsegmentation and
216217
zero-trust architectures. We will discuss these developments in a later chapter.
217218

218-
219+
2.2.5 Least Common Mechanism
220+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221+
222+
This principle states that the amount of mechanism that is common to
223+
more than one user should be minimized. In operating systems, this
224+
would imply that a piece of mechanism should not be baked into the
225+
kernel if it could be provided in some other way, e.g., as a
226+
library. This principle, applied in the context of network security,
227+
shows up in the end-to-end argument: we avoid putting functions such
228+
as encryption into the network when the user is likely to need
229+
end-to-end encryption anyway.
230+
231+
232+
2.2.6 Design for Iteration
233+
~~~~~~~~~~~~~~~~~~~~~~~~~~
234+
235+
Given what we have said about the difficulty of knowing that a system
236+
is secure, a useful design principle is to accept that we will need to
237+
iterate, and design for it. A good example of this is in the choice of
238+
particular cryptographic algorithms for integrity protection or
239+
encryption. These algorithms are often found to be insufficiently
240+
strong after some number of years, perhaps due to a weakness in the
241+
underlying mathematics, or breakthroughs in algorithms, or just the
242+
steady improvement in computing power that happens over time. Thus,
243+
any protocol that is developed that depends on such an algorithm
244+
should be designed such that a change of algorithm is an expected
245+
behavior. We see this in protocols such as Transport Layer Security
246+
(TLS) which includes a set of procedures by which two participants
247+
negotiate the cryptographic algorithms to be used.
248+
249+
Recent developments in quantum computing have raised the issue that
250+
many existing forms of cryptographic algorithm may need to be
251+
replaced. While the timeframe in which such a change will be needed
252+
remains a subject of debate, the safe choice is to accept that
253+
cryptographic algorithms will periodically need to be replaced.
254+
255+
2.2.7 Audit Trails
256+
~~~~~~~~~~~~~~~~~~
257+
258+
Part of dealing with the impossibility of covering all possible
259+
security threats is to accept that sometimes we need to analyze what
260+
has gone wrong. This leads to the idea that security needs to be
261+
auditable. For example, it will be easier to conduct a post-mortem of
262+
a breach involving compromised login credentials if every login
263+
attempt is logged, along with information such as whether the login
264+
came over a VPN, what IP address was used, and so on. Similarly it is
265+
very hard to prevent insider attacks, but suitable logging might both
266+
make it easier to detect such attacks quickly and to deter those who
267+
might undertake them.
268+
269+
In a different vein, consider the design of secure protocols. The
270+
specification for TLS (transport layer security) describes a large
271+
number of error conditions that may trigger alerts, and recommends the
272+
logging of all such alerts. Such logging would help in understanding
273+
if the protocol was subject to an attack that involved incorrect or
274+
unexpected messages. Given the complexity of negotiations that go on
275+
in security protocols (to establish cryptographic algorithms and
276+
parameters, for example) it is wise to assume that these may have
277+
subtle bugs, and a good set of audit tools will enable any such bugs
278+
to be detected and then remedied.
279+
280+
Of course, the audit mechanisms themselves must be designed to be
281+
secure. A determined attacker will, in all likelihood, try to erase their tracks,
282+
so logging for audit purposes cannot just be an afterthought; it has
283+
to be part of the design of a secure system.
284+
285+
286+
287+
288+
2.3 Summary
289+
-----------
290+
291+
292+
Just as we can never be quite sure that we have covered all possible
293+
vectors of attack against a system, there is no hard limit to the set of
294+
principles that can be applied to developing secure systems. The
295+
principles covered above include several that were drawn from the
296+
influential paper by Saltzer and Schroeder from 1975. That is the same
297+
Saltzer whose book (with Kaashoek) we referred to in Chapter 1. The
298+
fact that many of the principles from the 1975 paper reappear in the
299+
2009 is probably a sign that Saltzer had some confidence that these
300+
principles have stood the test of time. We recommend reading the
301+
entire paper.
219302

220303
.. admonition:: Further Reading
221304

@@ -226,18 +309,7 @@ zero-trust architectures. We will discuss these developments in a later chapter
226309

227310

228311

229-
.. working list of ideas
230-
safety net
231-
232-
Be Explicit
233-
234-
Design for Iteration
235-
236-
Audit
237-
238-
239312

240-
economy of mechanism
241313

242314

243315

0 commit comments

Comments
 (0)