SlideShare a Scribd company logo
Copyright ©2021 Styra, Inc. | All Rights Reserved
Creators of Open Policy Agent
Simplify Open Policy Agent
with Styra DAS
Tim Hinrichs
CTO, co-founder Styra
co-creator OPA
@tlhinrichs
Copyright ©2021 Styra, Inc. | All Rights Reserved
Adoption of the Cloud-native Software Stack is Skyrocketing
Linux
Tekton
Github Actions
CICD
Container Management
Microservices / Apps
Databases
Public Cloud
Servers
Platform
App
CICD Pipeline
1 2 3 4
Gateway
Frontend
Backend
DB
App
2
Copyright ©2021 Styra, Inc. | All Rights Reserved
Authorization Happens Everywhere in the Cloud-native Stack
Linux
Tekton
Github Actions
CICD
Container Management
Microservices / Apps
Databases
Public Cloud
Servers
Platform
App
CICD Pipeline
1 2 3 4
Gateway
Frontend
Backend
DB
App
3
Can user Alice withdraw money from account 123?
Can service 456 request invoices from service 789 on
behalf of alice?
Can user Alice query the finance database?
Which rows and fields can service 456 request on
behalf of alice?
Does this application configuration meet company
standards?
Can the payments service be deployed to this
cluster?
Can pods in namespace payments run as
privileged?
Can this cluster send outbound requests to IP
13.6.0.1?
Are S3 buckets in account 1234 allowed to be
public?
Can EBS volumes for the payments app be
unencrypted?
Who can SSH to production servers?
Copyright ©2021 Styra, Inc. | All Rights Reserved
Two Classes of Authorization: Application and Platform
Linux
Tekton
Github Actions
CICD
Container Management
Microservices / Apps
Databases
Public Cloud
Servers
Platform
App
CICD Pipeline
1 2 3 4
Gateway
Frontend
Backend
DB
App
4
Application Authorization
Platform Authorization
Copyright ©2021 Styra, Inc. | All Rights Reserved
Open Policy Agent: Unified Authorization, Proven in Production
Linux
Tekton
Github Actions
Platform
App
CICD Pipeline
1 2 3 4
Gateway
Frontend
Backend
DB
App
OPA OPA
OPA
OPA
OPA
OPA
5
Copyright ©2021 Styra, Inc. | All Rights Reserved
Styra DAS: Operationalize OPA for the Enterprise
Linux
Tekton
Github Actions
OPA OPA
OPA
OPA
OPA
OPA
World’s first management plane
for Open Policy Agent
Vertically-integrated policy
lifecycle management
Enterprise-grade governance
Declarative
Authorization
Service
6
Copyright ©2021 Styra, Inc. | All Rights Reserved
Open Policy Agent Community
Open Policy Agent (OPA)
Cloud-native policy engine
Contributors: 30+
companies, 150+ devs
Founded by Styra (2016) / Sandbox (2018) / Incubating (2019) / Graduated (2021)
GitHub Stars
5000
Downloads
80M
Slack Users
4000
Sessions at KubeCon US 2019
● Yelp - How Yelp moved security from the app to the
mesh
● Google - Enforcing service mesh structure using OPA
● Goldman Sachs - K8s policy enforcement using OPA at
Goldman Sachs
● Snyk - Applying policy throughout the app lifecycle with
OPA
● Reddit - Kubernetes at Reddit: Tales from Production
● Adobe - What Makes A Good Multi Tenant Kubernetes
Solution
● Giant Swarm - Using OPA for complex CRD Validation
and Defaulting
OPA Summit at KubeCon US 2019
● Capital One - Open Policy Agent for Policy-enabled
Kubernetes and CICD
● Chef - Open Policy Agent in Practice: From Angular to
OPA in Chef Automate
● Pinterest - Open Policy Agent at Scale: How Pinterest
Manages Policy Distribution
● Tripadvisor - Building a Testing Framework for
Integrating Open Policy Agent into Kubernetes
● Atlassian - Deploying Open Policy Agent at Atlassian
Sessions at Virtual KubeCon EU 2020
● AquaSecurity: Handling Container Vulnerabilities with
Open Policy Agent
● ABN AMRO: How ABN AMRO Switched Cloud
Providers Without Anyone Noticing
● Medudoc: Securing Your Healthcare Data with OPA
Other events or public confirmation of using OPA: Bank of New
York Mellon, AWS, Synemedia, Pure Storage, VMware, Netflix,
Daimler, T-Mobile, Salesforce
Vendor-neutral open-source Growing Community Active End-users
Copyright ©2021 Styra, Inc. | All Rights Reserved
OPA’s flexibility and DAS for Management
Sidecar /
Daemon
Service
OP
A
Server
Library
(Go or
WASM)
Service
OP
A
Server
Centralized
Service
CLI
Server
Service
$ opa eval
Service
Server
OP
A
OP
A
OP
A
Architectural
Flexibility
Team A’s policies Team B’s policies Common library
Policy
Composition
Flexibility
Management
Flexibility
Declarative
Authorization
Service
Copyright ©2021 Styra, Inc. | All Rights Reserved
DAS: Policy Management for Individual Users and Teams
9
Enterprise
governance
Policy changes: roll out new policies
slowly and help teams prepare
Multi-team dependencies: policies are
stored in each team’s home repo but are
deployed as a unit
Author
Rego
Schemas
Modularize
Test
Assemble
Test
Impact
Deploy
Policy
Data
Dependency
Monitor
Health
Decisions
OPA
Integrate
Configure
Harden
Policy
lifecycle
management
Policy overrides: enforce global policies but
empower teams to add their own
Visibility: let security, compliance, operations know
which policies are enforced in which systems at a
glance so they can review & troubleshoot
Audit: Prove to auditors that the
policies you have are making the
decisions they should.
Sustainability: Ensure your OPA
deployment adapts to new teams &
software and outlives its creators’
tenure
CICD team
K8s team
LOB Team
Cloud team
Security
Compliance
Declarative
Authorization
Service
Copyright ©2021 Styra, Inc. | All Rights Reserved
Native DAS Support for Leading OPA Use Cases
DESIRED
STATE
k8s API
Server
Pod
Network
Policy
Volumes
OPA
Protect k8s compute,
network, storage, app
configuration
OPA
Protect public cloud
configuration
Service A Service B
OPA OPA
Protect inbound and
outbound
microservice APIs
Custom
Service
OPA
Protect your custom
resources and API
calls
Copyright ©2021 Styra, Inc. | All Rights Reserved
Creators of Open Policy Agent
Open Policy Agent
openpolicyagent.org
@openpolicyagent
Styra
styra.com
@styrainc
Tim Hinrichs
CTO, co-founder Styra
co-creator OPA
@tlhinrichs
Copyright ©2021 Styra, Inc. | All Rights Reserved
Creators of Open Policy Agent
Popular OPA/DAS Use Cases
Copyright ©2021 Styra, Inc. | All Rights Reserved
Native DAS Support for Leading OPA Use Cases
DESIRED
STATE
k8s API
Server
Pod
Network
Policy
Volumes
OPA
Protect k8s compute,
network, storage, app
configuration
OPA
Protect public cloud
configuration
Service A Service B
OPA OPA
Protect inbound and
outbound
microservice APIs
Custom
Service
OPA
Protect your custom
resources and API
calls
Copyright ©2021 Styra, Inc. | All Rights Reserved
Kubernetes Challenges
OPERATIONS SECURITY COMPLIANCE
CICD well implemented, policy
defined, protected against
mistakes
Prove what has been
blocked/allowed over time. Easy
reporting, extremely detailed
historical checks
Wrong app accepting web
traffic, improper egress,
improper permissions….
Not including liveness probes on
pods
Failing to specify encrypted
storage
Duplicating paths/names so traffic
goes to the wrong service
Running containers
as privileged
Setting up network connections to
non-approved IPs / Internet
Runaway resource usage because no
limits were specified
Failing to include proper labels
required for traffic control
Running Images from
Unauthorized Registries
Copyright ©2021 Styra, Inc. | All Rights Reserved
Styra DAS: Push-button Authorization Controls for K8s
15
DESIRED
STATE
API
Server
RUNTIME STATE
DESIRED
STATE
API
Server
RUNTIME STATE
...
Open Policy Agent
● makes decisions locally and logs centrally
● flexible policy language
● vendor-neutral open-source (CNCF)
Declarative
Authorization
Service
OPA
OPA
Styra DAS
● OPA control plane
● 100+ Pre-built policies
● PCI, MITRE, PSP, CIS packs
● install in under 5 minutes
● multi-cluster policy authoring
● impact analysis
Support
all k8s
flavors
Copyright ©2021 Styra, Inc. | All Rights Reserved
Terraform Challenges
OPERATIONS SECURITY COMPLIANCE
CICD well implemented, policy
defined, protected against
mistakes
Prove what has been
blocked/allowed over time. Easy
reporting, extremely detailed
historical checks
Wrong app accepting web
traffic, improper egress,
improper permissions….
Failing to specify encrypted
storage
Duplicating paths/names so traffic
goes to the wrong service
Setting up network connections to
non-approved IPs / Internet
Runaway resource usage because no
limits were specified
Failing to include proper labels for
chargeback
Running unauthorized VM
images
Copyright ©2021 Styra, Inc. | All Rights Reserved
Styra DAS: Authorization Controls for Terraform
17
Open Policy Agent
● makes decisions locally and logs centrally
● provides flexible policy language
● vendor-neutral open-source (CNCF)
Declarative
Authorization
Service
OPA
Styra DAS
● policy assembly from multiple
sources of truth
● distribution of policy to OPA
● audit log of decisions
● dry-runs policy changes
Desired
State
Planned
Changes
terraform plan terraform apply
Copyright ©2021 Styra, Inc. | All Rights Reserved
Microservice Authorization Challenges
Can Alice see the list of
outgoing payments?
18
Service A
Service B
Service C
Can service A ask for Alice’s
profile on behalf of Alice?
Can service A ask for Hooli’s outgoing
payments on behalf of Alice?
On every API call, every microservice makes an authorization decision
Authz Implementation Challenges
● Different languages across
services.
● Centralized service is too slow
for microservices
● New services/teams should
snap into framework
● Security/compliance should be
able to audit policies
● Journey from coarse-grained
permissions to fine-grained and
from gateway enforcement to
microservice enforcement
Copyright ©2021 Styra, Inc. | All Rights Reserved
Styra DAS: Authorization Sidecar Plus Control Plane
19
Service A
Service B
Service C
Open Policy Agent
● makes decisions locally and logs centrally
● flexible policy language
● vendor-neutral open-source (CNCF)
Declarative
Authorization
Service
OPA
OPA
OPA
Styra DAS
● OPA control plane
● distributes policies
● monitors OPAs
● team-based policy authoring
● impact analysis
Copyright ©2021 Styra, Inc. | All Rights Reserved
Creators of Open Policy Agent
FAQ
Copyright ©2021 Styra, Inc. | All Rights Reserved
What does Policy-as-code mean and what does OPA provide?
21
Communicate
Policies written in file
format that people AND a
policy engine understand.
● Precise
● Dry-runnable
● Portable
Enforce
Policy engine integrated
into software and uses
policies to make
authorization decisions
● Fast
● Comprehensive
● Correct
Audit
Policy engine records all
decisions and can be
analyzed like any data
● Always-on
● Comprehensive
● Deep
Govern
Policy files have a lifecycle
(approval, test, build,
deploy) for governance.
● Manual &
Automated
● Granular
Policy-as-Code Approach to Authorization
21
OPA
Provides
.rego
Policy file
+
Policy engine
OPA
Policy tools
+
Copyright ©2021 Styra, Inc. | All Rights Reserved
How does OPA work?
Service
OP
A
Policy
(Rego)
Data
(JSON)
Request
Policy
Decision
Policy
Query
Input can be ANY JSON value Output can be ANY JSON value
OPA makes decisions.
Service enforces decisions.
Linux
22
Copyright ©2021 Styra, Inc. | All Rights Reserved
What does an OPA policy for Kubernetes look like?
package kubernetes.admission
deny[msg] {
input.request.kind.kind == "Pod"
some i
image := input.request.object.spec.containers[i].image
not startswith(image, "hooli.com/")
msg := sprintf("image comes from bad registry: %v", [image])
}
apiVersion: admission.k8s.io/v1beta1
kind: AdmissionReview
request:
kind:
group: ''
kind: Pod
version: v1
namespace: opa
object:
metadata:
labels:
app: nginx
name: nginx
namespace: opa
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx
operation: CREATE
JSON/YAML from Kubernetes
OPA Policy: All images come from a trusted registry
OPA Playground
Copyright ©2021 Styra, Inc. | All Rights Reserved
What does an OPA policy for Envoy look like?
package envoy.authz
# everyone can GET /
allow {
input.attributes.request.http.method == "GET"
input.parsed_path = ["/"]
}
# updates to /v1/admin/{id} dependent on source IP
allow {
input.attributes.request.http.method == "PUT"
input.parsed_path = ["v1", "admin", id]
user_is_admin
src := input.attributes.source.address.Address.SocketAddress.address
net.cidr_contains("172.28.0.0/16", src)
}
user_is_admin { ... }
parsed_path: [“api”, “v1”, “products”]
attributes:
source:
address:
Address:
SocketAddress:
address: "172.17.0.10"
PortSpecifier:
PortValue: 36472
destination:
address:
Address:
SocketAddress:
address: "172.17.0.17"
PortSpecifier:
PortValue: 9080
request:
http:
id: 13359530607844510314
method: GET
headers: ...
path: "/api/v1/products"
host: "192.168.99.100:31380"
protocol: "HTTP/1.1"
JSON/YAML from Envoy
OPA Policy: Allow all GET and some PUT
OPA Playground
Copyright ©2021 Styra, Inc. | All Rights Reserved
Creators of Open Policy Agent
Thanks!

More Related Content

PDF
INTERFACE, by apidays - The future of API Management in a hybrid, multi-clou...
apidays
 
PDF
Does your API need to be PCI Compliant?
Apigee | Google Cloud
 
PPTX
apidays LIVE Hong Kong 2021 - Headless API Management by Snehal Chakraborty, ...
apidays
 
PDF
Which ap is which business models_ a real-world guide for banks in sri lanka
WSO2
 
PDF
[apidays LIVE HONK KONG] - Building an Integrated Supply Chain for APIs
WSO2
 
PDF
apidays LIVE Australia 2021 - Overcoming the 3 Largest Obstacles to Digital T...
apidays
 
PDF
Which APIs? which business models - A real-world guide for African banks.
WSO2
 
PDF
INTERFACE, by apidays - How APIs are making innovation exponential by Shaile...
apidays
 
INTERFACE, by apidays - The future of API Management in a hybrid, multi-clou...
apidays
 
Does your API need to be PCI Compliant?
Apigee | Google Cloud
 
apidays LIVE Hong Kong 2021 - Headless API Management by Snehal Chakraborty, ...
apidays
 
Which ap is which business models_ a real-world guide for banks in sri lanka
WSO2
 
[apidays LIVE HONK KONG] - Building an Integrated Supply Chain for APIs
WSO2
 
apidays LIVE Australia 2021 - Overcoming the 3 Largest Obstacles to Digital T...
apidays
 
Which APIs? which business models - A real-world guide for African banks.
WSO2
 
INTERFACE, by apidays - How APIs are making innovation exponential by Shaile...
apidays
 

What's hot (20)

PPTX
apidays LIVE New York 2021 - API Economy in Financial Services by Giovanni Le...
apidays
 
PDF
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
apidays
 
PPTX
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...
apidays
 
PPTX
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays
 
PDF
An Entry Point to Impactful Open Banking Architecture
WSO2
 
PPTX
apidays LIVE Hong Kong 2021 - Digital Identity Centric Approach to Accelerate...
apidays
 
PDF
[WSO2 Integration Summit Singapore 2019] Achieving Predictable Success in Dig...
WSO2
 
PDF
apidays LIVE India - Digital Trust Infrastructure - Key to digital transforma...
apidays
 
PDF
[WSO2 Summit EMEA 2020] Experiencing the Benefits of API Driven Open Banking
WSO2
 
PDF
INTERFACE, by apidays - A cloud-native approach for open banking in action b...
apidays
 
PDF
apidays LIVE Hong Kong 2021 - Modernizing Monolith Applications with API Arch...
apidays
 
PDF
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...
WSO2
 
PDF
[WSO2 Integration Summit Singapore 2019] The API-driven World
WSO2
 
PDF
Best Practices for Productizing APIs with API Management and Automated Testing
WSO2
 
PDF
API-first Integration for Microservices
WSO2
 
PDF
apidays LIVE Paris 2021 - API4IPS - API essentials for Public Sector Innovati...
apidays
 
PDF
API Security Best Practices and Guidelines
WSO2
 
PDF
apidays LIVE Hong Kong 2021 - Next Stage for Open API at Banking Industry by ...
apidays
 
PDF
INTERFACE, by apidays - Lessons learned from implementing our custom ‘Big Da...
apidays
 
PPTX
apidays LIVE Hong Kong 2021 - API Ecosystem and Banking Open API Phase III & ...
apidays
 
apidays LIVE New York 2021 - API Economy in Financial Services by Giovanni Le...
apidays
 
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
apidays
 
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...
apidays
 
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays
 
An Entry Point to Impactful Open Banking Architecture
WSO2
 
apidays LIVE Hong Kong 2021 - Digital Identity Centric Approach to Accelerate...
apidays
 
[WSO2 Integration Summit Singapore 2019] Achieving Predictable Success in Dig...
WSO2
 
apidays LIVE India - Digital Trust Infrastructure - Key to digital transforma...
apidays
 
[WSO2 Summit EMEA 2020] Experiencing the Benefits of API Driven Open Banking
WSO2
 
INTERFACE, by apidays - A cloud-native approach for open banking in action b...
apidays
 
apidays LIVE Hong Kong 2021 - Modernizing Monolith Applications with API Arch...
apidays
 
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...
WSO2
 
[WSO2 Integration Summit Singapore 2019] The API-driven World
WSO2
 
Best Practices for Productizing APIs with API Management and Automated Testing
WSO2
 
API-first Integration for Microservices
WSO2
 
apidays LIVE Paris 2021 - API4IPS - API essentials for Public Sector Innovati...
apidays
 
API Security Best Practices and Guidelines
WSO2
 
apidays LIVE Hong Kong 2021 - Next Stage for Open API at Banking Industry by ...
apidays
 
INTERFACE, by apidays - Lessons learned from implementing our custom ‘Big Da...
apidays
 
apidays LIVE Hong Kong 2021 - API Ecosystem and Banking Open API Phase III & ...
apidays
 
Ad

Similar to apidays LIVE New York 2021 - Simplify Open Policy Agent with Styra DAS by Tim Hinrichs, Styra (20)

PDF
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...
apidays
 
PDF
Dynamic Policy Enforcement for Microservice Environments
Nebulaworks
 
PDF
DSO-LG 2021 Reboot: Policy As Code (Anders Eknert)
Michael Man
 
PPTX
Cloud native policy enforcement with Open Policy Agent
LibbySchulze
 
PPTX
OPA APIs and Use Case Survey
Torin Sandall
 
PDF
Dynamic Authorization & Policy Control for Docker Environments
Torin Sandall
 
PDF
Fine-grained Authorization in a Containerized World
Ashutosh Narkar
 
PDF
GitLab Commit: Enhance your Compliance with Policy-Based CI/CD
Nico Meisenzahl
 
PDF
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
CodeValue
 
PPTX
The Evolution of Distributed API Authorization - by Anders Eknert, Styra
Nordic APIs
 
PDF
Defining & Enforcing Policies the GitOps Way
Weaveworks
 
PDF
DCSF19 Kubernetes Security with OPA
Docker, Inc.
 
PDF
Open Policy Agent
Torin Sandall
 
PPTX
Open Policy Agent for governance as a code
Alexander Tokarev
 
PPTX
Opa microservice authorization
Anders Eknert
 
PDF
Continuous Lifecycle: Enhance Your Compliance and Governance With Policy-Base...
Nico Meisenzahl
 
PDF
OPA open policy agent
Knoldus Inc.
 
PDF
Cloud Native User Group: Shift-Left Testing IaC With PaC
smalltown
 
PDF
Securing Kubernetes Workloads
Jim Bugwadia
 
PDF
Cncf microservices security
Leonardo Gonçalves
 
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...
apidays
 
Dynamic Policy Enforcement for Microservice Environments
Nebulaworks
 
DSO-LG 2021 Reboot: Policy As Code (Anders Eknert)
Michael Man
 
Cloud native policy enforcement with Open Policy Agent
LibbySchulze
 
OPA APIs and Use Case Survey
Torin Sandall
 
Dynamic Authorization & Policy Control for Docker Environments
Torin Sandall
 
Fine-grained Authorization in a Containerized World
Ashutosh Narkar
 
GitLab Commit: Enhance your Compliance with Policy-Based CI/CD
Nico Meisenzahl
 
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
CodeValue
 
The Evolution of Distributed API Authorization - by Anders Eknert, Styra
Nordic APIs
 
Defining & Enforcing Policies the GitOps Way
Weaveworks
 
DCSF19 Kubernetes Security with OPA
Docker, Inc.
 
Open Policy Agent
Torin Sandall
 
Open Policy Agent for governance as a code
Alexander Tokarev
 
Opa microservice authorization
Anders Eknert
 
Continuous Lifecycle: Enhance Your Compliance and Governance With Policy-Base...
Nico Meisenzahl
 
OPA open policy agent
Knoldus Inc.
 
Cloud Native User Group: Shift-Left Testing IaC With PaC
smalltown
 
Securing Kubernetes Workloads
Jim Bugwadia
 
Cncf microservices security
Leonardo Gonçalves
 
Ad

More from apidays (20)

PDF
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
apidays
 
PDF
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
apidays
 
PDF
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
apidays
 
PDF
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
apidays
 
PDF
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
apidays
 
PDF
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
apidays
 
PDF
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
apidays
 
PDF
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
apidays
 
PDF
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
apidays
 
PPTX
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
apidays
 
PPTX
apidays Munich 2025 - Effectively incorporating API Security into the overall...
apidays
 
PPTX
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
apidays
 
PPTX
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
apidays
 
PPTX
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
apidays
 
PPTX
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
apidays
 
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
PDF
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays
 
PDF
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
PDF
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
apidays
 
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
apidays
 
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
apidays
 
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
apidays
 
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
apidays
 
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
apidays
 
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
apidays
 
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
apidays
 
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
apidays
 
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
apidays
 
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
apidays
 
apidays Munich 2025 - Effectively incorporating API Security into the overall...
apidays
 
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
apidays
 
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
apidays
 
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
apidays
 
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
apidays
 
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays
 
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
apidays
 
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 

Recently uploaded (20)

PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Software Development Methodologies in 2025
KodekX
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
The Future of Artificial Intelligence (AI)
Mukul
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 

apidays LIVE New York 2021 - Simplify Open Policy Agent with Styra DAS by Tim Hinrichs, Styra

  • 1. Copyright ©2021 Styra, Inc. | All Rights Reserved Creators of Open Policy Agent Simplify Open Policy Agent with Styra DAS Tim Hinrichs CTO, co-founder Styra co-creator OPA @tlhinrichs
  • 2. Copyright ©2021 Styra, Inc. | All Rights Reserved Adoption of the Cloud-native Software Stack is Skyrocketing Linux Tekton Github Actions CICD Container Management Microservices / Apps Databases Public Cloud Servers Platform App CICD Pipeline 1 2 3 4 Gateway Frontend Backend DB App 2
  • 3. Copyright ©2021 Styra, Inc. | All Rights Reserved Authorization Happens Everywhere in the Cloud-native Stack Linux Tekton Github Actions CICD Container Management Microservices / Apps Databases Public Cloud Servers Platform App CICD Pipeline 1 2 3 4 Gateway Frontend Backend DB App 3 Can user Alice withdraw money from account 123? Can service 456 request invoices from service 789 on behalf of alice? Can user Alice query the finance database? Which rows and fields can service 456 request on behalf of alice? Does this application configuration meet company standards? Can the payments service be deployed to this cluster? Can pods in namespace payments run as privileged? Can this cluster send outbound requests to IP 13.6.0.1? Are S3 buckets in account 1234 allowed to be public? Can EBS volumes for the payments app be unencrypted? Who can SSH to production servers?
  • 4. Copyright ©2021 Styra, Inc. | All Rights Reserved Two Classes of Authorization: Application and Platform Linux Tekton Github Actions CICD Container Management Microservices / Apps Databases Public Cloud Servers Platform App CICD Pipeline 1 2 3 4 Gateway Frontend Backend DB App 4 Application Authorization Platform Authorization
  • 5. Copyright ©2021 Styra, Inc. | All Rights Reserved Open Policy Agent: Unified Authorization, Proven in Production Linux Tekton Github Actions Platform App CICD Pipeline 1 2 3 4 Gateway Frontend Backend DB App OPA OPA OPA OPA OPA OPA 5
  • 6. Copyright ©2021 Styra, Inc. | All Rights Reserved Styra DAS: Operationalize OPA for the Enterprise Linux Tekton Github Actions OPA OPA OPA OPA OPA OPA World’s first management plane for Open Policy Agent Vertically-integrated policy lifecycle management Enterprise-grade governance Declarative Authorization Service 6
  • 7. Copyright ©2021 Styra, Inc. | All Rights Reserved Open Policy Agent Community Open Policy Agent (OPA) Cloud-native policy engine Contributors: 30+ companies, 150+ devs Founded by Styra (2016) / Sandbox (2018) / Incubating (2019) / Graduated (2021) GitHub Stars 5000 Downloads 80M Slack Users 4000 Sessions at KubeCon US 2019 ● Yelp - How Yelp moved security from the app to the mesh ● Google - Enforcing service mesh structure using OPA ● Goldman Sachs - K8s policy enforcement using OPA at Goldman Sachs ● Snyk - Applying policy throughout the app lifecycle with OPA ● Reddit - Kubernetes at Reddit: Tales from Production ● Adobe - What Makes A Good Multi Tenant Kubernetes Solution ● Giant Swarm - Using OPA for complex CRD Validation and Defaulting OPA Summit at KubeCon US 2019 ● Capital One - Open Policy Agent for Policy-enabled Kubernetes and CICD ● Chef - Open Policy Agent in Practice: From Angular to OPA in Chef Automate ● Pinterest - Open Policy Agent at Scale: How Pinterest Manages Policy Distribution ● Tripadvisor - Building a Testing Framework for Integrating Open Policy Agent into Kubernetes ● Atlassian - Deploying Open Policy Agent at Atlassian Sessions at Virtual KubeCon EU 2020 ● AquaSecurity: Handling Container Vulnerabilities with Open Policy Agent ● ABN AMRO: How ABN AMRO Switched Cloud Providers Without Anyone Noticing ● Medudoc: Securing Your Healthcare Data with OPA Other events or public confirmation of using OPA: Bank of New York Mellon, AWS, Synemedia, Pure Storage, VMware, Netflix, Daimler, T-Mobile, Salesforce Vendor-neutral open-source Growing Community Active End-users
  • 8. Copyright ©2021 Styra, Inc. | All Rights Reserved OPA’s flexibility and DAS for Management Sidecar / Daemon Service OP A Server Library (Go or WASM) Service OP A Server Centralized Service CLI Server Service $ opa eval Service Server OP A OP A OP A Architectural Flexibility Team A’s policies Team B’s policies Common library Policy Composition Flexibility Management Flexibility Declarative Authorization Service
  • 9. Copyright ©2021 Styra, Inc. | All Rights Reserved DAS: Policy Management for Individual Users and Teams 9 Enterprise governance Policy changes: roll out new policies slowly and help teams prepare Multi-team dependencies: policies are stored in each team’s home repo but are deployed as a unit Author Rego Schemas Modularize Test Assemble Test Impact Deploy Policy Data Dependency Monitor Health Decisions OPA Integrate Configure Harden Policy lifecycle management Policy overrides: enforce global policies but empower teams to add their own Visibility: let security, compliance, operations know which policies are enforced in which systems at a glance so they can review & troubleshoot Audit: Prove to auditors that the policies you have are making the decisions they should. Sustainability: Ensure your OPA deployment adapts to new teams & software and outlives its creators’ tenure CICD team K8s team LOB Team Cloud team Security Compliance Declarative Authorization Service
  • 10. Copyright ©2021 Styra, Inc. | All Rights Reserved Native DAS Support for Leading OPA Use Cases DESIRED STATE k8s API Server Pod Network Policy Volumes OPA Protect k8s compute, network, storage, app configuration OPA Protect public cloud configuration Service A Service B OPA OPA Protect inbound and outbound microservice APIs Custom Service OPA Protect your custom resources and API calls
  • 11. Copyright ©2021 Styra, Inc. | All Rights Reserved Creators of Open Policy Agent Open Policy Agent openpolicyagent.org @openpolicyagent Styra styra.com @styrainc Tim Hinrichs CTO, co-founder Styra co-creator OPA @tlhinrichs
  • 12. Copyright ©2021 Styra, Inc. | All Rights Reserved Creators of Open Policy Agent Popular OPA/DAS Use Cases
  • 13. Copyright ©2021 Styra, Inc. | All Rights Reserved Native DAS Support for Leading OPA Use Cases DESIRED STATE k8s API Server Pod Network Policy Volumes OPA Protect k8s compute, network, storage, app configuration OPA Protect public cloud configuration Service A Service B OPA OPA Protect inbound and outbound microservice APIs Custom Service OPA Protect your custom resources and API calls
  • 14. Copyright ©2021 Styra, Inc. | All Rights Reserved Kubernetes Challenges OPERATIONS SECURITY COMPLIANCE CICD well implemented, policy defined, protected against mistakes Prove what has been blocked/allowed over time. Easy reporting, extremely detailed historical checks Wrong app accepting web traffic, improper egress, improper permissions…. Not including liveness probes on pods Failing to specify encrypted storage Duplicating paths/names so traffic goes to the wrong service Running containers as privileged Setting up network connections to non-approved IPs / Internet Runaway resource usage because no limits were specified Failing to include proper labels required for traffic control Running Images from Unauthorized Registries
  • 15. Copyright ©2021 Styra, Inc. | All Rights Reserved Styra DAS: Push-button Authorization Controls for K8s 15 DESIRED STATE API Server RUNTIME STATE DESIRED STATE API Server RUNTIME STATE ... Open Policy Agent ● makes decisions locally and logs centrally ● flexible policy language ● vendor-neutral open-source (CNCF) Declarative Authorization Service OPA OPA Styra DAS ● OPA control plane ● 100+ Pre-built policies ● PCI, MITRE, PSP, CIS packs ● install in under 5 minutes ● multi-cluster policy authoring ● impact analysis Support all k8s flavors
  • 16. Copyright ©2021 Styra, Inc. | All Rights Reserved Terraform Challenges OPERATIONS SECURITY COMPLIANCE CICD well implemented, policy defined, protected against mistakes Prove what has been blocked/allowed over time. Easy reporting, extremely detailed historical checks Wrong app accepting web traffic, improper egress, improper permissions…. Failing to specify encrypted storage Duplicating paths/names so traffic goes to the wrong service Setting up network connections to non-approved IPs / Internet Runaway resource usage because no limits were specified Failing to include proper labels for chargeback Running unauthorized VM images
  • 17. Copyright ©2021 Styra, Inc. | All Rights Reserved Styra DAS: Authorization Controls for Terraform 17 Open Policy Agent ● makes decisions locally and logs centrally ● provides flexible policy language ● vendor-neutral open-source (CNCF) Declarative Authorization Service OPA Styra DAS ● policy assembly from multiple sources of truth ● distribution of policy to OPA ● audit log of decisions ● dry-runs policy changes Desired State Planned Changes terraform plan terraform apply
  • 18. Copyright ©2021 Styra, Inc. | All Rights Reserved Microservice Authorization Challenges Can Alice see the list of outgoing payments? 18 Service A Service B Service C Can service A ask for Alice’s profile on behalf of Alice? Can service A ask for Hooli’s outgoing payments on behalf of Alice? On every API call, every microservice makes an authorization decision Authz Implementation Challenges ● Different languages across services. ● Centralized service is too slow for microservices ● New services/teams should snap into framework ● Security/compliance should be able to audit policies ● Journey from coarse-grained permissions to fine-grained and from gateway enforcement to microservice enforcement
  • 19. Copyright ©2021 Styra, Inc. | All Rights Reserved Styra DAS: Authorization Sidecar Plus Control Plane 19 Service A Service B Service C Open Policy Agent ● makes decisions locally and logs centrally ● flexible policy language ● vendor-neutral open-source (CNCF) Declarative Authorization Service OPA OPA OPA Styra DAS ● OPA control plane ● distributes policies ● monitors OPAs ● team-based policy authoring ● impact analysis
  • 20. Copyright ©2021 Styra, Inc. | All Rights Reserved Creators of Open Policy Agent FAQ
  • 21. Copyright ©2021 Styra, Inc. | All Rights Reserved What does Policy-as-code mean and what does OPA provide? 21 Communicate Policies written in file format that people AND a policy engine understand. ● Precise ● Dry-runnable ● Portable Enforce Policy engine integrated into software and uses policies to make authorization decisions ● Fast ● Comprehensive ● Correct Audit Policy engine records all decisions and can be analyzed like any data ● Always-on ● Comprehensive ● Deep Govern Policy files have a lifecycle (approval, test, build, deploy) for governance. ● Manual & Automated ● Granular Policy-as-Code Approach to Authorization 21 OPA Provides .rego Policy file + Policy engine OPA Policy tools +
  • 22. Copyright ©2021 Styra, Inc. | All Rights Reserved How does OPA work? Service OP A Policy (Rego) Data (JSON) Request Policy Decision Policy Query Input can be ANY JSON value Output can be ANY JSON value OPA makes decisions. Service enforces decisions. Linux 22
  • 23. Copyright ©2021 Styra, Inc. | All Rights Reserved What does an OPA policy for Kubernetes look like? package kubernetes.admission deny[msg] { input.request.kind.kind == "Pod" some i image := input.request.object.spec.containers[i].image not startswith(image, "hooli.com/") msg := sprintf("image comes from bad registry: %v", [image]) } apiVersion: admission.k8s.io/v1beta1 kind: AdmissionReview request: kind: group: '' kind: Pod version: v1 namespace: opa object: metadata: labels: app: nginx name: nginx namespace: opa spec: containers: - image: nginx imagePullPolicy: Always name: nginx operation: CREATE JSON/YAML from Kubernetes OPA Policy: All images come from a trusted registry OPA Playground
  • 24. Copyright ©2021 Styra, Inc. | All Rights Reserved What does an OPA policy for Envoy look like? package envoy.authz # everyone can GET / allow { input.attributes.request.http.method == "GET" input.parsed_path = ["/"] } # updates to /v1/admin/{id} dependent on source IP allow { input.attributes.request.http.method == "PUT" input.parsed_path = ["v1", "admin", id] user_is_admin src := input.attributes.source.address.Address.SocketAddress.address net.cidr_contains("172.28.0.0/16", src) } user_is_admin { ... } parsed_path: [“api”, “v1”, “products”] attributes: source: address: Address: SocketAddress: address: "172.17.0.10" PortSpecifier: PortValue: 36472 destination: address: Address: SocketAddress: address: "172.17.0.17" PortSpecifier: PortValue: 9080 request: http: id: 13359530607844510314 method: GET headers: ... path: "/api/v1/products" host: "192.168.99.100:31380" protocol: "HTTP/1.1" JSON/YAML from Envoy OPA Policy: Allow all GET and some PUT OPA Playground
  • 25. Copyright ©2021 Styra, Inc. | All Rights Reserved Creators of Open Policy Agent Thanks!

Editor's Notes

  • #18: What each of OPA/DAS does to implement authorization.