Documentation ¶
Overview ¶
Package mpahooks provides grpc interceptors and other helpers for implementing MPA.
Index ¶
- func ActionMatchesInput(ctx context.Context, action *mpa.Action, input *rpcauth.RPCAuthInput) error
- func MPAFromIncomingContext(ctx context.Context) (mpaID string, ok bool)
- func ProxyClientStreamInterceptor(state *util.ExecuteState) proxy.StreamInterceptor
- func ProxyClientUnaryInterceptor(state *util.ExecuteState) proxy.UnaryInterceptor
- func ProxyMPAAuthzHook() rpcauth.RPCAuthzHook
- func StreamClientIntercepter() grpc.StreamClientInterceptor
- func UnaryClientIntercepter() grpc.UnaryClientInterceptor
- func WithMPAInMetadata(ctx context.Context, mpaID string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionMatchesInput ¶
ActionMatchesInput returns an error if an MPA action doesn't match the message being checked in the RPCAuthInput.
func MPAFromIncomingContext ¶
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.
Types ¶
This section is empty.