reef

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0

README

reef — платформенная библиотека безопасности yaop

TL;DR интеграции

// HTTP-сервер (любой продукт)
tlsCfg, err := tlsconf.Server(cfg.TLS) // *tls.Config или nil (plaintext только при полностью пустом блоке)
mw, err := bearer.Require(cfg.Auth)    // exempt по умолчанию: /healthz, /readyz, /metrics
srv := &http.Server{Handler: mw(mux), TLSConfig: tlsCfg}

// gRPC-сервер
opts, err := grpcreef.ServerOptions(cfg.TLS, cfg.Auth)
s := grpc.NewServer(opts...)

// HTTP-клиент (экспортёр)
rt, err := reefclient.Transport(reefclient.Config{TLS: cfg.Client.TLS, Auth: cfg.Client.Auth})

// gRPC-клиент
conn, err := grpcreef.Dial(ctx, addr, cfg.Client.TLS, cfg.Client.Auth)

Directories

Path Synopsis
Package bearer implements the platform's bearer-token authentication: named keys on the server side (HTTP middleware; grpcreef reuses the Verifier), a token-injecting RoundTripper on the client side.
Package bearer implements the platform's bearer-token authentication: named keys on the server side (HTTP middleware; grpcreef reuses the Verifier), a token-injecting RoundTripper on the client side.
Package grpcreef adapts reef's TLS and bearer layers to gRPC: server options with credentials and auth interceptors, and client dial options with transport credentials and per-RPC token injection.
Package grpcreef adapts reef's TLS and bearer layers to gRPC: server options with credentials and auth interceptors, and client dial options with transport credentials and per-RPC token injection.
Package reefclient assembles the client side of an HTTP edge in one call: TLS from tlsconf plus bearer-token injection.
Package reefclient assembles the client side of an HTTP edge in one call: TLS from tlsconf plus bearer-token injection.
Package reeftest generates throwaway certificates for tests: a CA, a server certificate for localhost, and a client certificate signed by the same CA.
Package reeftest generates throwaway certificates for tests: a CA, a server certificate for localhost, and a client certificate signed by the same CA.
Package tlsconf builds server- and client-side *tls.Config values from the shared tls YAML config block.
Package tlsconf builds server- and client-side *tls.Config values from the shared tls YAML config block.

Jump to

Keyboard shortcuts

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