Documentation ¶
Overview ¶
Package proxiedidentity provides a way to pass the identity of an end user through the SansShell proxy
Index ¶
- func AppendToMetadataInOutgoingContext(ctx context.Context, p *rpcauth.PrincipalAuthInput) context.Context
- func FromContext(ctx context.Context) *rpcauth.PrincipalAuthInput
- func ServerProxiedIdentityStreamInterceptor() grpc.StreamServerInterceptor
- func ServerProxiedIdentityUnaryInterceptor() grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToMetadataInOutgoingContext ¶
func AppendToMetadataInOutgoingContext(ctx context.Context, p *rpcauth.PrincipalAuthInput) context.Context
AppendToMetadataInOutgoingContext includes the identity in the grpc metadata used in outgoing calls with the context.
func FromContext ¶
func FromContext(ctx context.Context) *rpcauth.PrincipalAuthInput
FromContext returns the identity in ctx if it exists. It will typically only exist if ServerProxiedIdentityUnaryInterceptor was used.
func ServerProxiedIdentityStreamInterceptor ¶
func ServerProxiedIdentityStreamInterceptor() grpc.StreamServerInterceptor
ServerProxiedIdentityStreamInterceptor adds information about a proxied caller to the RPC context.
ONLY USE THIS INTERCEPTOR IF YOU HAVE AN OPA POLICY THAT CHECKS proxied-sansshell-identity IN GRPC METADATA. Using the interceptor without an additional authz check can let any caller assert any proxied identity, which can let a caller approve their own MPA requests.
func ServerProxiedIdentityUnaryInterceptor ¶
func ServerProxiedIdentityUnaryInterceptor() grpc.UnaryServerInterceptor
ServerProxiedIdentityUnaryInterceptor adds information about a proxied caller to the RPC context.
ONLY USE THIS INTERCEPTOR IF YOU HAVE AN OPA POLICY THAT CHECKS proxied-sansshell-identity IN GRPC METADATA. Using the interceptor without an additional authz check can let any caller assert any proxied identity, which can let a caller approve their own MPA requests.
Types ¶
This section is empty.