Free overview · hard · Lesson 5 of 8

Native admission: VAP and MAP

Rollout rules without a webhook: a ValidatingAdmissionPolicy forbids foreign registries and :latest, a MutatingAdmissionPolicy sets default limits.

The fifth lesson of the hardening track. After lesson 03 Pod Security won't let a privileged Pod in, but a leaked CI token can still roll out an image from a foreign registry, with the :latest tag or without limits. The lesson is about rollout rules built on the apiserver's own policies, without separate webhook services.

Threat model

The attacker has a CI token that can create Deployments. They write their manifests carefully to fit the restricted level, but they bring their own image and set no resource limits.

Attack path

  1. A Deployment with an image from a public registry.
  2. A Deployment with the :latest tag from your own registry, which can be quietly overwritten.
  3. A Deployment without limits that can take all the memory of the node.

Checklist

Practice

A lab on the shared cluster of the track. The attack rolls out three Deployments with the CI token. You write a ValidatingAdmissionPolicy and a MutatingAdmissionPolicy so that two Deployments are blocked, the third gets default limits, and the shop's own rollouts still pass.

Done reading?

Mark the lesson as read to move your track progress forward.

Practice

Fix a local lab. The agent checks your work and gives hints if you get stuck.

Full access to all labs

$134 $67.00 for one year −50%

One payment, no auto-renewal · Terms

Buy for $67.00