A curated list of awesome Open Policy Agent (OPA) related tools, frameworks and articles.
- Official Projects
- Policy Packages
- Language and Platform Integrations
- WebAssembly (Wasm)
- Kubernetes
- Nomad
- Datasource Integrations
- IDE and Editor Integrations
- Infrastructure as Code
- Serverless
- Testing
- Tools and Utilities
- Other Usecases
- Fun and Quirky
- Support and Community
- Recommended Reading
- People
- Commercial Tools
- Contributing
- OPA - Open Policy Agent Github repository
- Gatekeeper - Kubernetes admission controller using OPA
- Conftest - Write tests against structured configuration data
- OPA - Official OPA documentation
- Styra Academy - Excellent OPA training courses
- Gatekeeper - OPA Gatekeeper docs
- Conftest - Conftest documentation
- Rego Style Guide - Style guide for Rego, providing pointers on best practices for policy authoring
- Regal Docs - Documentation for 60 linter rules, providing an excellent reference for learning Rego
- Library - Community-owned policy library for OPA
- Policy Hub CLI - CLI tool that makes Rego policies searchable
- Rego policies - Rego policies from the the Red Hat community of practice
- Appshield - Open Database of rego policies for common Infrastructure as Code files
- Conftest policy packs - Collection of Conftest policies for "Compliance-as-Code" security policies and general engineering standards. Policies targeting Terraform, Dockerfiles, package.json (NodeJS) files, etc
- Confectionary - A library of rules for Conftest used to detect Terraform misconfigurations.
- Kubescape Rego library - Comprehensive set of Kubernetes policies from Kubescape
- Kubernetes Security Policies - Raspernetes library for fortifying cluster configurations
- Styra Java SDK - Java SDK for interacting with OPA (documentation)
- Jarl - Native evaluation of Rego in the JVM, via OPA's IR format (blog)
- OPA Java Client - Generic Java client to query OPA's REST API
- Spring Security - OPA Spring Security Library
- Spring Security Reactive - OPA with Spring Security Reactive
- Gradle - OPA plugin for Gradle
- Thunx - Thunx is a pluggable ABAC system using OPA, Spring Cloud Gateway and Spring Data REST
- OPA Python - Python client library for Open Policy Agent
- OPA Python client - Python client for OPA's REST API
- Flask OPA - OPA client for the Flask microframework
- Bottle Authorization - Custom Bottle Application Authorization
- Rego Python - Python package for interacting with Rego
- Sphinx Rego - Sphinx extension that automatically documents Rego policies
- regopy - Python module which uses the C FFI for rego-cpp, allowing in-process Pythonic Rego policy evaluation
- regorus - Evaluate Rego policies in Python using Regorus, a fast, lightweight Rego interpreter written in Rust.
- Go Example API Authorization - Example API authorization using OPA
- Fiber OPA Integration - OPA integration for Fiber web framework. Enables to execute Rego policies in the middlewares.
- HTTP API OPA middlewares - Collection of OPA middlewares for your HTTP/Gin/Fiber API.
- regorus - Golang bindings to Regorus, a fast, lightweight Rego interpreter written in Rust.
- OPA Library for PHP - OPA client, a PSR-15 authorization middleware and a PSR-15 bundle distributor middleware
- Styra C# SDK - C# SDK for interacting with OPA (documentation)
- ASP.NET Core - ASP.NET Core authorization middleware
- OpaDotNet.Extensions.AspNetCore - ASP.NET Core authorization infrastructure
- regorus - C# bindings to Regorus, a fast, lightweight Rego interpreter written in Rust.
- OPA Express - OPA client for the Express framework
- regorus - Evaluate Rego policies in WASM using Regorus. Try it out at Regorus Playground.
- Jarl - Native evaluation of Rego in the JVM (written in Clojure), via OPA's IR format (blog)
- clj-opa - Middleware and utilities for app authorization with OPA in Clojure
- OPA Docker authorization - OPA to help policy-enable an existing services
- Docker Security Checker - OPA Rego policies for Dockerfile Security checks using Conftest
- Dockerfile security - A collection of OPA rules to statically analyze Dockerfiles to improve security
- Konveyor Forklift Validation Service - VM migration suitability assessment to avoid migrating VMs that are not fit for Kubevirt. Rules are applied on all the VMs of the source provider (VMware) during the initial inventory collection, then whenever a VM configuration changes.
- rego-cpp - Rego compiler and runtime implemented in C . It provides a C FFI with Rust and Python bindings in addition to an extensible C implementation.
- regorus - C bindings to Regorus, a fast, lightweight Rego interpreter written in Rust.
- regorus - A fast, lightweight Rego interpreter written in Rust. In addition to bringing the power of Rego to Rust-only environments, it is intended as a platform for developing Rego tools and exploring Rego language enhancements.
- regorust - Rust crate wrapping the C FFI for rego-cpp, allowing in-process Rego policy evaluation using idiomatic Rust.
- Styra OPA Typescript SDK - Typescript SDK for interacting with OPA (documentation)
- NPM module - a small SDK for using WebAssembly compiled Open Policy Agent Rego policies
- .NET Core Library - .NET SDK for calling Wasm-compiled OPA policies from .NET Core
- OpaDotNet - Open Policy Agent (OPA) WebAssembly dotnet core SDK
- OpaDotNet.Compilation - dotnet core backend for packaging Open Policy Agent Rego policies and data files into WASM policy bundles
- Python Library - Open Policy Agent WebAssembly SDK for Python
- Go SDK - a small Go library for using WebAssembly compiled Open Policy Agent Rego policies
- JVM - Java SDK for calling Wasm-compiled policies. Uses wasmtime.
- Rust - A crate to use OPA policies compiled to Wasm.
- regorus - Evaluate Rego policies in WASM using Regorus. Try it out at Regorus Playground.
- Enforce policies in the browser with Open Policy Agent - first article in a series of three covering why and how to reuse backend Policy-as-Code in the browser.
- Reuse Policy as Code β stay DRY - second article in a series of three covering why and how to reuse backend Policy-as-Code in the browser. This article focus on Rego and HOW
- OPA & Angular: Policy-as-Code in the browser - third article in a series of three covering why and how to reuse backend Policy-as-Code in the browser. Angular Proof of Concept based on article 1 & 2.
- Rego on WebAssembly - original OPA Wasm support blog post which summarizes how OPA's Wasm functionality works.
- Wasm - Official docs on WebAssembly for OPA
- OPA Wasm demo - Demonstration of evaluating OPA's Wasm modules in the browser
- Snyk CLI - Test Infrastructure as Code source code for security misconfigurations and best practices in the local console. The npm-opa-wasm library is used to run WASM bundle of Rego policies to detect misconfiguration.
- regorus - Evaluate Rego policies in WASM using Regorus. Try it out at Regorus Playground.
- Gatekeeper - A validating and mutating webhook that enforces CRD-based policies executed by OPA for Kubernetes
- Gatekeeper Policy Library - A collection of constraint templates and sample constraints that you can use with Gatekeeper
- Konstraint - CLI tool for working with templates and constraints when using Gatekeeper
- Red Hat Rego Policies - Red Hat Rego policies collection
- Gatekeeper Policy Manager - Web UI for Gatekeeper policies
- Validating and Mutating Admission Control Example - Example validating and mutation admission controller
- MagTape - OPA-based admission controller for policy enforcement
- Meshery - Meshery leverages built-in relationships to enforce Kubernetes configuration best practices and enhances the development process through custom rules in OPA's Rego query language
- Admission policy development - OPA Kubernetes validation and mutation testing environment
- Gatekeeper Conftest plugin - A Conftest plugin that transforms input objects to be compatible with OPA Gatekeeper policies.
- Cosign Gatekeeper Provider - Cosign Provider a new provider of OPA Gatekeeper's ExternalData feature to verify container images
- Kubescape - Kubescape is tool for scanning Kubernetes clusters for security issues. Kubescape tests (rules) are based completely on OPA. See the regos here
- Kove - Watch your in-cluster Kubernetes manifests for OPA policy violations and export them as Prometheus metrics
- GKE Policy Automation - Tool and policy library for reviewing GKE clusters against best practices
- kube-mgmt - Sidecar providing data from Kubernetes to OPA. Includes Helm charts for both projects
- OPA Envoy Plugin - The OPA Envoy Plugin (compatible with Envoy, Istio, Gloo Edge, more)
- Open Service Mesh - Envoy based service mesh using OPA for external authorization
- Kuma - OPA for Kuma service mesh
- Kong Mesh - OPA for Kong Mesh authorization (docs)
- Policy Enabled Kubernetes with OPA - Guide on setting up OPA for kubernetes admission control
- Integrating OPA with Kubernetes - Comprehensive introduction to OPA and Gatekeeper
- Using OPA on EKS - Using Open Policy Agent on Amazon EKS
- OPA and Gatekeeper - Comparison between OPA and Gatekeeper with lots of useful information
- Kubernetes Authorization - Guide on using OPA for Kubernetes authorization
- Gatekeeper in a CI/CD pipeline - Guide on how to setup your CI environment to test your Kubernetes configuration against your policy in a CI environment as part of a GitOps strategy
- Verifying container signatures on Kubernetes with Gatekeeper - Verifying container signatures on Kubernetes with Gatekeeper
- Gator CLI - Testing Gatekeeper constraints with Gator CLI
- Kubernetes: An Enterprise Guide, 2nd Ed Chapter 8 - Extending Security with OpenPolicyAgent - Walk through labs that show you how to build, debug, and deploy GateKeeper policies and mutations in your cluster.
- Kubernetes: An Enterprise Guide, 2nd Ed Chapter 9 - Node Security with GateKeeper - Walk through labs that show the differences between VMs and containers with a breakout, creating
securityContext
defaults using mutations, replacingPodSecurityPolicy
using GateKeeper, debuging audit violations, and policies for multi-tenant clusters. - OPA Gatekeeper: Policy and Governance for Kubernetes - Kubernetes blog post
- Using OPA Gatekeeper on Azure - Azure Policy for Kubernetes clusters
- Nomad Admission Control Proxy - An admission controller that can be used as a proxy to Nomad's API for mutation and validation with builtin OPA support.
- Kafka Authorizer - Kafka authorizer plugin using OPA, with example policies
- OPA Single Message Transformer - Single Message Transformer for Kafka. Uses OPA to choose which records to filter out based on policy.
- Data Filtering on Spring Data - Data filtering for MongoDB and JPA using OPA
- Elasticsearch - OPA-Elasticsearch Data Filtering Example
- Strimzi - Kafka in kubernetes, with built-in support for OPA as authorizer
- Google Calendar - Integrating OPA with the Google Calendar API
- Inspektor - Access Control as Code for databases using OPA to make its access decision
- Alluxio - Alluxio is a data orchestration tool which allows delegating access control decisions to OPA
- Trino OPA Authorizer - Plugin for Trino that allows using OPA for authorization
- Google Calendar Integration - The Power of Data: Calendar-based Policy Enforcement
- Apache Kafka - Controlling Kafka Data Flows using Open Policy Agent
- VS Code plugin - Develop, test, debug, and analyze policies for OPA in VS Code
- IntelliJ plugin - OPA plugin for the IntelliJ IDE
- Zed Extension - Zed extension for OPA and Rego leveraging Regal
- Emacs - Emacs Major mode for working with Rego
- Vim - Vim plugin for the Rego language, with support for syntax highlighting
- Null-ls - Use Neovim as a language server to inject LSP diagnostics, code actions, and more. Supports linting rego files.
- Atom - Syntax highlighting for the Atom editor
- CodeMirror - Rego mode and minimal key map for CodeMirror
- TextMate - Syntax highlighting for TextMate
- Sublime - Syntax highlighting for Sublime
- Nano - Syntax highlighting for Nano
- Prism - Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind (supports Rego)
- tree-sitter-rego - Tree-sitter grammar for Rego (blog)
- highlight.js - Rego syntax support for highlight.js
- OPA AWS CloudFormation Hook - AWS CloudFormation Hook calling OPA for policy decisions. See also tutorial.
- TFLint OPA Ruleset - Write custom TFLint rules in Rego
- Infracost - Infracost generates cloud cost estimates for Terraform and integrates with OPA, it can be used to write cost policies
- Regula - Evaluates Terraform code for potential security misconfigurations and compliance violations.
- Example Terraform policies - Example Terraform policies
- Terrascan - 500 Policies written in OPA for security best practices.
- KICS - Keeping Infrastructure as Code Secure or KICS scans IaC projects for security vulnerabilities, compliance issues, and infrastructure misconfiguration. Currently working with Terraform projects, Kubernetes manifests, Dockerfiles, AWS CloudFormation Templates, and Ansible playbooks.
- Trivy - Scan your code and artifacts for known vulnerabilities and misconfiguration issues.
- Terraform OPA IBM - Terraform policy library for IBM Cloud
- GCP policy guardrails for Terraform - Rego reference policy library for GCP controls (originally from forseti). Originally used by
terraform-validator
and now ongcloud beta terraform vet
. More info at Policy Validation - Pulumi OPA Bridge for CrossGuard - This project allows OPA rules to be run in the context of Pulumi's policy system, CrossGuard
- Using OPA with Pulumi CrossGuard - Authoring Pulumi CrossGuard Policy with OPA
- AWS CDK with OPA - Realize Policy-as-Code with AWS Cloud Development Kit through Open Policy Agent
- Kubernetes Authorization - Kubernetes Authorization via Open Policy Agent
- Using OPA with Spacelift - Open Policy Agent: What Is OPA and How It Works (Examples)
- OPA Lambda Extension Plugin - A custom plugin for running OPA in AWS Lambda as a Lambda Extension
- Serverless Policy Enforcement - Connecting Open Policy Agent and AWS Lambda
- Lambda Authorizer - Creating a custom Lambda authorizer using Open Policy Agent
- rego-test-assertions - Helper library for working with assertions in Rego unit tests
- kube-review - CLI tool to quickly create AdmissionReview requests from Kubernetes resources
- gator CLI - Command line unit test runner for OPA Gatekeeper
- ocov - Colors
opa test --coverage
reports in the terminal - opa-codecov - Convert OPA test coverage report to a JSON format supported by Codecov
- github-action-opa-rego-test - GitHub Action to automate testing for your OPA Rego policies and generates a report.
- Advanced Rego Testing Techniques - Great blog on testing patterns for Rego, by Nicholaos Mouzourakis
- Regal - Regal is a linter for Rego, with the goal of making your Rego magnificent! (blog)
- setup-opa - GitHub action to configure the Open Policy Agent CLI in your GitHub Actions workflows
- Fregot - Alternative REPL implementation for Rego
- OPA pre-commit - Pre-commit hooks for OPA/Rego/Conftest development
- Monitor OPA Gatekeeper - Monitoring implementation guide for OPA Gatekeeper (blog)
- OpenAPI to Rego - Generate Rego code given an OpenAPI 3.0 Specification
- Temporal reasoning with OPA - Examples for working with time in Rego
- OPAL - Realtime policy and data updates for your OPA agents on top of websockets pub/sub
- OPA Action - OPA Pull-Request Assessor is a GitHub Action that checks files against policies configured in the same repo
- OPA Schema Examples - Examples of extending the OPA type checker with JSON schemas
- Open Policy Containers - Secure software supply chains for OPA policies. Push, pull, tag, test, version, and sign OPA policies.
- Snyk IaC Rules - Maintain library of Rego rules, run integration tests and build WASM bundles for distribution of rules. The OPA libraries are used to build WASM bundles.
- Topaz - Topaz is an open-source application authorization project that uses OPA as the decision engine and supports Rego policies.
- opactl - A simple tool to turn your Rego rule into CLI command (blog)
- alfred - A self-hosted OPA Playground Alternative
- RΓΆnd - RΓΆnd is a lightweight container that distributes security policy enforcement throughout your application
- rq (Rego Query) - jq-inspired tool to bring Rego to your shell pipelines
- opa-explorer - Visual tool for exploring the different compilation stages of the OPA topdown compiler
- mcov - A tool that'll check your Rego source files and report the minimum compatible OPA version required
- dependency-management-data (DMD) is a set of tooling to get a better understanding of the use of dependencies across your organisation. DMD supports using Open Policy Agent to write more complex rules around dependency usage than can be done using the SQL interface.
- SansShell - A non-interactive daemon for host management, where any action is authorized by OPA
- goast - Go AST (Abstract Syntax Tree) based static analysis tool using Rego
- ScubaGear - Using Rego policies to assess the security posture of M365 tenants, by CISA
- Reposaur - Audit, verify and report on development platforms (GitHub and others) easily with pre-defined and/or custom policies.
- backstage-opa-plugins - Plugins for integrating OPA with Backstage, including OPA-based authorisation.
- How I Used OPA to Help Me Solve Wordle - OPA as a Wordle assistant
- Policing Christmas Tree - Using Rego to determine the correctness of Christmas tree decorations
- Corrupting OPA to Run My Games - Fun blog on using OPA for game engines
- Colorized - Colorized output for the OPA print function!
- Styra - Commercial support, and tools for managing OPA at scale, by the creators of OPA
- Stack Overflow - Stack Overflow OPA section
- OPA Slack - Open Policy Agent Slack workspace
- GitHub Discussions - Open Policy Agent Discussion Board
- OPA Guidebook - Open source, free book on Open Policy Agent, by Sangkeon Lee (source code)
- Microservices Security in Action - Book on microservices security, with dedicated section covering OPA. Freely available online
- Gusto Engineering β Why logic programming is the best choice for authorization
- Fugue (now Snyk) - 5 tips for using the Rego language for Open Policy Agent
- Integration - Control User Access and Permissions in CVAT with Open Policy Agent
- @open-policy-agent - Official OPA account π (Twitter)
- @tsandall - Torin Sandall π¨π¦ - OPA co-creator (Twitter)
- @timothyhinrichs - Tim Hinrichs πΊπΈ - OPA co-creator (Twitter)
- @ashutosh-narkar - Ash Narkar πΊπΈ - OPA maintainer (Twitter)
- @johanfylling - Johan Fylling πΈπͺ - OPA maintainer (Mastodon, Twitter)
- @philipaconrad - Philip Conrad πΊπΈ - OPA maintainer (Twitter)
- @anderseknert - Anders Eknert πΈπͺ - OPA developer advocate (Mastodon, Twitter)
- @charlieegan3 - Charlie Egan π¬π§ - OPA developer advocate (Mastodon, Twitter)
- @ritazh - Rita Zhang πΊπΈ - Gatekeeper maintainer (Mastodon, Twitter)
- @sozercan - SertaΓ§ Γzercan πΊπΈ - Gatekeeper maintainer (Mastodon, Twitter)
- @jpreese - John Reese πΊπΈ - Conftest maintainer (Mastodon, Twitter)
- @Parsifal-M - Peter Macdonald π¬π§ - OPA contributor and active community member (Mastodon, Twitter)
- @m-mizutani - Masayoshi Mizutani π―π΅ - Security engineer. Prolific OPA & Rego advocate (Twitter)
- @RoyOsaki - Roy Hiroyuki OSAKI πΊπΈ - Research engineer. OPA community contributor (Twitter)
- @developer-guy - Batuhan Apaydin πΉπ· - OPA and many CNCF projects (Mastodon, Twitter)
- @nmeisenzahl - Nico Meisenzahl π©πͺ - All about OPA and cloud native topics (Mastodon, Twitter)
- @jaspervdj - Jasper Van der Jeugt π¨π - OPA contributor (Mastodon, Twitter)
- @willbeason - Will Beason πΊπΈ - Ex Gatekeeper maintainer (Mastodon, Twitter)
- @peteroneilljr - Peter O'Neill π - Ex OPA community advocate (Mastodon, Twitter)
- @antonioberben - Antonio Berben πͺπΈ - OPA Contributor & Blogger (Twitter)
- Amsterdam OPA Users π³π±
- London OPA Meetup π¬π§
- Stockholm OPA Users πΈπͺ
- Styra DAS - Styra Declarative Authorization Service, from the creators of OPA
- Enterprise OPA - Enterprise-grade authorization engine for data-heavy workloads
- Scalr - Collaboration and Automation for Terraform, backed by OPA
- Fairwinds Insights - Run OPA policies consistently across CI/CD, Admission Control, and an multi-cluster scanner
- Snyk IaC - Test Infrastructure as Code source code repositories for security misconfigurations and best practices. The OPA golang libraries are used to evaluate Rego policies to detect misconfigurations in the repositories.
- Spacelift: Flexible management platform for Infrastructure as Code, backed by OPA
- env0: Infrastructure as Code automation platform, with OPA extensibility.
Built a great OPA integration or wrote an interesting blog or article on the topic? Submit a PR! Please just make sure to include something that describes how the project uses OPA, or how OPA is otherwise related.
For questions, discussions and announcements related to Styra products, services and open source projects, please join the Styra community on Slack!