Skip to content
View JohnBasrai's full-sized avatar
  • Basrai Systems LLC
  • Yuba City, CA
  • 23:27 (UTC -08:00)
  • LinkedIn in/johnbasrai

Block or report JohnBasrai

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
JohnBasrai/README.md

Rust John Basrai

Senior/Staff Software Engineer
Rust & C++ · Backend Systems · Distributed Architectures · CI/CD · High-Performance Applications

Rust About Me

Solution-oriented, results-driven software engineer with 15+ years of experience in systems and backend development — currently specializing in Rust for authentication infrastructure, backend systems, and high-assurance applications. Skilled in Rust, Modern C++, and Python, with strong focus on architectural clarity, modularity, and automated testing.

  • 🌍 Based in Yuba City, CA
  • 🤝 Open to collaborating on backend systems, authentication infrastructure, or distributed systems in Rust

Current Focus

Currently developing tokn (OAuth2/OIDC/JWT authorization server) and integrating WebAuthn/Passkeys into axum-quickstart. Implementing RFC 6749/7636 compliance with automated protocol testing (10 security test scenarios covering PKCE, token rotation, scope enforcement). Applying cr8s CI/CD patterns to containerized authentication services.

Designing a real-time audio streaming system in Rust — rtp-opus-streamer — using RTP (RFC 3550) and Opus (RFC 6716). This work explores end-to-end systems behavior from audio capture through network transport to playback, with emphasis on production concerns such as network resilience, observability, and adaptive behavior under constrained conditions.

📌 Featured

👉 📝 "Building Reliable Rust CI/CD: Lessons from Production Failures"
👉 📝 "What the Cloudflare Outage Teaches Us About Production Rust"


Project Spotlight:

🔐 tokn: OAuth2/OIDC & JWT Authentication Infrastructure

OAuth2/OIDC authorization server in Rust with RFC 6749/7636 compliance, PKCE flow, refresh token rotation, and automated protocol testing.

🔧 Highlights:

  • Complete OAuth2 authorization server (RFC 6749) with PostgreSQL persistence
  • JWT token service (RFC 7519) with HS256 signing and lifecycle management
  • 5 REST API endpoints for complete token flows (generation, validation, refresh, revocation)
  • AuthMiddleware for Bearer token validation on protected routes
  • 10 automated integration tests validating all authentication flows and security scenarios
  • Token rotation and JTI-based revocation using Redis TTL blacklist
  • Clean Architecture with EMBP pattern and trait-based abstractions
  • Comprehensive rustdoc with RFC references

🧪 Testing & Quality:

./scripts/test-jwt-service.sh

✅ Token generation & validation (HS256 signing, expiration)
✅ Refresh token rotation (prevents replay attacks)
✅ Token revocation & blacklisting (Redis-backed)
✅ Protected route authentication (JWT middleware)
✅ Security edge cases (missing tokens, revoked tokens)

Technical Stack: Axum, PostgreSQL (SQLx), Redis, Argon2id, jsonwebtoken, Docker Compose


🧩 More Rust Projects

Repo Highlights
axum-quickstart Async REST API in Rust using Axum, Redis, and Tokio. Demonstrates WebAuthn/Passkeys authentication with PostgreSQL credential storage, Redis challenge management, session-based auth, Prometheus metrics, and comprehensive integration testing
cr8s Rocket + Postgres backend with JWT auth, role-based access, SQLx migrations, comprehensive integration test suite with database transactions and API endpoint validation. Part of a full-stack platform for crate metadata, release tracking, and user access
cr8s-fe Yew/WASM frontend companion to the cr8s Rust backend, cross-platform Docker dev environment, Playwright E2E testing
zkp-cp Zero-knowledge proof implementation in Rust — gRPC client-server demo of Chaum–Pedersen ZK proofs using tonic
argus-events Event tracking service in Rust + Axum with query filtering, Prometheus metrics, Docker containerization, 21 integration tests, and CI/CD pipeline
mempool-vortex MEV infrastructure simulation with real-time Ethereum mempool monitoring, WebSocket streaming, and latency measurement in Rust
sensorflow-data-pipeline Modular sensor data pipeline in Rust: fetch, transform, analyze, store, and expose via API with PostgreSQL indexing optimization and real-time anomaly detection

📁 Complete Repository List — All GitHub repositories with descriptions


🛠️ Skills Overview

Core Expertise

  • Rust & C++ Systems Programming
  • Backend & Distributed Systems
  • Authentication & Authorization (OAuth2/OIDC/JWT/WebAuthn)
  • API Design (REST, gRPC, GraphQL)
  • Cryptography & Zero-Knowledge Proofs

Languages

  • Rust (since 2022; async, networking, systems)
  • C / Modern C++ (STL, Boost)
  • Python, Java, SQL
  • WebAssembly (WASM)

Async & Networking

  • Tokio, Async/Futures, reqwest
  • WebSocket, TCP/IP, UDP, RTP
  • Real-time streaming, packetized media transport
  • Ethereum WebSocket Integration

Databases & Infrastructure

  • PostgreSQL, Redis, SQLx, Diesel
  • AWS (Lambda, Dev/Deploy)
  • Docker / Docker Compose
  • IronBank container hardening

Testing Strategies

  • Unit & Integration Testing (Rust cargo test)
  • Security Testing (OAuth2/JWT token lifecycle, rotation, revocation)
  • E2E Testing (Playwright browser automation)
  • API Testing (RESTful endpoint validation)
  • CI/CD Integration (Docker service orchestration)

DevOps & CI/CD

  • GitLab CI/CD, GitHub Actions (performance optimization, cross-platform workflows)
  • Automated test execution with Docker orchestration

Web Frameworks & Middleware

  • Axum / Rocket / Actix / Yew
  • Axum middleware (authentication, request validation)
  • Trait-based middleware composition

Monitoring & Observability

  • Prometheus, Loki, Grafana
  • Latency, throughput, and runtime metrics

🧪 Testing Philosophy & Practice

Testing across multiple layers with emphasis on automation and isolation:

  • Security Testing: 10 automated OAuth2/JWT tests (token lifecycle, rotation, revocation, middleware)
  • Backend Integration: Database transaction testing, API endpoint validation, authentication flows
  • Frontend E2E: User journey automation with Playwright
  • CI/CD Integration: Automated test execution with Docker service orchestration
  • Test Isolation: Proper database setup/teardown and transaction rollback patterns

📋 Architecture & Patterns

Explicit Module Boundary Pattern (EMBP)

A Rust architectural pattern I've documented that uses gateway files (mod.rs, lib.rs, main.rs) to create explicit module boundaries and controlled dependencies. EMBP enables complete internal refactoring freedom while maintaining clean public APIs and clear architectural layers.


🤝 Let's Connect

If you're hiring for backend, distributed systems, authentication infrastructure, or Rust-focused roles, feel free to reach out on LinkedIn.

Socials

LinkedIn GitHub

Pinned Loading

  1. tokn tokn Public

    OAuth2/OIDC authorization server and JWT token service in Rust with RFC 6749/7519 compliance

    Rust 1

  2. mempool-vortex mempool-vortex Public

    Real-time Ethereum MEV simulation engine in Rust. Modular pipeline for mempool observation using WebSocket streams (Tungstenite), Flashbots bundle encoding, latency tracking, and async event proces…

    Rust

  3. cr8s cr8s Public

    Full-stack Rust platform for managing crate metadata, release tracking, and user access — includes Rocket + SQLx backend, Redis caching, CI pipelines, and comprehensive integration tests

    Rust 2 1

  4. cr8s-fe cr8s-fe Public

    Yew/WebAssembly frontend for cr8s, with Playwright-based E2E tests and Docker-first dev flow. Supports crate release workflows, session auth, and cross-platform CI automation

    Rust 1 1

  5. axum-quickstart axum-quickstart Public

    Async REST API in Rust using Axum, Redis, and Tokio. Demonstrates WebAuthn/Passkeys authentication with PostgreSQL credential storage, Redis challenge management, session-based auth, Prometheus met…

    Rust 1 1

  6. zkp-cp zkp-cp Public

    Chaum-Pedersen Zero Knowledge Proof authentication protocol implementation using gRPC (tonic/prost). Demonstrates cryptographic protocol design, async Rust server architecture, concurrent client/se…

    Rust 1 1