Join our Newsletter — 33% off our NHI Course
Home› FAQ› Governance, Ownership & Risk› What is the difference between using built-in policies…
Governance, Ownership & Risk

What is the difference between using built-in policies and bringing your own OPA rules for IaC governance?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated November 5, 2026 Domain: Governance, Ownership & Risk

Built-in policies provide vendor-maintained controls, while bring your own OPA rules preserve customer-authored logic already approved by the organisation. The difference is not capability alone, but control ownership and migration effort. Many teams need both, using built-in rules for standard coverage and custom Rego for organisation-specific requirements.

Built-in policy coverage versus custom OPA logic

Built-in policies and bring-your-own OPA rules solve the same governance problem at different layers. Built-ins are usually the fastest way to get standard checks in place, while custom Rego lets you encode organisation-specific decisions, exceptions, and control logic that the vendor policy set cannot express. The practical difference is less about “can it check IaC” and more about who owns the rule set, how changes are approved, and how much migration work follows from that choice.

That ownership matters because policy logic becomes part of the control plane for infrastructure changes. If your organisation has existing approval criteria, separation-of-duties expectations, or environment-specific constraints, custom OPA rules preserve that intent. If you rely only on built-ins, you accept the vendor’s opinionated baseline and may need compensating controls for gaps in local policy.

What changes in practice when you choose one over the other?

Built-in policy libraries generally reduce time to first value, because the checks are already packaged, maintained, and easier to operationalise across teams. The trade-off is that they often reflect a generic security baseline, not your exact risk appetite or platform conventions. That is where a Policy-as-Code for Authorisation Guide is useful, because it shows how policy evaluation, testing, and decision logging fit together when rules are treated as an enforceable control rather than a one-off script.

Bring your own OPA rules usually take longer to design, test, and govern, but they can map more accurately to your internal standards. A custom rule can express combinations such as naming conventions, ownership tags, protected environments, or exceptions tied to business context. That flexibility is valuable when a built-in control is either too blunt, too narrow, or unable to reflect the organisation’s approved architecture.

A useful way to compare them is through migration effort. Built-ins can be a lower-friction starting point, especially for teams that want standard guardrails quickly. Custom rules may be the better end state when the organisation already has a mature control library and needs to preserve prior decisions during platform change. The most common failure mode is treating built-ins as a full replacement for policy governance instead of as a baseline layer.

How to decide whether built-ins, custom Rego, or both are needed

The decision usually comes down to control ownership and change tolerance. If the requirement is common, stable, and vendor-aligned, built-ins are often sufficient. If the requirement is organisation-specific, needs formal exception handling, or must match another internal control framework, custom OPA rules are the better fit. Many teams end up with both: built-ins for broad coverage and Rego for the rules that actually encode local policy.

That hybrid pattern works best when each layer has a clear job. Built-ins should cover the obvious defaults and reduce noise. Custom rules should handle the cases where policy intent, environment context, or approval workflow matters. If both layers can enforce the same condition, define which one is authoritative so teams do not debug overlapping outcomes or inconsistent failures in the pipeline.

Risk and Threat Considerations

Policy choice affects more than convenience. Generic built-ins can miss organisation-specific exposures, while poorly governed custom rules can drift, block legitimate deployments, or silently weaken enforcement when teams patch around false positives. The risk is highest when policy logic is copied between repositories without a clear owner or review process.

Failure mechanism: The control fails when the organisation assumes vendor defaults are sufficient, or when custom Rego is treated as code without the same review, testing, and approval discipline as the infrastructure it governs.

Impact: Weak governance can allow risky infrastructure changes through, create inconsistent enforcement across teams, or make the migration from one policy model to another more expensive and error-prone.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, CIS Controls v8 and OWASP ASVS set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5CM-6 — Configuration SettingsIaC governance depends on approved configuration baselines and controlled deviations.
SI-2 — Flaw RemediationPolicy rules must be maintained and updated as configurations and risks change.
Recommendation — Define approved infrastructure baselines and enforce them through policy checks. Review and update policy logic when new IaC risks or exceptions appear.
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareIaC policy enforcement is a secure-configuration safeguard for infrastructure changes.
Recommendation — Apply secure configuration safeguards to validate infrastructure before deployment.
OWASP ASVSV15 — Secure Coding and ArchitectureOPA rules are code-like controls that need design, review and testing discipline.
Recommendation — Treat policy logic as governed code and validate it before release.
ISO/IEC 27001:2022A.8.9 — Configuration managementIaC governance relies on controlled configuration and approved change paths.
Recommendation — Maintain approved infrastructure configurations and control changes through policy.

Practitioner Guidance

What to verify: Confirm which policy decisions are meant to be vendor-standard and which are organisation-specific before choosing the control model. If a rule encodes an approved exception, ownership requirement, or environment restriction, it should be traceable to a business or security requirement rather than left implicit.

Implementation sequence: Start with a small baseline of built-in checks for common misconfigurations, then add custom Rego only for rules that materially change outcomes. Keep the same test, review, and release discipline for policy code that you would apply to application code, especially where a rule can block deployment or approve a risky exception.

Common mistake: Teams often overestimate how much can be preserved by platform migration alone. If the organisation’s real policy lives in tribal knowledge, spreadsheets, or exception emails, neither built-ins nor custom rules will behave well until that intent is made explicit and reviewed.

Practitioner takeaway: Use built-ins for standard guardrails, use custom OPA rules for organisation-specific intent, and do not let the convenience of a vendor baseline replace explicit control ownership.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 5, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org