Skip to content

Commit 8929789

Browse files
author
Tim Bannister
committed
Move cloud native security out of section overview
1 parent 18cdba2 commit 8929789

File tree

4 files changed

+269
-189
lines changed

4 files changed

+269
-189
lines changed

content/en/docs/concepts/security/_index.md

Lines changed: 46 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -14,187 +14,51 @@ Kubernetes is based on a cloud-native architecture, and draws on advice from the
1414
{{< glossary_tooltip text="CNCF" term_id="cncf" >}} about good practice for
1515
cloud native information security.
1616

17-
Read on through this page for an overview of how Kubernetes is designed to
18-
help you deploy a secure cloud native platform, or jump to the
19-
[further reading](#what-s-next) if you are looking for a specific topic.
20-
21-
## Cloud native information security
17+
Read [Cloud Native Security and Kubernetes](/docs/concepts/security/cloud-native-security/)
18+
for the broader context about how to secure your cluster and the applications that
19+
you're running on it.
2220

23-
The CNCF [white paper](https://github.com/cncf/tag-security/tree/main/security-whitepaper)
24-
on cloud native security defines security controls and practices that are
25-
appropriate to different _lifecycle phases_.
26-
27-
## _Develop_ lifecycle phase {#lifecycle-phase-develop}
28-
29-
- Ensure the integrity of development environments.
30-
- Design applications following good practice for information security,
31-
appropriate for your context.
32-
- Consider end user security as part of solution design.
33-
34-
To achieve this, you can:
35-
36-
1. Adopt an architecture, such as [zero trust](https://glossary.cncf.io/zero-trust-architecture/),
37-
that minimizes attack surfaces, even for internal threats.
38-
1. Define a code review process that considers security concerns.
39-
1. Build a _threat model_ of your system or application that identifies
40-
trust boundaries. Use that to model to identify risks and to help find
41-
ways to treat those risks.
42-
1. Incorporate advanced security automation, such as _fuzzing_ and
43-
[security chaos engineering](https://glossary.cncf.io/security-chaos-engineering/),
44-
where it's justified.
45-
46-
## _Distribute_ lifecycle phase {#lifecycle-phase-distribute}
47-
48-
- Ensure the security of the supply chain for container images you execute.
49-
- Ensure the security of the supply chain for the cluster and other components
50-
that execute your application. An example of another component might be an
51-
external database that your cloud-native application uses for persistence.
52-
53-
To achieve this, you can:
54-
55-
1. Scan container images and other artifacts for known vulnerabilities.
56-
1. Ensure that software distribution uses encryption in transit, with
57-
a chain of trust for the software source.
58-
1. Adopt and follow processes to update dependencies when updates are
59-
available, especially in response to security announcements.
60-
1. Use validation mechanisms such as digital certificates for supply
61-
chain assurance.
62-
1. Subscribe to feeds and other mechanisms to alert you to security
63-
risks.
64-
1. Restrict access to artifacts. Place container images in a
65-
[private registry](/docs/concepts/containers/images/#using-a-private-registry)
66-
that only allows authorized clients to pull images.
67-
68-
## _Deploy_ lifecycle phase {#lifecycle-phase-deploy}
69-
70-
Ensure appropriate restrictions on what can be deployed, who can deploy it,
71-
and where it can be deployed to.
72-
You can enforce measures from the _distribute_ phase, such as verifying the
73-
cryptographic identity of container image artifacts.
74-
75-
When you deploy Kubernetes, you also set the foundation for your
76-
applications' runtime environment: a Kubernetes cluster (or
77-
multiple clusters).
78-
That IT infrastructure must provide the security guarantees that higher
79-
layers expect.
80-
81-
## _Runtime_ lifecycle phase {#lifecycle-phase-runtime}
82-
83-
The Runtime phase comprises three critical areas: [compute](#protection-runtime-compute),
84-
[access](#protection-runtime-access), and [storage](#protection-runtime-storage).
85-
86-
87-
### Runtime protection: access {#protection-runtime-access}
88-
89-
The Kubernetes API is what makes your cluster work. Protecting this API is key
90-
to providing effective cluster security.
91-
92-
Other pages in the Kubernetes documentation have more detail about how to set up
93-
specific aspects of access control. The [security checklist](/docs/concepts/security/security-checklist/)
94-
has a set of suggested basic checks for your cluster.
95-
96-
Beyond that, securing your cluster means implementing effective
97-
[authentication](/docs/concepts/security/controlling-access/#authentication) and
98-
[authorization](/docs/concepts/security/controlling-access/#authorization) for API access. Use [ServiceAccounts](/docs/concepts/security/service-accounts/) to
99-
provide and manage security identities for workloads and cluster
100-
components.
101-
102-
Kubernetes uses TLS to protect API traffic; make sure to deploy the cluster using
103-
TLS (including for traffic between nodes and the control plane), and protect the
104-
encryption keys. If you use Kubernetes' own API for
105-
[CertificateSigningRequests](/docs/reference/access-authn-authz/certificate-signing-requests/#certificate-signing-requests),
106-
pay special attention to restricting misuse there.
107-
108-
### Runtime protection: compute {#protection-runtime-compute}
109-
110-
{{< glossary_tooltip text="Containers" term_id="container" >}} provide two
111-
things: isolation between different applications, and a mechanism to combine
112-
those isolated applications to run on the same host computer. Those two
113-
aspects, isolation and aggregation, mean that runtime security involves
114-
trade-offs and finding an appropriate balance.
115-
116-
Kubernetes relies on a {{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}
117-
to actually set up and run containers. The Kubernetes project does
118-
not recommend a specific container runtime and you should make sure that
119-
the runtime(s) that you choose meet your information security needs.
120-
121-
To protect your compute at runtime, you can:
122-
123-
1. Enforce [Pod security standards](/docs/concepts/security/pod-security-standards/)
124-
for applications, to help ensure they run with only the necessary privileges.
125-
1. Run a specialized operating system on your nodes that is designed specifically
126-
for running containerized workloads. This is typically based on a read-only
127-
operating system (_immutable image_) that provides only the services
128-
essential for running containers.
129-
130-
Container-specific operating systems help to isolate system components and
131-
present a reduced attack surface in case of a container escape.
132-
1. Define [ResourceQuotas](/docs/concepts/policy/resource-quotas/) to
133-
fairly allocate shared resources, and use
134-
mechanisms such as [LimitRanges](/docs/concepts/policy/limit-range/)
135-
to ensure that Pods specify their resource requirements.
136-
1. Partition workloads across different nodes.
137-
Use [node isolation](/docs/concepts/scheduling-eviction/assign-pod-node/#node-isolation-restriction)
138-
mechanisms, either from Kubernetes itself or from the ecosystem, to ensure that
139-
Pods with different trust contexts are run on separate sets of nodes.
140-
1. Use a {{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}
141-
that provides security restrictions.
142-
1. On Linux nodes, use a Linux security module such as [AppArmor](/docs/tutorials/security/apparmor/) (beta)
143-
or [seccomp](/docs/tutorials/security/seccomp/).
144-
145-
### Runtime protection: storage {#protection-runtime-storage}
146-
147-
To protect storage for your cluster and the applications that run there, you can:
148-
149-
1. Integrate your cluster with an external storage plugin that provides encryption at
150-
rest for volumes.
151-
1. Enable [encryption at rest](/docs/tasks/administer-cluster/encrypt-data/) for
152-
API objects.
153-
1. Protect data durability using backups. Verify that you can restore these, whenever you need to.
154-
1. Authenticate connections between cluster nodes and any network storage they rely
155-
upon.
156-
1. Implement data encryption within your own application.
157-
158-
For encryption keys, generating these within specialized hardware provides
159-
the best protection against disclosure risks. A _hardware security module_
160-
can let you perform cryptographic operations without allowing the security
161-
key to be copied elsewhere.
162-
163-
### Networking and security
164-
165-
You should also consider network security measures, such as
166-
[NetworkPolicy](/docs/concepts/services-networking/network-policies/) or a
167-
[service mesh](https://glossary.cncf.io/service-mesh/).
168-
Some network plugins for Kubernetes provide encryption for your
169-
cluster network, using technologies such as a virtual
170-
private network (VPN) overlay.
171-
By design, Kubernetes lets you use your own networking plugin for your
172-
cluster (if you use managed Kubernetes, the person or organization
173-
managing your cluster may have chosen a network plugin for you).
174-
175-
The network plugin you choose and the way you integrate it can have a
176-
strong impact on the security of information in transit.
177-
178-
### Observability and runtime security
179-
180-
Kubernetes lets you extend your cluster with extra tooling. You can set up third
181-
party solutions to help you monitor or troubleshoot your applications and the
182-
clusters they are running. You also get some basic observability features built
183-
in to Kubernetes itself. Your code running in containers can generate logs,
184-
publish metrics or provide other observability data; at deploy time, you need to
185-
make sure your cluster provides an appropriate level of protection there.
186-
187-
If you set up a metrics dashboard or something similar, review the chain of components
188-
that populate data into that dashboard, as well as the dashboard itself. Make sure
189-
that the whole chain is designed with enough resilience and enough integrity protection
190-
that you can rely on it even during an incident where your cluster might be degraded.
191-
192-
Where appropriate, deploy security measures below the level of Kubernetes
193-
itself, such as cryptographically measured boot, or authenticated distribution
194-
of time (which helps ensure the fidelity of logs and audit records).
195-
196-
For a high assurance environment, deploy cryptographic protections to ensure that
197-
logs are both tamper-proof and confidential.
21+
## Kubernetes security mechanisms {#security-mechanisms}
22+
23+
Kubernetes includes several APIs and security controls, as well as ways to
24+
define [policies](#policies) that can form part of how you manage information security.
25+
26+
### Control plane protection
27+
28+
A key security mechanism for any Kubernetes cluster is to
29+
[control access to the Kubernetes API](/docs/concepts/security/controlling-access).
30+
31+
Kubernetes expects you to configure and use TLS to provide
32+
[data encryption in transit](/docs/tasks/tls/managing-tls-in-a-cluster/)
33+
within the control plane, and between the control plane and its clients.
34+
You can also enable [encryption at rest](/docs/tasks/administer-cluster/encrypt-data/)
35+
for the data stored within Kubernetes control plane; this is separate from using
36+
encryption at rest for your own workloads' data, which might also be a good idea.
37+
38+
### Secrets
39+
40+
The [Secret](/docs/concepts/configuration/secret/) API provides basic protection for
41+
configuration values that require confidentiality.
42+
43+
### Workload protection
44+
45+
Enforce [Pod security standards](/docs/concepts/security/pod-security-standards/) to
46+
ensure that Pods and their containers are isolated appropriately. You can also use
47+
[RuntimeClasses](/docs/concepts/containers/runtime-class) to define custom isolation
48+
if you need it.
49+
50+
[Network policies](/docs/concepts/services-networking/network-policies/) let you control
51+
network traffic between Pods, or between Pods and the network outside your cluster.
52+
53+
You can deploy security controls from the wider ecosystem to implement preventative
54+
or detective controls around Pods, their containers, and the images that run in them.
55+
56+
### Auditing
57+
58+
Kubernetes [audit logging](/docs/tasks/debug/debug-cluster/audit/) provides a
59+
security-relevant, chronological set of records documenting the sequence of actions
60+
in a cluster. The cluster audits the activities generated by users, by applications
61+
that use the Kubernetes API, and by the control plane itself.
19862

19963
## Cloud provider security
20064

@@ -253,13 +117,8 @@ Learn about related Kubernetes security topics:
253117

254118
Learn the context:
255119

256-
* CNCF [white paper](https://github.com/cncf/tag-security/tree/main/security-whitepaper)
257-
on cloud native security.
258-
* CNCF [white paper](https://github.com/cncf/tag-security/blob/f80844baaea22a358f5b20dca52cd6f72a32b066/supply-chain-security/supply-chain-security-paper/CNCF_SSCP_v1.pdf)
259-
on good practices for securing a software supply chain.
260-
* [Fixing the Kubernetes clusterf\*\*k: Understanding security from the kernel up](https://archive.fosdem.org/2020/schedule/event/kubernetes/) (FOSDEM 2020)
261-
* [Kubernetes Security Best Practices](https://www.youtube.com/watch?v=wqsUfvRyYpw) (Kubernetes Forum Seoul 2019)
262-
* [Towards Measured Boot Out of the Box](https://www.youtube.com/watch?v=EzSkU3Oecuw) (Linux Security Summit 2016)
120+
121+
* [Cloud Native Security and Kubernetes](/docs/concepts/security/cloud-native-security/)
263122

264123
Get certified:
265124

0 commit comments

Comments
 (0)