Skip to content

KCSA · Domain 5: Platform Security · 16% of the exam

Task 5.2: Image Repository

Private registries, pull credentials, digest pinning, admission checks on image sources and keeping registries trustworthy.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.

Question 1 · choose 1

Nodes pull images from a cloud registry with a dockerconfigjson pull Secret that holds a long-lived registry password, and the security team wants to stop storing static registry credentials. Teams publish new image versions several times a day, and the cloud's metadata service on each node can issue short-lived registry tokens. What should the platform team configure?

  1. APre-pulled images on every node, so that Pods need no registry credentials at all
  2. BA kubelet image credential provider plugin that obtains registry credentials on demand
  3. CImages pinned by digest, so that nodes need no credentials after the first pull
  4. DimagePullCredentialsVerificationPolicy: AlwaysVerify in every kubelet's configuration
Show the answer and why
  • APre-pulled images on every node, so that Pods need no registry credentials at all

    Incorrect

    Pre-pulled images need root access to all nodes to set up and the same images on every node, which cannot keep up with new versions several times a day.

  • BA kubelet image credential provider plugin that obtains registry credentials on demand

    Correct

    Credential provider plugins let the kubelet request registry credentials dynamically, for example short-lived ones from a local metadata server, instead of storing static credentials.

  • CImages pinned by digest, so that nodes need no credentials after the first pull

    Incorrect

    A digest identifies content; pulling it from a private registry on a new node still needs credentials.

  • DimagePullCredentialsVerificationPolicy: AlwaysVerify in every kubelet's configuration

    Incorrect

    AlwaysVerify makes the kubelet verify a Pod's pull credentials even for images already on the node, but the credentials it checks are still the long-lived password in the stored pull Secret.

The kubelet can call exec credential provider plugins to fetch registry credentials when it pulls an image, for example short-lived tokens from the cloud's metadata server. That removes long-lived registry passwords from Secrets and node disks while every new image version can still be pulled on any node.

Question 2 · choose 1

What does the CNCF Cloud Native Security Whitepaper recommend for access to any container registry an organization uses?

  1. AA dedicated permission model and mutually authenticated TLS for all connections
  2. BAnonymous pull access for everyone, so that nodes and developers never need credentials
  3. COne shared password for all teams, rotated yearly
  4. DPlain HTTP inside the company network
Show the answer and why
  • AA dedicated permission model and mutually authenticated TLS for all connections

    Correct

    The whitepaper says every registry needs access control through a dedicated authentication and permission model, and mutually authenticated TLS for all registry connections.

  • BAnonymous pull access for everyone, so that nodes and developers never need credentials

    Incorrect

    Anonymous access removes the access control the whitepaper requires.

  • COne shared password for all teams, rotated yearly

    Incorrect

    A shared password is not a dedicated permission model per user or team.

  • DPlain HTTP inside the company network

    Incorrect

    The whitepaper asks for mutually authenticated TLS on all registry connections.

Registries hold the artifacts that will run in production. The whitepaper asks for a dedicated authentication and permission model and mutually authenticated TLS for every registry connection.

Question 3 · choose 1

According to the CNCF Cloud Native Security Whitepaper, which capabilities should artifact registries and their caching and distribution tools provide?

  1. AAutomatic deletion of all images older than a day
  2. BSigning and verification of OCI artifacts, and tamper detection in caches
  3. CBuilding images from source when a Pod requests them
  4. DRunning containers directly from the registry instead of pulling them to nodes
Show the answer and why
  • AAutomatic deletion of all images older than a day

    Incorrect

    Retention rules are an operational choice, not the capability the whitepaper describes.

  • BSigning and verification of OCI artifacts, and tamper detection in caches

    Correct

    The whitepaper says registries should accommodate signing and verifying OCI artifacts, and caching and distribution tools should sign, encrypt and provide checksums so tampering or poisoning is detected.

  • CBuilding images from source when a Pod requests them

    Incorrect

    Registries store and distribute artifacts; building is done in pipelines.

  • DRunning containers directly from the registry instead of pulling them to nodes

    Incorrect

    Containers run on nodes; registries serve images.

Because caches and mirrors sit in the delivery path, the whitepaper asks registries to support signing and verification of OCI artifacts and their caching layers to sign, encrypt and checksum content so that tampering can be detected.

Practice domain 5 →Practice all domains →