OPA for policyOPA for policyenforcementenforcementSibi PrabakaranApril 29, 2020
View Slide
AgendaAgendaOverview of OPARegoUsecases/Integra onsExample integra on of OPA + Python web service
OPAOPAProject started in a company named Styra at 2016Currently an incubator project at Linux founda on(CNCF)Goal: Unify policy enforcement
OverviewOverview
RegoRegoLanguage for wri ng policyExpresssions, Variables, RulesItera onTooling
ExpressionsExpressions> input.servers[0].protocols[0]"https"> input.servers[0].protocols[0]undefined decisioninput.servers[0].id == "app"input.servers[0].protocols[0] == "https"
Rego VariablesRego Variableshello := "world"
IterationIterationnetworks = [{ "id": "net1", "public": false}, { "id": "net2","public": false}]> networks[x]+---+------------------------------+| x | networks[x] |+---+------------------------------+| 0 | {"id":"net1","public":false} || 1 | {"id":"net2","public":false} |+---+------------------------------+
RulesRulesany_public_networks = true { # is true if...net := networks[_] # some network exists and..net.public # it is public.}
API IntegrationAPI IntegrationPython codeRego code
ExperienceExperiencePoliciesError messages aren’t niceCommunityTooling
OPAOPAIntegrationsIntegrations
ComparisionComparisionwith Sentinelwith SentinelOpen SourceApplicable more generallyLanguage differences
Other StuOther StuWASM SupportEditor integra onsh ps://play.openpolicyagent.org/
HaskellHaskell- Fugue RegoToolkith ps://github.com/fugue/fregot
QuestionsQuestions