Policy as Code with Sentinel Language
summary
HashiCorp ships a new Sentinel language that codifies compliance rules, a Go-friendly runtime that embeds in tools, a simulator for local testing, and an import SDK for querying external systems. Policies are lazy and cached with rule memoization, run in a sandboxed evaluator, and support advisory/soft/hard enforcement levels so checks can warn, allow overrides, or block actions. Examples include preventing a fat‑finger 5,000‑VM request and gating AMI/container whitelists.
AI-written summary · about
chapters (44)
- 0:00Introduction
- 0:55Infrastructure as Code
- 1:10Before Infrastructure as Code
- 2:09What is Infrastructure as Code
- 3:36Benefits of Infrastructure as Code
- 4:55Prerequisites
- 5:56API Contracts
- 6:44The Paradox of Automation
- 7:49Accidental Error
- 8:41Malicious Intent
- 9:25Separation of Responsibility
- 12:09Organizational Challenges
- 12:51Sentinel
- 13:45Goals
- 14:58Embedding
- 15:48Simplicity
- 16:53Debugging
- 17:23NGOfriendliness
- 18:05Challenges
- 19:09Design Decisions
- 19:20Dynamic Typing
- 20:31FirstClass Rules
- 20:52Rules as Functions
- 23:20Dedicated Existential Operators
- 24:09Plain English Operators
- 24:43Handling Errors
- 27:21Syntax
- 29:51Lexer parser
- 30:41Syntax semantics checking
- 31:12The evaluator
- 32:14Avoiding user functions
- 32:48Enforcement levels
- 33:52Things you cannot override
- 34:05Shortcircuiting
- 34:35Embedded runtime
- 34:56Simulator
- 35:21Application
- 36:42Import SDK
- 37:30Plugin Ecosystem
- 37:50Config Protection
- 38:20Use Cases
- 39:04Compliance
- 39:29Policies will never be exhaustive
- 40:13Conclusion
related talks
26mPolicy as Code for Network as Code
27mSentinel policy as code in a highly regulated financial industry
20mSentinel in action: Policy as code for secure Terraform workflows in HCP
43mSentinel: A Platform for Fine-grained Application Security
23mSecure Your Systems the Better Way Using Policy-as-Code
22mPolicy as [versioned] Code - How to do it Right
25mPolicy as [versioned] Code
34mPolicy As [Versioned] Code
