oslopolicy2rego

package
v0.0.0-...-5d42b18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2018 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OsloPolicy2Rego

func OsloPolicy2Rego(packageName, input string) (string, error)

OsloPolicy2Rego takes a yaml or JSON string containing oslo.policy rules and converts them into Rego language.

It takes the packageName as the first argument, which should be a string that consists of ascii letters and numbers, with periods. This will represent the name of the package in OPA, and will be persisted to the URL that will be used for doing queries.

For example, if you pass "openstack.policy" as a packageName, the
resulting package name will be "openstack.policy". Subsequently you'll
be able to query: http://<OPA URL>/v1/data/openstack/policy/allow

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL