Skip to content

Commit 98cf988

Browse files
committed
zero trust
1 parent c3b2fda commit 98cf988

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

docs/assets/access-policy-1.png

8.89 KB
Loading

docs/assets/access-policy-2.png

8.97 KB
Loading

docs/assets/access-policy-3.png

8.84 KB
Loading

docs/explanation/zero-trust.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Zero trust
2+
3+
NAIS embraces the [zero trust](https://en.wikipedia.org/wiki/Zero_trust_security_model) security model, where the core principle is to "never trust, always verify".
4+
5+
In NAIS every [workload](./workloads/README.md) is isolated by default - which means that it is not able to make _any_ outbound requests or receive _any_ incoming traffic unless explicitly defined. This includes traffic inside your namespace, in the same environment as well as to and from the Internet.
6+
In order to control traffic to and from your workload, you need to define [access policies](../how-to-guides/access-policies.md).
7+
8+
For the native NAIS services - the platform takes care of this for you. For example, when you have a [database](../how-to-guides/persistence/postgres/README.md), the access policies required to reach the database will be created automatically.
9+
10+
## Example
11+
12+
Consider a simple application which consists of a frontend and a backend, where naturally the frontend needs to communicate with the backend.
13+
14+
This communication is denied by default as indicated by the red arrow.
15+
![access-policy-1](../assets/access-policy-1.png)
16+
17+
In order to fix this, the frontend needs to allow outbound traffic to the backend by adding the following access policy.
18+
19+
```yaml
20+
spec:
21+
accessPolicy:
22+
outbound:
23+
- application: backend
24+
```
25+
26+
![access-policy-2](../assets/access-policy-2.png)
27+
28+
However - the frontend is still not allowed to make any requests to the backend.
29+
The missing piece of the puzzle is adding an inbound policy to the backend like so:
30+
31+
```yaml
32+
spec:
33+
accessPolicy:
34+
inbound:
35+
- application: frontend
36+
```
37+
38+
![access-policy-3](../assets/access-policy-3.png)
39+
40+
Now that both applications has explicitly declared their policies, the communication is allowed.

docs/how-to-guides/persistence/postgres/README.md

Whitespace-only changes.

0 commit comments

Comments
 (0)