lbac

package
v0.0.0-...-d2452cb Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FromMetadata

type FromMetadata struct {
	FromNamespace string
	FromKey       string
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is an implementation of the ExternalProcessor gRPC service. See https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/ext_proc_filter Server will check the provided metadata for the policies to enforce if not set explicitly. Server requires some runtime state to evaluate the lbac.Policies against. Metadata is checked under the lbac.DefaultMetadataNamespace key and the lbac.DefaultPolicySubKey sub-key. The server will expect the state to be passed in the metadata under the lbac.DefaultStateMetadataNamespace key and the lbac.DefaultStateSubKey sub-key. Under the state key, the server expects a struct with the following fields: - lbac.DefaultStateKey - lbac. This will be used as a reverse lookup to get the state from the metadata. Server

func NewServer

func NewServer(policies lbac.Policies) *Server

NewServer creates a new Server. It can be passed a list of policies to enforce. If no policies are passed, the server will expect the policies to be passed in the metadata.

func (*Server) Process

Process is the main processing loop for the server.

type ServerConfig

type ServerConfig struct {
	// Policies is a list of policies to enforce.
	// If not set, the server will expect the policies to be passed in the metadata.
	Policies lbac.Policies
}

ServerConfig is the configuration for the server.

Jump to

Keyboard shortcuts

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