authorize

package
v1.1.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 27

README

We need a RemoveAuthz (to delete authz tokens before sending downstream) and an AddAuthz (to set authz tokens before returning upstream)

Documentation

Overview

Package authorize provides authz checks for incoming or returning connections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(opts ...Option) networkservice.NetworkServiceClient

NewClient - returns a new authorization networkservicemesh.NetworkServiceClient Authorize client checks rigiht side of path.

func NewServer

func NewServer(opts ...Option) networkservice.NetworkServiceServer

NewServer - returns a new authorization networkservicemesh.NetworkServiceServers Authorize server checks left side of Path.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is authorization option for server

func Any

func Any() Option

Any authorizes any call of request/close

func WithPolicies

func WithPolicies(p ...Policy) Option

WithPolicies sets custom policies

type Policy

type Policy interface {
	// Check checks authorization
	Check(ctx context.Context, input interface{}) error
}

Policy represents authorization policy for network service.

Jump to

Keyboard shortcuts

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