You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -75,18 +81,86 @@ If the answer to one or more of those questions is yes, consider putting a limit
75
81
76
82
More often than not, rate limiting should be as specific as possible. For instance, it is better to add rate limiting on a single GraphQL type than to add a generic limit to the entire /GraphQL endpoint.
77
83
78
-
## Principle of Least Privilege
84
+
## Zero Trust Model
85
+
86
+
### Principle of Least Privilege
79
87
80
88
Sometimes known as the Principle of Minimal Privilege or the Principle of Least Authority, the Principle of Least Privilege (PoLP) means that every entity* is only strictly given the essential privileges needed to perform its requirement.
81
89
82
90
E.g. A script that executes on a cron schedule that monitors the output of a log file only needs read privileges and should not be given write privileges.
83
91
84
92
**Entity: generic term for an arbitrary process, user, program, etc. found within a Data System*
85
93
86
-
### Benefits of the Principle
94
+
####Benefits of the Principle
87
95
88
96
***Better Data System Stability** - When an entity is limited in the scope of changes it can make to a system, it is easier to test its possible actions and interactions in the context of the Data System.
89
97
***Better Data System Security** - When an entity is limited in the system-wide actions it may perform, vulnerabilities / compromises in one application cannot be used to exploit the rest of the business or adjacent Data Systems.
90
98
***Ease of Deployment** - In general, the fewer privileges an entity requires, the easier it is to deploy within a larger environment.
Zero Trust is not only about controlling user access, but requires strict controls on device access as well. With this, Zero Trust systems need to monitor how many different devices are trying to access their network, ensure that every device is authorized, and assess all devices to make sure they have not been compromised. This further minimizes the attack surface of the network.
104
+
105
+
### Microsegmentation
106
+
107
+
Microsegmentation is the practice of breaking up security perimeters into small zones to maintain separate access for separate parts of the network. Some of the benefits of doing so are:
108
+
* Granular Access Policies - we can create super specific policies for access to each segment!
109
+
* Targeted Security Controls - we can develop each micro-perimeter to specifically target the security risks and vulnerabilities of the resources in that micro-segment!
110
+
* Establishing Identities and Trust - we can implement, monitor, and control the “never trust, always verify” principle much easier!
111
+
112
+
### Preventing Lateral Movement
113
+
114
+
Zero Trust is designed to contain attackers so that they can not move laterally. You may be asking what does that even mean? In network security, “lateral movement” is when an attacker moves within a network after gaining access to it, which can be very difficult to detect.
115
+
116
+
Zero Trust helps contain attackers because the access is segmented and has to be reestablished periodically, limiting them from moving across to other microsegments within the network.
117
+
118
+
### Multi Factor Authentication
119
+
120
+
It's no surprise that MFA is a core part of the Zero Trust Model. Systems using MFA require more than one piece of evidence to authenticate a user, with the most common form being a one time password (OTP).
Defense in depth is a security approach of having defense mechanisms in a layered approach to protect valuable assets. Castles take a similar approach, where they have a moat, ramparts, towers, and drawbridges instead of just one wall as protection.
128
+
129
+
An example of developing a web application using defense in depth could be:
130
+
* The developers (like yourself) receive secure coding training
131
+
* The codebase is checked automatically for vulnerabilities using Semgrep
132
+
* The codebase is also checked for outdated dependencies using Dependabot
133
+
* The application is regularly tested by the internal security team
134
+
* Multiple development environments are used such as Develpoment, Staging, and Production
135
+
136
+
<br> </br>
137
+
138
+
Using more than one of the following layers constitutes an example of defense in depth:
Deserialization of untrusted input can result in atom creation, which can lead to your application being vulnerable to denial of service (DOS) attacks. When you do use a deserialization library, make sure that the library does not create arbitrary atoms: either configure the library to return strings/binaries or enable schema validation to constrain the input
69
+
70
+
### Prevention
71
+
72
+
* Use the :safe option when calling `:erlang.binary_to_term/2` on untrusted input (should be familiar from atom exhaustion 😀)
73
+
* Prevent function deserialisation from untrusted input, e.g. using `Plug.Crypto.non_executable_binary_to_term/1,2`
0 commit comments