skip to main |
skip to sidebar
RSS Feeds
Technical interview questions for software engineers — languages, databases, cloud, DevOps, and CS fundamentals.
Technical interview questions for software engineers — languages, databases, cloud, DevOps, and CS fundamentals.
Technical interview questions for software engineers — languages, databases, web, cloud, DevOps, and fundamentals. Browse all topics.
Posted by Raj
Interviewers ask, "What are allow policies, deny policies and Principal Access Boundary policies? How do they work together?" because they want to know: Do you know modern IAM features beyond the basics - deny policies and PAB? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 4 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): Allow policies grant access. Deny policies block specific permissions for specific principals, and a deny wins over an allow. Principal Access Boundary, or PAB, is different: it sets the outer limit of which resources a group of principals is even eligible to access. IAM checks all of them. So a user can only get access if they are inside their boundary, not denied, and also granted a role.
Do you know modern IAM features beyond the basics - deny policies and PAB?
Easy picture: At an airport: the boarding pass is the allow policy, the no-fly list is the deny policy, and the terminal boundary is the PAB - it decides which areas you may enter at all.
gcloud iam policies list --attachment-point=cloudresourcemanager.googleapis.com/projects/PROJECT_ID --kind=denypolicies --format=yaml
# Use Policy Troubleshooter in the console to see allow + deny + PAB for a principal and permission
Replace ORG_ID, FOLDER_ID and PROJECT_ID with your own values. Check gcloud help for current flags before you use a command.
| Role | What to emphasise |
|---|---|
| Architect | Use PAB and deny as hard guardrails on top of a clean allow model. |
| Data Engineer | Deny delete on critical datasets except for a pipeline owner group. |
| DevOps Engineer | Manage deny/PAB as code and test them before rollout. |
| Platform Engineer | Ship guardrails as default so product teams cannot weaken them. |
This is the freshest topic in IAM. Showing you know PAB signals you keep up with the platform.
Disclaimer: This blog is independent and not affiliated with or endorsed by Google. Google Cloud features, limits and commands change, so always check the current documentation. Official references: Resource hierarchy, IAM policy types, IAM quotas and limits.