CDG / ENGINEERINGContactSign in ↗

Cybersecurity

MRGI Web Fabric / What’s the Point

Explainable DNS and browser policy, durable URL intelligence, and a searchable live synthetic activity dashboard.

Single-organization MVPoriginal systempublic demo

ORIGINAL CONTRIBUTIONS

What I built.

  • Implemented authenticated DNS and browser policy services, an independent Chromium MV3 gate, and explainable allow/block decisions.
  • Built a durable SQLite URL classification queue with configured domain/term evidence, history and versioned cache records.
  • Implemented managed Linux x86_64 worker updates with pinned signatures, maintenance windows, health checks and rollback.

TRY THE PRODUCT

An interactive laboratory.

Live synthetic activity, searchable decisions and customizable filters. No browsing traffic is filtered.

Open the policy laboratory →

What you can explore.

  • Watch synthetic activity and blocks in real time; search, filter, inspect and export matching decisions.
  • Explore domain, path, exact URL and category decisions with editable rules.
  • Inspect queued classification, deterministic evidence and version history.
  • Compare cached and uncached decisions during a simulated service outage.

Implementation stack.

Rust / Axum / TokioSQLite WALChromium Manifest V3Vanilla JavaScript / CSS

MRGI Web Fabric / What’s the Point / SYSTEM MAP

How this system connects.

ManagementAPI1SQLiteconfiguration2Explainablepolicy3DNSresolver4
  1. 01 / Management API: Manage rules and explain individual decisions.
  2. 02 / SQLite configuration: Persist policy, sessions and audit records.
  3. 03 / Explainable policy: Return a decision, matching domain and reason.
  4. 04 / DNS resolver: Apply filtering to DNS questions and alias answers.
Directed connections
  • 1 → 2: authenticated rule and session state (implemented)
  • 2 → 3: load rules and feed domains (implemented)
  • 1 → 3: test decision with reason (implemented)
  • 4 → 3: question / alias evaluation (implemented)

SYSTEMS DESIGN & OWNERSHIP

Engineering below the surface.

A durable queue beside the policy hot path

The Rust service separates its in-memory classification cache from a SQLite WAL queue and record history. Configured domains and URL terms supply evidence; unknown records remain explicitly unclassified. Query parameters remain intact for enforcement and are excluded from retained intelligence.

Enforcement and presentation have different authority

The Chromium gate checks top-level GET navigation before allowing it; DNS supplies a separate domain baseline. The portfolio reuses console styles, rendering helpers and URL utilities in an isolated local adapter. It models a visual subset and cannot establish identity or enforce a decision.

Inspectable failure behavior

The laboratory exposes a controllable clock, exact-URL decision cache and an outage switch. Cached blocks remain, permits expire after five minutes, and uncached destinations deny. Classification history advances only when the explicit demo worker runs.

INSPECT THE WORK

The system, made visible.

Open the interactive demonstration ↗

EXPLORE THE ARCHITECTURE

Components. Contracts. Consequences.

Authenticated administrative mutations → SQLite policy → DNS decisions → encrypted upstream. Portfolio evaluation does not alter host DNS or firewall settings.

01 / Management API

Manage rules and explain individual decisions.

Implementation

Axum routes expose rule mutations, audit queries and /api/test.

Security & failure behavior

Middleware checks configured host/origin, session expiry, request header and CSRF token for cookie-authenticated mutations. Invalid sessions, origins, domains or mutation tokens fail before privileged handler execution.

Tradeoff

Paired-control authentication has a separate session path; its boundaries need independent review.

02 / SQLite configuration

Persist policy, sessions and audit records.

Implementation

SQLx-backed database initialization and migrations feed application state.

Security & failure behavior

Administrative sessions store token digests; rule mutations are audited by API handlers. Database failures propagate rather than fabricating configuration success.

Tradeoff

Local durable state simplifies deployment; multi-node state synchronization is not shown.

03 / Explainable policy

Return a decision, matching domain and reason.

Implementation

Explicit allow rules at any ancestor precede blocks; domain suffix boundaries avoid substring matches.

Security & failure behavior

Input normalization rejects URLs, IP addresses and malformed labels at policy administration boundaries. Invalid rule/list input fails validation; no matching block defaults to allow.

Tradeoff

Allow-first precedence is intentional and can override a more specific block.

04 / DNS resolver

Apply filtering to DNS questions and alias answers.

Implementation

UDP/TCP service checks client scope, policy and cache; allowed questions use HTTPS upstreams. Cached aliases are re-evaluated.

Security & failure behavior

Blocked or unauthorized questions do not reach upstream; upstream answers undergo protocol validation. Blocked names receive NXDOMAIN; exhausted encrypted upstreams produce SERVFAIL.

Tradeoff

DNS decisions cannot inspect encrypted URL paths; browser policy enforcement is a separate code path.

Open full 2D architecture →

TECHNICAL CASE STUDY

Decisions behind the system.

Engineering problem

Apply explainable DNS and browser filtering rules consistently, including URLs whose spelling differs but identifies the same DNS host.

Requirements & constraints

Policy precedence, identity requirements, domain and URL path matching, deterministic decisions, and safe reserved-domain tests without modifying host networking.

Architecture & technologies

Rust policy evaluator, endpoint/control crates, and a browser extension. Source includes management and transport components; this replay only verifies the pure evaluator.

Security & trust boundaries

Identity and organization policy are inputs to decision logic. Browser host canonicalization must happen before all domain/category/path rules. A browser replay is not proof of privileged endpoint enforcement.

Original engineering

Four baseline commits are attributed to charlesderek. The reviewed contribution scope is the custom Rust evaluator and its tests. An exhaustive independent authorship audit remains outside this cycle.

Working implementation

DNS feed matching and explicit exceptions, browser URL domain/category/path rules, policy explanations, and required-user checks are exercised by the deterministic Rust example.

Experiments & missing capabilities

Signed device policies, TLS pairing, encrypted DNS upstream behavior, and production authentication were not exercised in this replay. Platform enforcement remains outside these results.

Failure modes & concurrency

Malformed URLs fail validation. A double root dot is rejected. Domain boundary and IPv4/IPv6 behavior are regression-tested. The replay runs serially and establishes no throughput claim.

Testing & evidence

37 Rust workspace tests and 3 extension JavaScript tests passed. Formatting and strict Clippy passed. Two added root-dot regressions failed against the original implementation.

Observable improvement

Before: https://restricted.example./ bypassed a domain block. After: one root dot is canonicalized before rule matching and multiple terminal dots are rejected. Local commit 711b1b1.

Deployment model

Independent endpoint and management code. The website loads a JSON replay exported from actual Rust logic; no host DNS or firewall settings are changed.

Decisions & alternatives

Canonicalize at the URL parser boundary so all rule types agree. Repeating suffix stripping independently in every matcher would invite inconsistent behavior.

Demonstration & limitations

The Browser policy replay exposes ten named fixtures with exact verdicts and reasons. Run cargo run --locked --offline --example policy_replay. This browser presents captured results rather than a live backend.

ENGINEERING SCOPE

Clear boundaries.

Original custom policy and control implementation reviewed in local history; external libraries and feeds retain attribution.

  • This static lab simulates policy evaluation, classification, worker execution, clock and outage behavior. It does not filter traffic or operate a private backend.
  • Production is a single-organization MVP. No remote page fetcher, AI reputation provider, DLP or download interception is implemented.
  • Native identity, cryptographic signature verification, DNS enforcement, extension installation and worker updates are unavailable in this lab.
  • Offline cached permits last at most five minutes; offline revocation cannot be learned until reconnect. Enterprise RBAC/SSO, fleet acceptance and native Windows/macOS enforcement remain outside the MVP.