Courseiva
Security →mediumMultiple Choice

CV0-004 Security Practice Question

A cloud engineer is deploying a containerized workload to a Kubernetes cluster running in a public cloud. The security team requires that the application pods never use long-lived static credentials to access the cloud provider's object storage service. The cluster already runs an OpenID Connect (OIDC) identity provider that the cloud provider trusts. Which approach should the engineer implement to meet this requirement?

⚠ Common exam trap

The trap here is assuming that storing credentials in a Kubernetes Secret makes them safe, when Secrets are merely base64-encoded and remain long-lived static credentials.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Configure an IAM role with a trust policy scoped to the cluster's OIDC provider and annotate the Kubernetes service account so pods receive short-lived tokens.

Federating the Kubernetes service account with the cloud IAM role through the cluster's OIDC provider lets pods obtain short-lived, automatically rotated credentials scoped to a single workload. Because no secret key material is ever stored in the cluster, the requirement that pods never use long-lived static credentials is met, and least privilege is enforced per service account rather than shared cluster-wide.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Configure an IAM role with a trust policy scoped to the cluster's OIDC provider and annotate the Kubernetes service account so pods receive short-lived tokens.

    Why this is correct

    This is exactly what IRSA-style workload identity federation provides: the cloud IAM role trusts the cluster's OIDC issuer, and the annotated service account lets pods exchange a projected service account token for temporary cloud credentials. No static keys exist anywhere, tokens expire automatically, and access is scoped per service account, satisfying the no-long-lived-credentials requirement cleanly.

  • ✗

    Enable basic authentication on the Kubernetes API server and issue each pod a static service account token stored in a durable Secret.

    Why it's wrong here

    Legacy non-expiring service account tokens are long-lived static credentials and defeat the requirement. Basic authentication on the API server is a deprecated, cluster-wide mechanism unrelated to granting pods access to object storage, and it would not produce cloud provider credentials at all. This option neither removes static secrets nor uses the OIDC federation already in place.

  • ✗

    Deploy a sidecar container that holds a username and password for the object storage service and proxies all requests from the application container.

    Why it's wrong here

    A sidecar proxy still requires a long-lived username and password to authenticate to object storage, so static credentials persist and must be rotated manually. Adding an extra container increases attack surface and operational overhead without addressing the underlying credential lifetime problem. This design also ignores the trusted OIDC identity provider that could issue temporary credentials instead.

  • ✗

    Store the object storage access key and secret key in a Kubernetes Secret and mount it into the pod as environment variables.

    Why it's wrong here

    Kubernetes Secrets are only base64-encoded by default and are long-lived static credentials, which directly violates the requirement that pods never use static credentials. Anyone with read access to the namespace or etcd can retrieve them, and rotation is manual. This approach does not leverage the OIDC trust the cluster already has, so it fails the scenario's core constraint.

About these practice questions

This CV0-004 question is part of Courseiva's 834-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.