ServShared is the shared utility and middleware library powering core functions across the Servverse ecosystem: ServGate, ServStore, ServQueue, ServConsole, and more.
- Multi-tenant JWT authorization parsing.
- Dynamic key rotation and verification using JSON Web Key Sets (JWKS).
- Caching token validators to optimize authentication checks.
- Role-based and scope-based request guards.
- Policy enforcement middleware for endpoints.
- Context-aware multitenancy bindings.
- Helpers to isolate topics (
IsolateTopic), databases (IsolateDBPool), and storage buckets (IsolateBucket).
- Dynamic loading of client/server mTLS cert configurations.
- Regex-based structured log sanitizer (
SanitizeLog) that automatically redacts unquoted, double-quoted, and single-quoted tokens, credentials, and secrets from JSON/plaintext outputs before emission.
- Trace context propagation (
traceparentheader parsing). - Trace log correlation and Prometheus metrics formatting.
DistributedLockerinterface decoupling the registry implementation.HTTPLockClienttalking to ServMesh's lock APIs.- Mutual exclusion utility helpers (
WithLock,WithLockRetry). - Mock/test-friendly
NoOpLocker.