Cloud Platform and Infrastructure Security

A workload on a cloud VM must read one storage bucket. Policy bans long-lived secrets on instances, and access must be attributable to that workload and instantly revocable. Which approach BEST meets this?

Show the answer

Correct answerB. Attach an instance role that issues short-lived credentials scoped to that bucket

AWhy not this: Fetching the key at boot still lands a long-lived secret on the VM and rotation stays manual.

BWhy this is right: Temporary, scoped credentials tied to the workload identity avoid stored secrets and allow immediate revocation.

CWhy not this: Encrypting the file does not change that a long-lived secret sits on the instance, which policy bans.

DWhy not this: IP-based anonymous access gives no authenticated identity, so actions cannot be attributed to the workload.

A role bound to the workload identity gives temporary, automatically rotated credentials with least-privilege scope. Access is logged against the role and is revoked by detaching it. A key in an encrypted file is still a long-lived secret on the instance.