middleware

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Unlicense Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdmissionInterceptor

func AdmissionInterceptor(admission *store.AdmissionController) grpc.UnaryServerInterceptor

AdmissionInterceptor returns a gRPC unary interceptor that enforces admission control.

func AdmissionStreamInterceptor

func AdmissionStreamInterceptor(admission *store.AdmissionController) grpc.StreamServerInterceptor

AdmissionStreamInterceptor returns a gRPC stream interceptor that enforces admission control.

func AuthStreamInterceptor

func AuthStreamInterceptor(validator security.AccessValidator, audit *security.AuditLogger) grpc.StreamServerInterceptor

AuthStreamInterceptor enforces RBAC and injects TenantContext into streaming Flight/gRPC calls.

func AuthUnaryInterceptor

func AuthUnaryInterceptor(validator security.AccessValidator, audit *security.AuditLogger) grpc.UnaryServerInterceptor

AuthUnaryInterceptor enforces RBAC and injects TenantContext into unary gRPC contexts. If validator is nil, authentication is disabled and calls pass through unchanged.

func CircuitBreakerInterceptor

func CircuitBreakerInterceptor() grpc.UnaryServerInterceptor

CircuitBreakerInterceptor creates a unary server interceptor that wraps `DoGet` and `VectorSearch` calls with a circuit breaker.

func ExtractBearerToken

func ExtractBearerToken(ctx context.Context) (token, namespace, dataset string)

ExtractBearerToken extracts an API key or bearer token from incoming gRPC metadata.

func HTTPAuthMiddleware

func HTTPAuthMiddleware(validator security.AccessValidator, audit *security.AuditLogger, requiredPerm string) func(http.Handler) http.Handler

HTTPAuthMiddleware enforces RBAC Bearer / X-API-Key auth on HTTP handlers when validator is non-nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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