Aserto

Fine-grained, policy-based, real-time authorization for APIs and microservices. Aserto is the maintainer of the Topaz and Open Policy Containers OSS projects.

Stars
24
Forks
2
Open issues
0
Closed issues
1
Last commit
6 months ago
Watchers
24
Total releases
0
Total commits
121
Open PRs
0
Closed PRs
40
Repo URL
Project Website
https://www.aserto.com
Platform
License
apache-2.0
Category
Offers premium version?
NO
Proprietary?
NO
About

runtime - an abstraction library on top of the Open Policy Agent (OPA)

Introduction

The "runtime" project is a library that sits on top of OPA.

The goal of the project is to allow you to quickly write code that builds, runs or tests OPA policies.

It uses the options pattern to facilitate construction of Runtime instances specific to your needs. You can start super simple, using it just to build some rego into a bundle, or you can get more complex, using it to start a runtime with plugins, built-ins and other features.

Install

go get -u github.com/aserto-dev/runtime
Usage
// Create a runtime
r, cleanup, err := runtime.NewRuntime(ctx, &logger, &runtime.Config{})
if err != nil {
  return errors.Wrap(err, "failed to create runtime")
}
defer cleanup()

// Use the runtime to build a bundle from the current directory return r.Build(runtime.BuildParams{ OutputFile: "my-bundle.tar.gz", }, ".")

You can find a more complete example in the example directory.

Credits

Based on the awesome Open Policy Agent.

Alternative Projects

Subscribe to Open Source Businees Newsletter

Twice a month we will interview people behind open source businesses. We will talk about how they are building a business on top of open source projects.

We'll never share your email with anyone else.