Skip to content

Commit e7f40fd

Browse files
authoredMar 18, 2025··
Merge pull request #562 from viccuad/from-self-assessment
Expand security-hardening/ subsection, reorder howtos/ section
2 parents a654d8a + 1089337 commit e7f40fd

23 files changed

+109
-24
lines changed
 

‎docs/howtos/airgap/01-requirements.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sidebar_label: Requirements
3-
title: Requirements for a Kubewarden air gap installation
4-
description: Requirements for a Kubewarden air gap installation.
3+
title: Requirements for installing Kubewarden in an air gapped environment
4+
description: Requirements for installing Kubewarden in an air gapped installation.
55
keywords: [kubewarden, kubernetes, air gap installation]
66
doc-persona: [kubewarden-operator, kubewarden-integrator]
77
doc-type: [howto]

‎docs/howtos/airgap/02-install.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ doc-topic: [operator-manual, airgap, installation]
1212
<link rel="canonical" href="https://docs.kubewarden.io/howtos/airgap/install"/>
1313
</head>
1414

15-
This guide shows you how to install Kubewarden in air-gapped environments.
16-
For an air-gapped installation of Kubewarden,
15+
This guide shows you how to install Kubewarden in air gapped environments.
16+
For an air gapped installation of Kubewarden,
1717
you need a private Open Container Initiative (OCI) registry accessible by your Kubernetes cluster.
1818
Kubewarden Policies are WebAssembly modules,
1919
therefore you can store them in an OCI-compliant registry as OCI artifacts.
@@ -142,7 +142,7 @@ helm install --wait -n kubewarden \
142142
:::caution
143143
To use the Policy Reported sub-chart available in the
144144
`kubewarden-controller` chart you need to define other values specific for the
145-
sub-chart in an air-gapped environment.
145+
sub-chart in an air gapped environment.
146146
See an example below:
147147

148148
```shell

‎docs/howtos/airgap/_category_.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "Airgap",
2+
"label": "Air gap",
33
"position": 100,
44
"collapsed": true
55
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"label": "Rancher Application Collection",
3-
"position": 120,
3+
"position": 140,
44
"collapsed": true
55
}

‎docs/howtos/argocd-installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_label: ArgoCD Installation
3-
sidebar_position: 35
3+
sidebar_position: 90
44
title: ArgoCD Installation
55
description: How to install Kubewarden with ArgoCD
66
keywords: [kubewarden, gitops, argocd]

‎docs/howtos/audit-scanner.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_label: Audit Scanner
3-
sidebar_position: 70
3+
sidebar_position: 21
44
title: Audit Scanner
55
description: How-to install and use Audit Scanner.
66
keywords: [kubewarden, kubernetes, audit scanner]

‎docs/howtos/pod-security-admission-with-kubewarden.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_label: Pod Security Admission
3-
sidebar_position: 30
3+
sidebar_position: 42
44
title: Using Pod Security Admission with Kubewarden
55
description: Using Pod Security Admission with Kubewarden, since the Kubernetes 1.25 release.
66
keywords: [kubewarden, pod security admission, pod security policy, kubernetes]

‎docs/howtos/policies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_label: Configuring policies
3-
sidebar_position: 90
3+
sidebar_position: 30
44
title: Configuring policies
55
description: Dependency matrix of Kubewarden.
66
keywords: [policies, ClusterAdmissionPolicies, AdmissionPolicies, configuration, namespaces]

‎docs/howtos/policy-groups.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_label: Policy Groups
3-
sidebar_position: 36
3+
sidebar_position: 33
44
title: How to use policy groups
55
description: How to use Kubewarden policy groups
66
keywords: [kubewarden, policy groups, clusteradmissionpolicygroup, admissionpolicygroup]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"label": "Configuring Policy Servers",
3-
"position": 80,
3+
"position": 32,
44
"collapsed": true
55
}

‎docs/howtos/production-deployments.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
sidebar_label: Production deployments
33
title: Configuring Kubewarden stack for production
44
description: Configuring Kubewarden stack for production
5+
sidebar_position: 20
56
keywords:
67
[
78
kubewarden,

‎docs/howtos/psp-migration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_label: PSP migration
3-
sidebar_position: 20
3+
sidebar_position: 40
44
title: PodSecurityPolicy migration
55
description: Discusses PSP migration to Kubewarden policies after Kubernetes v1.25.
66
keywords: [kubewarden, kubernetes, appvia, psp, pod security policy]
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"label": "Security",
3-
"position": 100,
3+
"position": 90,
44
"collapsed": true
55
}

‎docs/howtos/secure-supply-chain.md ‎docs/howtos/security-hardening/secure-supply-chain.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ The following checks were performed on each of these signatures:
295295
## Configuring the policy server to check policy signatures
296296

297297
You can configure Kubewarden with a `ConfigMap` to only run trusted policies.
298-
The `ConfigMap` structure described in [Signature Config Reference](../reference/verification-config.md#signature-configuration-reference).
298+
The `ConfigMap` structure described in [Signature Config Reference](../../reference/verification-config.md#signature-configuration-reference).
299299
It's used to verify a policy using `kwctl`.
300300
The `ConfigMap` should define allowable configurations under the `verification-config` field.
301301

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
sidebar_label: Security hardening
3+
sidebar_position: 50
4+
title: Security hardening
5+
description: Harden the Kubewarden installation
6+
keywords: [kubewarden, kubernetes, security]
7+
doc-persona: [kubewarden-operator, kubewarden-integrator]
8+
doc-type: [howto]
9+
doc-topic: [operator-manual, security]
10+
---
11+
12+
Kubewarden strives to be secure with little configuration.
13+
In this section and its subpages you can find hardening tips (with their
14+
trade-offs) to secure Kubewarden itself.
15+
16+
Please refer to our [threat model](../reference/threat-model) for more information.
17+
18+
### `kubewarden-defaults` Helm chart
19+
20+
Operators can obtain a secure deployment by installing all the
21+
Kubewarden Helm charts. It's recommended to install the
22+
`kubewarden-defaults` Helm chart and enable its recommended policies with:
23+
24+
```console
25+
helm install --wait -n kubewarden kubewarden-defaults kubewarden/kubewarden-defaults \
26+
--set recommendedPolicies.enabled=True \
27+
--set recommendedPolicies.defaultPolicyMode=protect
28+
```
29+
30+
This provides a default PolicyServer and default policies, in protect mode, to
31+
ensure the Kubewarden stack is safe from other workloads.
32+
33+
### Verifying Kubewarden artifacts
34+
35+
See the [Verifying Kubewarden](../tutorials/verifying-kubewarden) tutorial.
36+
37+
### RBAC
38+
39+
Kubewarden describes RBAC configurations in different
40+
_Explanations_ sections. Users can fine-tune the needed permissions for the
41+
[Audit Scanner](../explanations/audit-scanner#permissions-and-serviceaccounts)
42+
feature, as well as [per Policy Server](../explanations/context-aware-policies)
43+
Service Account for the context-aware feature.
44+
45+
The view all Roles:
46+
47+
```console
48+
kubectl get clusterroles,roles -A | grep kubewarden
49+
```
50+
51+
### Per-policy permissions
52+
53+
For context-aware policies, operators specify fine-grained permissions per
54+
policy under its `spec.contectAwareResources`, and those work in conjuction
55+
with the Service Account configured for the Policy Server where the policy
56+
runs.
57+
58+
### Workload coverage
59+
60+
By default, Kubewarden excludes specific Namespaces from Kubewarden coverage. This is
61+
done to simplify first-time use and interoperability with other workloads.
62+
63+
Security-conscious operators can tune these Namespaces list via the
64+
`.global.skipNamespaces` value for both the `kubewarden-controller` and
65+
`kubewarden-defaults` Helm charts.
66+
67+
### SecurityContexts
68+
69+
Starting from 1.23, Kubewarden's stack is able to run in a Namespace
70+
where the [restricted
71+
Pod Security Standards](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted)
72+
are enforced, with current Pod hardening best practices.
73+
74+
The `kubewarden-controller` Helm chart configures the SecurityContexts and
75+
exposes them in its `values.yaml`.
76+
77+
The `kubewarden-defaults` Helm chart allows for configuing the default Policy
78+
Server `.spec.securityContexts` under `.Values.policyServer.securityContexts`.
79+
80+
For Policy Servers managed by operators, you can configure them via their
81+
[`spec.securityContexts`](https://docs.kubewarden.io/reference/CRDs#policyserversecurity).

‎docs/howtos/security-hardening/webhook-mtls.md

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ doc-topic: [operator-manual, security]
1515
This guide shows you how to enable mutual TLS (mTLS) for all the webhooks used by the Kubewarden
1616
stack when using [k3s](https://k3s.io/) as your Kubernetes distribution.
1717

18+
For more information on how to harden the webhooks, see the [reference
19+
page](../../reference/security-hardening/webhooks-hardening).
20+
1821
## Prerequisites
1922

2023
Before installing k3s, you need to create a certificate authority (CA) and a client certificate to use to secure the communication between the Kubewarden webhooks and the Kubernetes API server.

‎docs/howtos/ui-extension/01-install.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ however,
2626
the Kubewarden controller is installed through the Rancher UI as a cluster scoped resource.
2727

2828
:::note
29-
For air-gapped installations, follow [these steps](../airgap/02-install.md).
29+
For air gapped installations, follow [these steps](../airgap/02-install.md).
3030
:::
3131

3232
Within the Extensions page,
@@ -101,7 +101,7 @@ As Kubewarden is a Rancher Official Extension,
101101
the Rancher team provides a mechanism to automatically generate an Extension Catalog Image.
102102
This is added to the `rancher-images.txt` file when
103103
[installing Rancher Manager](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images#1-find-the-required-assets-for-your-rancher-version)
104-
for air-gapped instances.
104+
for air gapped instances.
105105

106106
Once this image has been mirrored to a registry accessible to your air-gapped cluster,
107107
you can import the image within the Rancher UI.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"label": "Rancher UI extension",
3-
"position": 110,
3+
"position": 130,
44
"collapsed": true
55
}

‎docs/howtos/vap-migration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_label: ValidatingAdmissionPolicy migration
3-
sidebar_position: 35
3+
sidebar_position: 41
44
title: ValidatingAdmissionPolicy migration
55
description: Discusses how to migrate from Kubernetes VAP policies to Kubewarden.
66
keywords: [kubewarden, kubernetes, cel, vap, validatingadmissionpolicy]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"label": "Workarounds",
3-
"position": 15,
3+
"position": 140,
44
"collapsed": true
55
}

‎docs/reference/spec/host-capabilities/02-signature-verifier-policies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This allows implementing a "Secure Supply Chain" for your cluster.
2626
Part of the function of the secure supply chain is to ensure that all container images running in the cluster are signed and verified.
2727
This proves that they come from their stated authors, with no tampering.
2828
For further reading, check the docs on
29-
[how we implement a Secure Supply Chain for the policies themselves](../../../howtos/secure-supply-chain.md).
29+
[how we implement a Secure Supply Chain for the policies themselves](../../../howtos/security-hardening/secure-supply-chain.md).
3030

3131
Sigstore signatures are stored inside of container registries,
3232
next to the OCI object being signed.

‎docs/reference/threat-model.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,6 @@ For example, by:
302302
The Kubernetes Administrator must verify the Kubewarden images, its dependencies' images, and charts
303303
out of the Kubernetes cluster, in a trusted environment.
304304
You can do this with `cosign`, for example.
305-
Incidentally, this is part of the implementation needed for air-gapped installations.
305+
Incidentally, this is part of the implementation needed for air gapped installations.
306306
2. Use signed Helm charts, and verified digests instead of tags for Kubewarden images in those Helm charts.
307307
This doesn't secure dependencies though.

‎docs/reference/verification-config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The verification-config format is used by:
2020
- `policy-server` to verify policy modules provenance
2121
- `verify-image-signatures` policy to verify cluster images provenance
2222

23-
See [secure supply chain](../howtos/secure-supply-chain.md) for more info.
23+
See [secure supply chain](../howtos/security-hardening/secure-supply-chain.md) for more info.
2424

2525
## Format
2626

0 commit comments

Comments
 (0)
Please sign in to comment.