Anderson Dadario & Denys Vitali

Decoupled Authorization using Policy as Code

What if you could change authorization rules without redeploying your application? See how to manage access control like code.

Decoupled Authorization using Policy as Code
#1about 3 minutes

The challenges of embedding authorization in application code

Embedding authorization logic directly into application code leads to tight coupling, auditing difficulties, and operational overhead when policies change.

#2about 6 minutes

Introducing Policy as Code and Open Policy Agent

Policy as Code decouples authorization from business logic, and Open Policy Agent (OPA) is an open-source engine that implements this pattern.

#3about 3 minutes

How OPA works with a simple Rego policy

A simple example demonstrates how an application delegates authorization decisions to OPA by sending a JSON input to be evaluated against a policy written in Rego.

#4about 2 minutes

Demo of basic policy evaluation using OPA

A command-line demo shows how to run OPA tests, start the server, and use curl to query the policy engine with different inputs to get allow or deny decisions.

#5about 7 minutes

Demo of integrating OPA with a Go API middleware

A Go web service uses a middleware to intercept requests, construct an input object, and query OPA to enforce complex, attribute-based access control rules.

#6about 4 minutes

Dynamically updating authorization policies without downtime

By updating a policy file and reloading it into the running OPA server via an API call, authorization rules can be changed instantly without restarting the application.

#7about 3 minutes

Exploring other use cases for OPA beyond web APIs

OPA can enforce policies in various environments, including Kubernetes admission control, Kafka, and even Linux system access via PAM modules.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles
CH
Chris Heilmann
With AIs wide open - WeAreDevelopers at All Things Open 2025
Last week our VP of Developer Relations, Chris Heilmann, flew to Raleigh, North Carolina to present at All Things Open . An excellent event he had spoken at a few times in the past and this being the “Lucky 13” edition, he didn’t hesitate to come and...
With AIs wide open - WeAreDevelopers at All Things Open 2025
DC
Daniel Cranney
What is Agentic Programming and Why Should Developers Care?
Since the release of tools like ChatGPT and GitHub Copilot, the way developers work has shifted dramatically. What began as simple autocomplete in the early versions of Copilot has quickly evolved into agentic programming, where AI agents can take on...
What is Agentic Programming and Why Should Developers Care?

From learning to earning

Jobs that call for the skills explored in this talk.

Software Developer

Software Developer

Policy Link Ltd
Sunderland, United Kingdom

32-42K
PHP
API
GIT
.NET
+7