ilusm.dev

opa

policy-as-code: rule evaluation, RBAC/ABAC, decision logging.

Load with: use opa

Quick example

use opa

result = opamk("hello")
prn(result)

Functions

Functions

opamk(name)

Creates a new instance. Takes name.

opadf(eng, v)

Performs the operation. Takes eng, v.

oparl(act, res, cond)

Performs the operation. Takes act, res, cond.

opady(act, res, cond)

Performs the operation. Takes act, res, cond.

opaar(eng, rule)

Performs the operation. Takes eng, rule.

opaev(eng, subj, act, res, ctx)

Performs the operation. Takes eng, subj, act, res, ctx.

opaok(eng, subj, act, res, ctx)

Performs the operation. Takes eng, subj, act, res, ctx.

opalk(eng, subj, act, res, ctx)

Performs the operation. Takes eng, subj, act, res, ctx.

opalg(eng)

Performs the operation. Takes eng.

opaclr(eng)

Performs the operation. Takes eng.

oparb(eng, role, acts, ress)

Performs the operation. Takes eng, role, acts, ress.

opaab(eng, attr, val, acts, ress)

Performs the operation. Takes eng, attr, val, acts, ress.

Module aliases

These are the public-facing names you call with use opa:

  • opa.new(n)
  • opa.dflt(e, v)
  • opa.allow(a, r, c)
  • opa.deny(a, r, c)
  • opa.add(e, rl)
  • opa.eval(e, s, a, r, c)
  • opa.ok(e, s, a, r, c)
  • opa.must(e, s, a, r, c)
  • opa.log(e)
  • opa.clr(e)
  • opa.rbac(e, ro, as, rs)
  • opa.abac(e, at, v, as, rs)

Notes

  • Open Policy Agent integration - policy evaluation.