@ibgib/space-gib 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +20 -0
  2. package/dist/client/bootstrap.mjs +31 -31
  3. package/dist/client/bootstrap.mjs.map +3 -3
  4. package/dist/client/chunk-DBHMHCGD.mjs +2341 -0
  5. package/dist/client/{chunk-SMOZ2D5E.mjs.map → chunk-DBHMHCGD.mjs.map} +4 -4
  6. package/dist/client/chunk-SUQ5QJH4.mjs +42 -0
  7. package/dist/client/chunk-SUQ5QJH4.mjs.map +7 -0
  8. package/dist/client/index.mjs +1 -1
  9. package/dist/client/script.mjs +1 -1
  10. package/dist/server/server.mjs +1561 -179
  11. package/dist/server/server.mjs.map +4 -4
  12. package/package.json +5 -5
  13. package/space-gib.localhost-1783713259760.log +45 -0
  14. package/src/client/AUTO-GENERATED-version.mts +1 -1
  15. package/src/client/api/space-gib-api-bridge.mts +7 -2
  16. package/src/client/bootstrap.mts +9 -0
  17. package/src/client/components/identity-header/identity-header.mts +43 -26
  18. package/src/client/components/identity-manager/identity-manager.css +57 -392
  19. package/src/client/components/identity-manager/identity-manager.html +0 -114
  20. package/src/client/components/identity-manager/identity-manager.mts +356 -543
  21. package/src/client/components/keystone-creator/keystone-creator.mts +4 -3
  22. package/src/client/components/keystone-details/keystone-details.css +569 -0
  23. package/src/client/components/keystone-details/keystone-details.html +127 -0
  24. package/src/client/components/keystone-details/keystone-details.mts +1013 -0
  25. package/src/client/components/keystone-scrubber/SCRUBBER_IMPLEMENTATION.md +33 -0
  26. package/src/client/components/keystone-scrubber/keystone-scrubber.css +46 -0
  27. package/src/client/components/keystone-scrubber/keystone-scrubber.html +15 -0
  28. package/src/client/components/keystone-scrubber/keystone-scrubber.mts +356 -0
  29. package/src/client/ui/shell/space-gib-shell-service.mts +4 -0
  30. package/src/server/path-constants.mts +12 -0
  31. package/src/server/serve-gib/handlers/api/keystone/keystone-evolve.handler.mts +33 -0
  32. package/src/server/serve-gib/handlers/api/keystone/sso-config.handler.mts +66 -0
  33. package/src/server/serve-gib/handlers/api/keystone/sso-link.handler.mts +140 -0
  34. package/src/server/serve-gib/handlers/api/keystone/sso-login.handler.mts +190 -0
  35. package/src/server/server.mts +6 -0
  36. package/dist/client/chunk-734MMI4C.mjs +0 -42
  37. package/dist/client/chunk-734MMI4C.mjs.map +0 -7
  38. package/dist/client/chunk-SMOZ2D5E.mjs +0 -2049
package/README.md CHANGED
@@ -51,3 +51,23 @@ You can attach the VS Code debugger directly to the Node.js process running insi
51
51
  1. The server runs with the `--inspect=0.0.0.0:9229` flag.
52
52
  2. `docker-compose.yml` maps port `9229` to your host machine.
53
53
  3. Use the VS Code launch configuration `Docker: Attach to Space-Gib` to attach breakpoints.
54
+
55
+ ---
56
+
57
+ ## 🛡️ Long-Term Decentralized Security & Threat Modeling
58
+
59
+ As `space-gib` transitions from the V1 single-server model to a fully decentralized, peer-to-peer architecture, the following security threats (inherently mitigated by the centralized nature of V1) must be addressed:
60
+
61
+ ### 1. The Revocation Sync Gap (Stale Parent State)
62
+ * **The Threat**: In a multi-peer network, if a user revokes a delegate keystone on Peer A (evolving $K_{\text{domain}}$ to remove the delegate), Peer B may not immediately sync the revocation frame. If an attacker presents the compromised delegate to Peer B before it syncs the parent's latest state, Peer B will accept it.
63
+ * **Decentralized Mitigation**: Peers must require cryptographic proof of freshness (epochs, sequence checks) or query a quorum of sync space hubs to verify $K_{\text{domain}}$'s latest tip before executing high-value operations.
64
+
65
+ ### 2. Cross-Origin Identity Federation (Same-Origin Policy Limitations)
66
+ * **The Threat**: Browser Same-Origin Policy (SOP) isolates IndexedDB and local storage by domain. If a user stores their primary identity keys on `space-gib.localhost` (Site A), script running on a different client app origin `other-ibgib-app.localhost` (Site B) cannot access Site A's IndexedDB to sign claims.
67
+ * **Relationship to Sync Remotes**: While `ibgib`'s sync protocol allows Site B to act as a Git-like remote that we push to and pull from via network requests, the SOP limitation applies to the browser *frontend* client running on Site B. To boot a local repository on Site B that can interact with the remote, Site B needs its own local delegate keys.
68
+ * **Decentralized Mitigation**: We must establish a secure cross-origin handshake (e.g., standardizing a redirect/popup or postMessage flow) where Site A authenticates the user and securely transfers a restricted, site-scoped delegate keystone to Site B's local IndexedDB. Once Site B has this delegate, it can sync natively with other peers.
69
+
70
+
71
+ ## Future Enhancements & Todo
72
+
73
+ * **Notification Broadcast System**: Implement a secure notification broadcast system to alert the user immediately via UI notifications when any challenge pool modification or administrative evolution occurs on their identity keystone.