Interview kitsBlog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2026 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Security
Securityeasy

What does least privilege mean in practice (IAM/roles)?

Tags
#iam#least-privilege#roles
Back to categoryPractice quiz

Answer

Least privilege means granting only the minimum permissions needed for a task and for the shortest time. In IAM it means scoped roles, separate accounts for services, and avoiding wildcard permissions.

Advanced answer

Deep dive

Least privilege should be enforced at every layer:

  • IAM roles scoped to actions and specific resources.
  • Separate roles for humans and services; separate prod/stage accounts.
  • Short-lived credentials (OIDC, STS) instead of long-lived keys.
  • Continuous audit: remove unused permissions and detect privilege creep.

Examples

Minimal S3 read-only policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:GetObject"],
      "Resource": ["arn:aws:s3:::reports-prod/*"]
    }
  ]
}

Common pitfalls

  • Wildcards like Action:* or Resource:* for convenience.
  • Shared admin accounts and secrets.
  • Not rotating or expiring permissions.

Interview follow-ups

  • How do you handle break-glass access?
  • How do you review permissions over time?
  • What tools help detect privilege creep?

Related questions

Cloud
IAM users vs roles: what’s the difference and how does least privilege apply?
#cloud#iam#security
Cloud
IAM: what does “least privilege” mean and why does it matter?
#iam#security#least-privilege