Learn vocabulary for discussing policy enforcement: admission controllers, enforcement modes, policy as guardrails, and enforcement points.
0 / 10 completed
1 / 10
What is a 'Kubernetes admission controller' in policy enforcement vocabulary?
Admission controllers intercept Kubernetes API requests at admission time (before etcd write): ValidatingWebhookConfiguration calls OPA/Gatekeeper to evaluate policies; MutatingWebhookConfiguration can modify resources. OPA Gatekeeper implements policy enforcement as an admission controller.
2 / 10
What is 'dry-run mode' (or audit mode) in policy enforcement vocabulary?
Dry-run/audit mode: the policy engine evaluates requests against policies and reports violations (in logs, dashboards, alerts) but does not block them. Used to: assess impact before enforcing a new policy, identify existing violations without disruption, and build confidence before switching to enforce mode.
3 / 10
What is 'policy as code' (PaC) and why is it valuable?
Policy-as-Code treats security and compliance policies like software: version control (Git), code review (PR process), automated testing (policy unit tests), and CI/CD (policy deployment). Benefits: policies are auditable, consistent, testable, and changes are traceable — replacing manual, error-prone policy management.
4 / 10
What is a 'guardrail' in cloud infrastructure policy vocabulary?
Guardrails (used in AWS Control Tower, Terraform Sentinel, OPA) are policies that set boundaries: 'you cannot create a public S3 bucket' (preventive), 'all EC2 instances must have specific tags' (detective/preventive). They enable developer autonomy within safe limits rather than centralized approval for every action.
5 / 10
What is 'policy drift' in policy-as-code vocabulary?
Policy drift occurs when the actual system state diverges from the declared policy: manual exceptions not recorded in code, policies updated in one environment but not others, or enforcement bypasses that accumulate. Continuous compliance scanning detects drift: OPA running in audit mode continuously reports the gap between declared and actual state.
6 / 10
John, a junior developer, posted this comment on a code review:
`'This request seems risky. We should enforce a limit of 100 API calls per user to prevent abuse.'`
What policy enforcement technique is John primarily describing?
This scenario focuses on rate limiting, which is a common policy enforcement technique used to prevent abuse and overload of systems. The comment explicitly mentions a 'limit of 100 API calls,' indicating an attempt to control request frequency. Options B, C, and D relate to different security aspects but aren't directly addressing the restriction of requests.
7 / 10
Sarah is investigating a sudden increase in failed deployments. The monitoring system flags several applications violating resource limits. She runs a 'dry run' on a new deployment to simulate the changes before pushing them live. What does 'dry run mode' primarily achieve?
'Dry run mode' or 'audit mode' is a crucial pre-deployment step that allows developers to simulate changes without affecting the live system. It's used to identify policy violations and potential issues *before* committing to the actual deployment – this directly addresses Sarah's investigation regarding resource limits.
8 / 10
Mark is writing a PR description for a change that introduces new access control rules. He includes the following text:
'We're implementing policy as code to ensure consistent and auditable enforcement of our security policies across all environments.'
What does 'policy as code' (PaC) fundamentally represent in this context?
'Policy as Code' (PaC) is a paradigm shift – it means defining policies not just in documentation but in code, typically using tools like Terraform or Ansible. This allows for automation, version control, and consistent enforcement across different environments, making it much more reliable than manual configuration.
9 / 10
Emily needs to protect a database from unauthorized access. She implements a 'guardrail' – a set of rules that restrict which applications can connect to the database and what operations they are allowed to perform.
What is the primary function of a 'guardrail' in this scenario?
A 'guardrail' acts as a protective barrier, enforcing predefined rules and restrictions around data access – it's analogous to physical barriers. It doesn't encrypt or actively monitor; instead, it controls *who* can do *what*, thereby mitigating risks associated with unauthorized actions within the database.
10 / 10
David notices that a new microservice deployed last week is suddenly exceeding its allocated CPU quota. The monitoring system shows a gradual increase in resource consumption over time – 'policy drift'. What does 'policy drift' describe?
'Policy drift' refers to the situation where a system or application gradually moves away from its originally defined policy settings over time. This can be due to configuration changes, evolving usage patterns, or even unintended side effects, leading to violations of those policies and potentially impacting performance or security.
What will I practice in "Policy Enforcement — Vocabulary and Communication"?
This is a Policy As Code exercise set. It walks through 10 scenario-based multiple-choice questions built around real usage of policy as code terminology that IT professionals encounter on the job.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to complete with no account, sign-up, or paywall.
How many questions are in this exercise?
This set contains 10 questions. Each one shows immediate feedback and a detailed explanation after you answer, so you learn the correct usage right away rather than waiting for a final score.
Do I need prior experience to complete this exercise?
No prior experience is required. Each question includes a full explanation covering the reasoning behind the correct answer, so the exercise itself teaches the policy as code vocabulary as you go.
Can I retry the exercise if I get questions wrong?
Yes — use the "Try again" button on the results screen to reset your answers and go through all the questions again. There is no limit on attempts.
Is my progress saved?
Your answers and score for the current session are tracked in the browser as you go. No account or login is needed, and there is nothing to install.
What if I don't understand a term used in a question?
Read the explanation shown after you answer each question — it breaks down the correct term in plain English with a real-world example. You can also check the site Glossary for quick definitions.
How is this different from reading a blog article on the topic?
Exercises like this one are interactive drills that test and reinforce specific vocabulary through multiple-choice questions, while blog articles explain concepts in prose. Practising here after reading builds active recall, not just passive recognition.
Where can I find more Policy As Code exercises?
See the Policy As Code exercises hub for the full set of related pages, or browse all exercise categories from the main Exercises index.
Can I use this exercise to prepare for a technical interview?
Yes — policy as code vocabulary comes up often in technical discussions and interviews. Pair this exercise with our dedicated Interview Preparation section for role-specific practice.