Jump to content

Secure by design: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
That's generally source code.
(18 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{Short description|Software engineering approach}}
{{Short description|Software engineering approach, in which the alternate security strategies, tactics and patterns are first evaluated; among them, the best are selected and enforced by the architecture design, and then used as guiding principles for developers}}
{{How-to|date=June 2022}}
{{Information security}}


'''Secure by design''', in [[software engineering]], means that software products and capabilities have been [[Software design|designed]] to be foundationally [[Application security|secure]].
'''Secure by design''', in [[software engineering]], means that software products and capabilities have been [[Software design|designed]] to be foundationally [[Application security|secure]].


Alternate security strategies, tactics and patterns are considered at the beginning of a software design, and the best are selected and enforced by the architecture, and they are used as guiding principles for [[Software Developers|developers]].<ref>{{cite journal |title=A Catalog of Security Architecture Weaknesses |journal=2017 IEEE International Conference on Software Architecture (ICSA) |doi=10.1109/ICSAW.2017.25}}</ref> It is also encouraged to use strategic design patterns that have beneficial effects on security, even though those design patterns were not originally devised with security in mind. <ref>{{cite book |title=Secure By Design |last=Manning |date=2019 |isbn=9781617294358}} </ref>
Alternate security strategies, tactics and patterns are considered at the beginning of a software design, and the best are selected and enforced by the architecture, and they are used as guiding principles for [[Software Developers|developers]].<ref>{{cite book |year=2017 |doi=10.1109/ICSAW.2017.25|last1=Santos |first1=Joanna C. S. |last2=Tarrit |first2=Katy |last3=Mirakhorli |first3=Mehdi |title=2017 IEEE International Conference on Software Architecture Workshops (ICSAW) |chapter=A Catalog of Security Architecture Weaknesses |pages=220–223 |isbn=978-1-5090-4793-2 |s2cid=19534342 }}</ref> It is also encouraged to use strategic design patterns that have beneficial effects on [[Computer security|security]], even though those design patterns were not originally devised with security in mind.<ref>{{cite book |title=Secure By Design |publisher=Manning Publications| author1=Dan Bergh Johnsson|author2 = Daniel Deogun|author3=Daniel Sawano |date=2019 |isbn=9781617294358}}</ref>


Secure by Design is increasingly becoming the mainstream development approach to ensure security and [[privacy]] of software systems. In this approach, security is considered and built into the system at every layer and starts with a robust architecture design. Security architectural design decisions are based on well-known security strategies, tactics, and patterns defined as reusable techniques for achieving specific quality concerns. Security tactics/patterns provide solutions for enforcing the necessary [[authentication]], authorization, confidentiality, [[data integrity]], privacy, accountability, availability, safety and non-repudiation requirements, even when the system is under attack.<ref>{{cite journal |title=Growing a pattern language (for security) |journal=Onward! 2012: Proceedings of the ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software |doi=10.1145/2384592.2384607 |pages=139–158 |date=October 2012}}</ref>
Secure by Design is increasingly becoming the mainstream development approach to ensure security and [[privacy]] of software systems. In this approach, security is considered and built into the system at every layer and starts with a robust architecture design. Security architectural design decisions are based on well-known security strategies, tactics, and patterns defined as reusable techniques for achieving specific quality concerns. Security tactics/patterns provide solutions for enforcing the necessary [[authentication]], authorization, confidentiality, [[data integrity]], privacy, accountability, availability, safety and non-repudiation requirements, even when the system is under attack.<ref>{{cite book |doi=10.1145/2384592.2384607 |pages=139–158 |date=October 2012|last1=Hafiz |first1=Munawar |last2=Adamczyk |first2=Paul |last3=Johnson |first3=Ralph E. |title=Proceedings of the ACM international symposium on New ideas, new paradigms, and reflections on programming and software |chapter=Growing a pattern language (For security) |isbn=9781450315623 |s2cid=17206801 }}</ref>
In order to ensure the security of a software system, not only it is important to design a robust security architecture (intended) but also it is necessary to persistently map updated security strategies, tactics and patterns to software development to preserve security.
In order to ensure the security of a software system, not only is it important to design a robust intended security architecture but it is also necessary to map updated security strategies, tactics and patterns to software development in order to maintain security persistence.


==Expect attacks==
==Expect attacks==
Line 13: Line 13:


==Avoid security through obscurity==
==Avoid security through obscurity==
Generally, designs that work well do not [[Security through obscurity|rely on being secret]]. Often, secrecy reduces the number of attackers by demotivating a subset of the threat population. The logic is that if there is an increase in complexity for the attacker, the increased attacker effort to compromise the target. While this technique implies reduced inherent risks, a virtually infinite set of threat actors and techniques applied over time will cause most secrecy methods to fail. While not mandatory, proper security usually means that everyone is allowed to know and understand the design ''because it is secure''. This has the advantage that many people are looking at the [[computer code]], which improves the odds that any flaws will be found sooner (see [[Linus's law]]). Attackers can also obtain the code, which makes it easier for them to find [[Vulnerability (computing)|vulnerabilities]] as well.
Generally, designs that work well do not [[Security through obscurity|rely on being secret]]. Often, secrecy reduces the number of attackers by demotivating a subset of the threat population. The logic is that if there is an increase in complexity for the attacker, the increased attacker effort to compromise the target will discourage them. While this technique implies reduced inherent risks, a virtually infinite set of threat actors and techniques applied over time will cause most secrecy methods to fail. While not mandatory, proper security usually means that everyone is allowed to know and understand the design ''because it is secure''. This has the advantage that many people are looking at the [[source code]], which improves the odds that any flaws will be found sooner (see [[Linus's law]]). The disadvantage is that attackers can also obtain the code, which makes it easier for them to find [[Vulnerability (computing)|vulnerabilities]] to exploit. It is generally believed, though, that the advantage of the open source code outweighs the disadvantage.


==Fewest privileges==
==Fewest privileges==
Also, it is important that everything works with the fewest [[privilege (computer science)|privileges]] possible (see the [[principle of least privilege]]). For example, a [[Web server]] that runs as the [[superuser|administrative user]] ("root" or admin) can have the privilege to remove files and users that do not belong. A flaw in such a program could put the entire system at risk, whereas a Web server that runs inside an [[sandbox (computer security)|isolated environment]] and only has the privileges for required [[computer network|network]] and [[filesystem]] functions, cannot compromise the system it runs on unless the security around it is in itself also flawed.
Also, it is important that everything works with the fewest [[privilege (computer science)|privileges]] possible (see the [[principle of least privilege]]). For example, a [[web server]] that runs as the [[superuser|administrative user]] ("root" or "admin") can have the privilege to remove files and users. A flaw in such a program could therefore put the entire system at risk, whereas a web server that runs inside an [[sandbox (computer security)|isolated environment]], and only has the privileges for required [[computer network|network]] and [[filesystem]] functions, cannot compromise the system it runs on unless the security around it in itself is also flawed.


== Methodologies ==
== Methodologies ==
Secure Design should be a consideration at all points in the development lifecycle (whichever [[Software_development_process|development methodology]] is chosen).
Secure Design should be a consideration at all points in the development lifecycle (whichever [[Software development process|development methodology]] is chosen). Some pre-built Secure By Design development methodologies exist (e.g. [[Microsoft Security Development Lifecycle]]).


== Standards and legislation ==
Some pre-built Secure By Design development methodologies exist (e.g. [[Microsoft Security Development Lifecycle]]).
{{Main|Application security#Security standards and regulations}}


=== Microsoft Security Development Lifecycle ===
{{Main|Microsoft Security Development Lifecycle}}
[[Microsoft]] issued methodology and guidance based on the classical [[spiral model]].

== Standards and Legislation ==
{{Main | Application security#Security standards and regulations}}
Standards and Legislation exist to aide secure design by controlling the definition of "Secure", and providing concrete steps to testing and integrating secure systems.
Standards and Legislation exist to aide secure design by controlling the definition of "Secure", and providing concrete steps to testing and integrating secure systems.


Line 41: Line 36:


Another key feature to client-server security design is [[Best coding practices|good coding practices]]. For example, following a known software design structure, such as client and broker, can help in designing a well-built structure with a solid foundation. Furthermore, if the software is to be modified in the future, it is even more important that it follows a logical foundation of separation between the client and server. This is because if a programmer comes in and cannot clearly understand the dynamics of the program, they may end up adding or changing something that can add a security flaw. Even with the best design, this is always a possibility, but the better the standardization of the design, the less chance there is of this occurring.
Another key feature to client-server security design is [[Best coding practices|good coding practices]]. For example, following a known software design structure, such as client and broker, can help in designing a well-built structure with a solid foundation. Furthermore, if the software is to be modified in the future, it is even more important that it follows a logical foundation of separation between the client and server. This is because if a programmer comes in and cannot clearly understand the dynamics of the program, they may end up adding or changing something that can add a security flaw. Even with the best design, this is always a possibility, but the better the standardization of the design, the less chance there is of this occurring.

==References==
{{Reflist}}


==See also==
==See also==
Line 53: Line 45:
* [[Security through obscurity]]
* [[Security through obscurity]]
* [[Software Security Assurance]]
* [[Software Security Assurance]]

==References==
{{Reflist}}


==External links==
==External links==
* [http://www.tldp.org/HOWTO/Secure-Programs-HOWTO/index.html Secure Programming for Linux and Unix HOWTO]
* [https://tldp.org/HOWTO/Secure-Programs-HOWTO/ Secure Programming for Linux and Unix HOWTO]
* [http://www.faqs.org/faqs/unix-faq/programmer/secure-programming/ Secure UNIX Programming FAQ]
* [http://www.faqs.org/faqs/unix-faq/programmer/secure-programming/ Secure UNIX Programming FAQ]
* [https://www.securecoding.cert.org/confluence/display/seccode/Top+10+Secure+Coding+Practices Top 10 Secure Coding Practices]
* [https://www.securecoding.cert.org/confluence/display/seccode/Top+10+Secure+Coding+Practices Top 10 Secure Coding Practices]
* [https://www.owasp.org/index.php/Security_by_Design_Principles Security by Design Principles]
* [https://www.owasp.org/index.php/Security_by_Design_Principles Security by Design Principles]


{{Information security}}


{{Computer science}}
{{Computer science}}


[[Category:Computer security procedures]]
[[Category:Software quality]]
[[Category:Software quality]]
[[Category:Articles with example C code]]
[[Category:Software development philosophies]]
[[Category:Software development philosophies]]
[[Category:Software development process]]
[[Category:Software development process]]
[[Category:Computer security]]
[[Category:Computer security procedures]]

Revision as of 21:29, 30 June 2024

Secure by design, in software engineering, means that software products and capabilities have been designed to be foundationally secure.

Alternate security strategies, tactics and patterns are considered at the beginning of a software design, and the best are selected and enforced by the architecture, and they are used as guiding principles for developers.[1] It is also encouraged to use strategic design patterns that have beneficial effects on security, even though those design patterns were not originally devised with security in mind.[2]

Secure by Design is increasingly becoming the mainstream development approach to ensure security and privacy of software systems. In this approach, security is considered and built into the system at every layer and starts with a robust architecture design. Security architectural design decisions are based on well-known security strategies, tactics, and patterns defined as reusable techniques for achieving specific quality concerns. Security tactics/patterns provide solutions for enforcing the necessary authentication, authorization, confidentiality, data integrity, privacy, accountability, availability, safety and non-repudiation requirements, even when the system is under attack.[3] In order to ensure the security of a software system, not only is it important to design a robust intended security architecture but it is also necessary to map updated security strategies, tactics and patterns to software development in order to maintain security persistence.

Expect attacks

Malicious attacks on software should be assumed to occur, and care is taken to minimize impact. Security vulnerabilities are anticipated, along with invalid user input.[4] Closely related is the practice of using "good" software design, such as domain-driven design or cloud native, as a way to increase security by reducing risk of vulnerability-opening mistakes—even though the design principles used were not originally conceived for security purposes.

Avoid security through obscurity

Generally, designs that work well do not rely on being secret. Often, secrecy reduces the number of attackers by demotivating a subset of the threat population. The logic is that if there is an increase in complexity for the attacker, the increased attacker effort to compromise the target will discourage them. While this technique implies reduced inherent risks, a virtually infinite set of threat actors and techniques applied over time will cause most secrecy methods to fail. While not mandatory, proper security usually means that everyone is allowed to know and understand the design because it is secure. This has the advantage that many people are looking at the source code, which improves the odds that any flaws will be found sooner (see Linus's law). The disadvantage is that attackers can also obtain the code, which makes it easier for them to find vulnerabilities to exploit. It is generally believed, though, that the advantage of the open source code outweighs the disadvantage.

Fewest privileges

Also, it is important that everything works with the fewest privileges possible (see the principle of least privilege). For example, a web server that runs as the administrative user ("root" or "admin") can have the privilege to remove files and users. A flaw in such a program could therefore put the entire system at risk, whereas a web server that runs inside an isolated environment, and only has the privileges for required network and filesystem functions, cannot compromise the system it runs on unless the security around it in itself is also flawed.

Methodologies

Secure Design should be a consideration at all points in the development lifecycle (whichever development methodology is chosen). Some pre-built Secure By Design development methodologies exist (e.g. Microsoft Security Development Lifecycle).

Standards and legislation

Standards and Legislation exist to aide secure design by controlling the definition of "Secure", and providing concrete steps to testing and integrating secure systems.

Some examples of standards which cover or touch on Secure By Design principles:

  • ETSI TS 103 645 [5] which is included in part in the UK Government "Proposals for regulating consumer smart product cyber security" [6]
  • ISO/IEC 27000-series covers many aspects of secure design.

Server/client architectures

In server/client architectures, the program at the other side may not be an authorised client and the client's server may not be an authorised server. Even when they are, a man-in-the-middle attack could compromise communications.

Often the easiest way to break the security of a client/server system is not to go head on to the security mechanisms, but instead to go around them. A man in the middle attack is a simple example of this, because you can use it to collect details to impersonate a user. Which is why it is important to consider encryption, hashing, and other security mechanisms in your design to ensure that information collected from a potential attacker won't allow access.

Another key feature to client-server security design is good coding practices. For example, following a known software design structure, such as client and broker, can help in designing a well-built structure with a solid foundation. Furthermore, if the software is to be modified in the future, it is even more important that it follows a logical foundation of separation between the client and server. This is because if a programmer comes in and cannot clearly understand the dynamics of the program, they may end up adding or changing something that can add a security flaw. Even with the best design, this is always a possibility, but the better the standardization of the design, the less chance there is of this occurring.

See also

References

  1. ^ Santos, Joanna C. S.; Tarrit, Katy; Mirakhorli, Mehdi (2017). "A Catalog of Security Architecture Weaknesses". 2017 IEEE International Conference on Software Architecture Workshops (ICSAW). pp. 220–223. doi:10.1109/ICSAW.2017.25. ISBN 978-1-5090-4793-2. S2CID 19534342.
  2. ^ Dan Bergh Johnsson; Daniel Deogun; Daniel Sawano (2019). Secure By Design. Manning Publications. ISBN 9781617294358.
  3. ^ Hafiz, Munawar; Adamczyk, Paul; Johnson, Ralph E. (October 2012). "Growing a pattern language (For security)". Proceedings of the ACM international symposium on New ideas, new paradigms, and reflections on programming and software. pp. 139–158. doi:10.1145/2384592.2384607. ISBN 9781450315623. S2CID 17206801.
  4. ^ Dougherty, Chad; Sayre, Kirk; Seacord, Robert C.; Svoboda, David; Togashi, Kazuya (October 2009). "Secure Design Patterns". doi:10.1184/R1/6583640.v1. {{cite journal}}: Cite journal requires |journal= (help)
  5. ^ "ETSI TS 103 645" (PDF).
  6. ^ "Policy paper: Proposals for regulating consumer smart product cyber security - call for views".