mpahooks

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package mpahooks provides grpc interceptors and other helpers for implementing MPA.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionMatchesInput

func ActionMatchesInput(ctx context.Context, action *mpa.Action, input *rpcauth.RPCAuthInput) error

ActionMatchesInput returns an error if an MPA action doesn't match the message being checked in the RPCAuthInput.

func MPAFromIncomingContext

func MPAFromIncomingContext(ctx context.Context) (mpaID string, ok bool)

MPAFromIncomingContext reads a MPA ID from the grpc metadata of an incoming RPC call

func ProxyClientStreamInterceptor added in v1.26.0

func ProxyClientStreamInterceptor(state *util.ExecuteState) proxy.StreamInterceptor

ProxyClientStreamInterceptor will perform the MPA flow prior to making the desired streaming RPC calls through the proxy.

func ProxyClientUnaryInterceptor added in v1.26.0

func ProxyClientUnaryInterceptor(state *util.ExecuteState) proxy.UnaryInterceptor

ProxyClientUnaryInterceptor will perform the MPA flow prior to making the desired RPC calls through the proxy.

func ProxyMPAAuthzHook added in v1.26.0

func ProxyMPAAuthzHook() rpcauth.RPCAuthzHook

ProxyMPAAuthzHook populates MPA information in the input message

func StreamClientIntercepter

func StreamClientIntercepter() grpc.StreamClientInterceptor

StreamClientIntercepter is a grpc.StreamClientInterceptor that will perform the MPA flow.

func UnaryClientIntercepter

func UnaryClientIntercepter() grpc.UnaryClientInterceptor

UnaryClientIntercepter is a grpc.UnaryClientIntercepter that will perform the MPA flow.

func WithMPAInMetadata

func WithMPAInMetadata(ctx context.Context, mpaID string) context.Context

WithMPAInMetadata adds a MPA ID to the grpc metadata of an outgoing RPC call

Types

This section is empty.

Jump to

Keyboard shortcuts

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