security
Security Patterns
Authentication, integrity verification, and safe request handling for distributed services.
// concept
Security in distributed systems involves verifying identity (authn), integrity (HMAC), and ensuring safe retries (idempotency) — all without centralized coordination.
JWT Validation
Decode and verify JSON Web Tokens. Validate signature, expiry, issuer, and claims without shared state.
API Key Validation
Authenticate requests via API keys. Simple, stateless auth for service-to-service communication.
Idempotency Key
Deduplicate requests using a unique key. Safely retry operations without causing duplicate side effects.
HMAC Verification
Verify message integrity and authenticity using a shared secret. Detect tampering in webhooks and APIs.