OWASP Web Shield Library — Architecture & Adoption Guide

What This Architecture Is Designed For

OWL is designed to make security controls composable, category-driven, and framework-portable.

Primary architecture outcomes:

Looking for runnable bootstrap code rather than concepts? See core-js-usage.md (framework-agnostic), react-adapter-usage.md (React), or api-reference.md for a copyable example per export.

How The Architecture Works

1. Core Security Engine

Core modules are the authoritative security layer. They implement:

2. Adapter Integration Layer

React adapter modules expose framework-native hooks/providers/guards and consume core decisions.

Adapter principle:

3. Cross-Category Composition

OWL supports explicit cross-category policy composition.

Examples:

Category-to-Component Map

Category Core Engine Adapter Surface
A01 RBACManager, ACLManager, PermissionChecker ACLProvider, RBACProvider, usePermission, PermissionGate
A02 CryptoManager, PBKDF2Adapter, Argon2Adapter useCryptoManager
A03 InputSanitizer, InputValidator useInputSanitizer, SanitizedText
A04 ThreatModelGuard, DesignChecklist useThreatModelGuard
A05 SecurityConfigManager, HardeningReporter useHardeningReport
A06 DependencyRiskScanner, ComponentPolicy useDependencyRiskScanner
A07 AuthManager, TokenManager AuthProvider, useAuth, useAuthToken, AuthGate
A08 CSRFTokenManager, HTTPClient useSecureHttpClient, withSecurityHeaders
A09 EventEmitter, SecurityLogger SecurityProvider, useSecurityMonitoring, SecurityAlert
A10 SSRFGuard, SafeFetcher useSafeFetcher
(cross-cutting) createOwlClient() builds the A01/A07/A09 managers above from one config OwlProvider composes the A01/A07/A09 providers above from that client

Request Lifecycle Example

  1. User authentication state is established (A07).
  2. Authorization decision is computed (A01).
  3. Request is prepared with secure defaults and token/CSRF metadata (A08).
  4. Outbound URL policy is validated (A10).
  5. Security events and redacted logs are emitted (A09).

Error and Decision Model

OWL uses typed errors and reason-bearing decision outputs.

Benefits:

Extensibility Model

KDF Extension (A02)

Outbound Request Extension (A08/A10)

Dependency Risk Extension (A06)

Testing and Quality Architecture

Security Notes

Team-Oriented Adoption Plan

Team Priority Modules Immediate Value
Frontend A07, A01, A03 Safer UI guards and input handling
Backend/API A08, A10, A03 Hardened request paths and outbound controls
Platform A05, A06, A09 Better hardening and visibility
Security A01-A10 Policy consistency across systems

Implementation Maturity Stages

Stage 1 — Baseline Security

Stage 2 — Transport and Input Hardening

Stage 3 — Platform and Supply-Chain Security

Stage 4 — Governance and Scaling

Common Anti-Patterns

Use Cases By Audience

Architecture Evolution Targets