All jobs / Backend developer / Security
Backend developer interview question · 5+ years
The interviewer asks: “The API pod's cloud role can read all buckets and impersonate other roles. What's wrong?” Strongest answer?
The strongest answer
That's standing privilege far beyond the service. I scope the workload identity to the buckets and APIs it needs, short-lived tokens, no impersonate-all. A break of this pod should not be a break of the company.
Why it works
Exactly. Workload identity + least privilege is how you cap a remote-code bug. Privilege of the pod is the real blast radius.
What a good answer covers
- Workload identity, least privilege.
- A pod break ≠ company break.
- Private net isn't enough.
- No long-lived god keys in env.
Answers that fall short
- Close, but not the strongest: It's fine — the cluster is private.
Private clusters still get RCE, SSRF and a stolen kubeconfig. Network is not identity. - Weak: I keep * so we don't have to file tickets when we add a feature.
* for convenience is how a forgotten debug endpoint becomes a cloud-wide incident. - Red flag: Put the long-lived access key in an env var so we aren't tied to the cloud IAM API.
Long-lived keys in env are the 2018 failure mode. Prefer native identity; if you must use keys, short-lived and injected from a vault.
Who gets asked this
More Security questions
- The interviewer asks: “Privacy by design — what does the backend actually ship?” Strongest answer?
- The interviewer asks: “A popular npm/NuGet/Maven package you use was compromised. What should already have…
- The interviewer asks: “Product wants to keep clickstreams forever for “future ML.” What's your backend…
- The interviewer asks: “Where do database passwords and API keys live?” Strongest answer?
- The interviewer asks: “How do you put user input into SQL?” Strongest answer?
- The interviewer asks: “We set CORS to our frontend origin. Are we safe?” Strongest answer?
- The interviewer asks: “How do services get secrets in production?” Strongest answer?
- The interviewer asks: “What must never land in logs or traces?” Strongest answer?