opa

package
v0.0.0-...-32d3a74 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package opa provides a methods for approving or denying requests to docker via an opa policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerHandler

type DockerHandler interface {
	ValidateRequest(r *http.Request) (bool, error)
	ValidateDockerFile(r *http.Request, dockerFile string) (bool, error)
}

DockerHandler validates either a regular request or a build request (with supplied dockerfile)

type DockerOpaHandler

type DockerOpaHandler struct {
	ProxyPolicyFile      string
	DockerfilePolicyFile string
}

DockerOpaHandler contains the policy files for authorizing requests

func (DockerOpaHandler) ValidateDockerFile

func (p DockerOpaHandler) ValidateDockerFile(r *http.Request, dockerFile string) (bool, error)

ValidateDockerFile validate the dockerfile passed through the given request verifies against the DockerfilePolicyFile using the path data.docker.build.allow

func (DockerOpaHandler) ValidateRequest

func (p DockerOpaHandler) ValidateRequest(r *http.Request) (bool, error)

ValidateRequest validates a standard docker request (not build) verifies against the ProxyPolicyFile using the path data.docker.authz.allow

Jump to

Keyboard shortcuts

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