1.9 KiB
1.9 KiB
Structural Audit Report
Migration Objective
Enforce a hard boundary between Central Identity (auth-yes) and the ED-Droid
subsidiary application (core), creating a decoupled zero-trust architecture.
Audit Checklist
1. Database Schema Extraction
- Extracted:
users,apps,grants,invites,audit_records,passkeys,sessionsschemas moved fromcore/db.tstoauth-yes/server/db.ts. - Decoupled: Removed
REFERENCES users(id)foreign key constraint fromedge_nodes.user_idincore/db.ts, replacing it with an unconstrained UUID linking back to the central Auth identity. - Localized Mapping: Created
user_profilestable incore/db.tsto hold subsidiary-specific game metadata (frontier_token) mapped exclusively by the unconstraineduser_id.
2. API Routing Migration
- Extracted: Central Identity endpoints (
/api/register/*,/api/login/*) and their corresponding SimpleWebAuthn logic moved toauth-yes/server/main.ts. - Refactored: Modified
/frontier/callbackinsidecore/api-server.tsto perform anUPSERTinto the localizeduser_profilestable rather than the centraluserstable. - Zero-Trust Implementation:
sessionMiddlewareincore/api-server.tshas been refactored to utilize theAuthSdk(auth-yes/sdk/mod.ts), ceasing local queries to thesessionstable and enforcing network-based validation.
3. Workspace Validation
- Packages:
auth-yesis strictly designated as a workspace member insidedeno.json. - Decoupling:
auth-yes/sdk/mod.tsacts as a pure logic client without directly importingauth-yes/server/main.tsor database connections.
Conclusion
The root core/ directory is now completely purged of central identity logic
and schemas. The structural migration was a complete success.