Skip to content

Commit b5ba49b

Browse files
authored
feat: add security best-practices (#111)
1 parent 50354d1 commit b5ba49b

File tree

5 files changed

+75
-2
lines changed

5 files changed

+75
-2
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
slug: security-best-practices
3+
title: Security Best Practices
4+
sidebar_label: Security Best Practices
5+
---
6+
7+
In addition to the out-of-the-box security capabilities provides by App Platform, it is a responsibility of Teams to keep their applications safe from bad actors. Here is a list of security best-practices Teams should implement:
8+
9+
1. Use [secrets](../for-devs/console/sealed-secrets.md) to secure sensitive data and use a `secretKeyRef` to map an environment variable to the secret data.
10+
11+
2. Drop `ALL` or specific capabilities in the Pod or container `SecurityContext` to ensure all (unused) capabilities are disabled.
12+
13+
3. Make sure containers are running with a read-only root file system by setting the `readOnlyRootFilesystem` to `true` in the Pod or container `SecurityContext`.
14+
15+
4. Prevent pods from sharing the host’s IPC or network namespace by setting the `hostNetwork` parameter to `false`.
16+
17+
5. Avoid running containers in privileged mode by setting the `allowPrivilegeEscalation` parameter to false in the Pod or container `SecurityContext`.
18+
19+
6. Identify and mitigate threats in running containers. See the [Detect threats in running containers](../get-started/labs/detect-threats.md) hands-on lab for more information.
20+
21+
7. Scan running container for vulnerabilities. See the [Scan running containers for vulnerabilities](../get-started/labs/scan-containers.md) hands-on lab for more information.
22+
23+
8. Scan images pushed to the Team's private container registry in Harbor for vulnerabilities. See the [Scan images for vulnerabilities](../get-started/labs/scan-images.md) hands-on lab for more information.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
slug: security-best-practices
3+
title: Security Best Practices
4+
sidebar_label: Security Best Practices
5+
---
6+
7+
The Akamai App Platform comes with many security capabilities. It is up to the platform administrator to make sure these capabilities are enabled and correctly used. The following checklist can be used to make sure security is implemented to follow best-practices when running App PLatform on LKE.
8+
9+
1. **Install the cloud-firewall-controller for LKE**
10+
11+
Using the [cloud-firewall-controller](https://github.com/linode/cloud-firewall-controller) ensures that all nodes in the cluster are added to the same Cloud firewall ruleset.
12+
13+
2. **Limit access to the cluster API server**
14+
15+
Kubernetes API servers should not ordinarily be exposed to the open internet. Use the `Control Plane ACL` for LKE to only allow access to the API server from trusted IP addresses.
16+
17+
3. **Use Object Storage for persistency**
18+
19+
Use the Object Storage Wizard in App Platform to prevent dataloss. In case container logs contain sensitive data, the bucket used by Loki can be encrypted (at rest) using SSE-C (SSE-S3/SSE-KMS is currently not supported).
20+
21+
4. **Enable vulnerability scanning in Harbor**
22+
23+
Enable `Automatically scan images for vulnerabilities` in the Team project settings in Harbor to automatically scan all images on push.
24+
25+
5. **Don't disable network policies for Teams**
26+
27+
By default App Platform enforces the use of network policies (ingress and egress). This means that by default all traffic between Pods in the Team namespace and access to external URLs or IP addresses is forbidden. To allow traffic between Pods or access to external URLs or IP addresses, Teams need to create netwok policies. Disabling network policies increases risks and is not adviced.
28+
29+
6. **Enable observability**
30+
31+
App Platform comes with a fully integrated and pre-configured stack of observability applications for Kubernetes. The observability applications (like Prometheus, Grafana and Alertmanager) are disabled by default. It is adviced to turn on the observability applications to get insights into resource usage and possible issues.
32+
33+
7. **Secure Personally Identifiable Information**
34+
35+
By default (during installation), App Platform will use a self-hosted Keycloak instance as an internal identity provider (IdP). When users are created in App Platform, these users will be stored in Keycloak. The user data in Keycloak is NOT encrypted. When Personally Identifiable Information (PII) needs to be encrypted because of compliance regulations, it is advised to enable disk encryption or configure App Platform to use an external IdP:
36+
37+
- Enable disk encryption on all nodes.
38+
39+
Disk encryption ensures that your data stored on compute instances is secured. In addition to Akamai's information security compliance with standards such as SOC 2, disk encryption provides further protections by keeping data encrypted, even if the disk is removed, decommissioned, or disposed of. See [here](https://techdocs.akamai.com/cloud-computing/docs/local-disk-encryption) for more information on disk encryption.
40+
41+
- **Use an external Identity Provider**
42+
43+
Configure App Platform to use an [external IdP](../for-ops/console/settings/oidc.md).
44+
45+
8. **Configure Keycloak to use 2 factor authentication (MFA)**
46+
47+
When no external IdP is used, it is advised to configure the `otomi` realm to force users to use a MFA app like Google Authenticator, Microsoft Authenticator or Free OTP to use one time passwords (OTP). See [here](https://www.keycloak.org/docs/latest/server_admin/index.html#configuring-authentication_server_administration_guide) for instructions.
48+

docs/get-started/labs/scan-containers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: scan-containers
3-
title: Scan your running containers for vulnerabilities
3+
title: Scan running containers for vulnerabilities
44
sidebar_label: Scan Containers
55
---
66

docs/get-started/labs/scan-images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: scan-images
3-
title: Scan your images for vulnerabilities
3+
title: Scan images for vulnerabilities
44
sidebar_label: Scan Images
55
---
66

sidebar-docs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module.exports = {
6868
"for-devs/console/shell",
6969
],
7070
},
71+
"for-devs/security-best-practices",
7172
],
7273
"For Platform Adminstrators": [
7374
{
@@ -130,6 +131,7 @@ module.exports = {
130131
],
131132
},
132133
"for-ops/known-issues",
134+
"for-ops/security-best-practices",
133135
],
134136
},
135137
};

0 commit comments

Comments
 (0)