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.
Core modules are the authoritative security layer. They implement:
React adapter modules expose framework-native hooks/providers/guards and consume core decisions.
Adapter principle:
OWL supports explicit cross-category policy composition.
Examples:
| 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 |
OWL uses typed errors and reason-bearing decision outputs.
Benefits:
| 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 |
PermissionChecker/adapter hooks.usePermission without RBACProvider/ACLProvider).redactKeys after the fact instead of before shipping.SSRFGuard) in production for convenience.CSRFTokenManager (A08) is Web Crypto-based now, and both @owasp-webshield/core and @owasp-webshield/react ship a "browser"-conditioned build where CryptoManager/KDFAdapters (A02) are a same-shaped throwing stub instead of a build-breaking node:crypto import. A ./modules/* subpath also lets bundlers resolve individual files directly. Remaining follow-up: a genuinely async, Web-Crypto-backed CryptoManager for real browser-side encryption would need a breaking API change and a major version bump (see the FAQ)