惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
量子位
月光博客
月光博客
罗磊的独立博客
宝玉的分享
宝玉的分享
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
博客园 - 叶小钗
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
美团技术团队
爱范儿
爱范儿
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
🚀 OathMesh v1.0.0-rc.1: Zero-Trust API Keys That Survive ...
Mustafa Mahm · 2026-04-27 · via DEV Community

Replacing static API keys with 5-minute, self-destructing Ed25519 tokens sounds great—until your Redis node dies, NTP drifts, or you realize you have to rewrite 50 legacy microservices to verify them.

Last time, we introduced OathMesh. Since then, we’ve been hardening it for distributed systems. Here is how we solved the hard problems: clock drift, cache failures, and zero-code adoption.


⚡ The Proof: <1ms Overhead

First, the metric that matters. In our Kubernetes k6 benchmarks, the full 14-step verification pipeline (Ed25519 sig check, JWKS resolution, replay defense, policy eval) adds <1ms latency at p99.

[Raw Request]       p50: 2.1ms | p95: 4.5ms | p99: 8.2ms
[+ OathMesh Verify] p50: 2.8ms | p95: 5.1ms | p99: 9.0ms
                                     Delta: <1ms

Enter fullscreen mode Exit fullscreen mode

Security shouldn't bottleneck your infra.


🕒 1. Clock Drift & Sandboxing

The Clock Skew Problem

A strict 5-minute TTL breaks when server clocks desync by even a few seconds. NTP isn't perfect.

The Fix: A 30-second ClockSkewLeeway across all SDKs. Tokens are accepted if exp + 30s > now and iat - 30s < now. The token still dies in ≤ 5 minutes; we just don't reject valid tokens because server-b is slightly behind server-a.

image

The SSRF Vector

We use Apple's Pkl for policy-as-code. But what if a malicious policy tries to read("/etc/shadow") or makes an outbound HTTP request?

The Fix: Strict sandboxing at the execution layer:

  • --allowed-modules="pkl:*" (no network/package imports)
  • --allowed-resources="file://<dir>/" (scoped strictly to the policy directory)

🛡️ 2. The Redis Dilemma: Fail-Open vs. Fail-Closed

OathMesh uses Redis to prevent token replays. If Redis drops, you face a classic choice:

  • Fail open: Accept tokens → Security risk (DDoS your Redis to bypass auth).
  • Fail closed: Reject everything → System-wide downtime.

The Fix: We fail closed for new tokens, but use a bounded circuit-breaker to protect in-flight requests.

image

If Redis drops, the Go engine activates an in-process cache of known-good tokens verified in the last 60 seconds.

  • New tokens? Rejected (fail closed).
  • Legitimate in-flight callers? They survive the blip.

🌐 3. Zero-Code Gateway Integration

You shouldn't rewrite legacy services to adopt zero-trust. We brought OathMesh to the API Gateway layer.

image

Envoy (ext_authz)

A standalone Go binary implements Envoy's gRPC ext_authz interface. It verifies tokens and injects identity headers before traffic hits your app.

# envoy.yaml snippet
http_filters:
  - name: ext_authz
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
      grpc_service:
        google_grpc:
          target_uri: oathmesh:4000

Enter fullscreen mode Exit fullscreen mode

Your upstream receives:

X-OathMesh-Subject: agent://ci/deploy-bot
X-OathMesh-Action: deploy
X-OathMesh-Token-ID: <jti-uuid>

Enter fullscreen mode Exit fullscreen mode

Zero code changes required.

Kong

We built a native Go PDK plugin. It runs our 14-step pipeline directly inside Kong's request lifecycle. No sidecars, no Lua rewrites, no extra network hops.


🔍 4. Observability: Step-Annotated Audit Logs

Every verification emits a structured NDJSON event. No guessing why a token was rejected.

{"ts":"...","event":"allow","step":14,"jti":"abc123","sub":"agent://ci/deploy-bot","act":"deploy"}
{"ts":"...","event":"deny","step":13,"reason":"jti_replay","jti":"abc123","src_ip":"10.0.4.99"}

Enter fullscreen mode Exit fullscreen mode

Pipe it to jq, ship it to your SIEM, or grep for step 13 to catch replays instantly.


🏗️ Maturity: Where We Actually Are

Capability Status
Core engine (Go) ✅ Production-tested internally
SDKs (Go, Node.js, Python) ✅ Stable, cross-SDK conformance-tested
Envoy + Kong integrations ✅ Ready for early adopters
Independent security audit 🔜 Seeking sponsors — contact us

Honest take: If you're running SPIFFE with full sidecar coverage, keep using it. OathMesh is for teams who want zero-trust machine identity without the service mesh footprint: CI runners, legacy VMs, and polyglot environments.


Ready to kill your static API keys?

The engine is open-source and ready for early adopters. Run the 3-command demo, read the threat model, and tell us what breaks.

👉 GitHub: oathmesh/oathmesh
📖 Performance Benchmarks
🔒 Threat Model


Built by Moustafa Mahmoud Atta & Abd El-Sabour Ashraf — MIT License