Harden the Container Security Context
Set how the container of an integration runs: as which user, with which privileges.
How it works
The security context restricts what the container may do: run as a non-root user, forbid privilege escalation, make the root file system read-only, drop Linux capabilities. Hardening it limits what an attacker gains from a compromised integration.
A read-only file system breaks routes that write locally
Give such routes an EmptyDir volume for their temporary files.
Prerequisites
- An integration, created and bound to an environment.
Procedure
- In Runtime Manager, go to Integrations and open the integration.
- Choose Add Capability, then Container.
- Turn Run As Non Root on, leave Allow Privilege Escalation off, and keep every capability dropped.
- Choose Apply changes.
Parameters
| Field | What it is | Default |
|---|---|---|
| Run As Non Root | Refuse to start as the root user. | — |
| Run As User | The user ID the container runs as. | — |
| Allow Privilege Escalation | Let the process gain more privileges than it started with. | — |
| Seccomp Profile | The system calls the container may make: the default profile of the runtime, or unconfined. | — |
| Capabilities Drop | The capabilities taken away from the container. | All |
| Capabilities Add | The capabilities given back to it. | — |
| Image | Another image than the one built by the platform. | — |
| Image Pull Policy | When the image is fetched again. | — |
Behavior and limits
- Applying this setting restarts the integration; it does not rebuild its image.
- An integration needs no capability: give one back only when a library requires it.
See also
- Integrations: every setting at a glance