grpc_middleware

package
v1.45.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizationRequiredInterceptor

func AuthorizationRequiredInterceptor(logger *zap.Logger, policyVerifier authz.Verifier, o ...containers.Option[InterceptorOptions]) grpc.UnaryServerInterceptor

func WithServerSkipsAuthorization

func WithServerSkipsAuthorization(server any) containers.Option[InterceptorOptions]

WithServerSkipsAuthorization can be used to configure an auth unary interceptor which skips authorization when the provided server instance matches the intercepted calls parent server instance. This allows the caller to registers servers which explicitly skip authorization (e.g. OIDC).

Types

type InterceptorOptions

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

InterceptorOptions configure the basic AuthzUnaryInterceptors

type SkipsAuthorizationServer

type SkipsAuthorizationServer interface {
	SkipsAuthorization(ctx context.Context) bool
}

SkipsAuthorizationServer is a grpc.Server which should always skip authentication.

Jump to

Keyboard shortcuts

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