-
Notifications
You must be signed in to change notification settings - Fork 9
feat: private gateway #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
7b7730a
to
5004424
Compare
5004424
to
89d78f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM. Maybe this is a naive question, but at this point, are freeway and the encryption service really the same thing? What I'm asking is the "private gateway" isn't really a gateway no? It's just a key encryption setup + decrypter? And it might be easier to run it out of Amazon where it's right next to the relevant DB tables.
Again, want to keep it moving, but I also want to understand if there is a vision to actually use the "private gateway" as a gateway? (or is that to handle the server side decryption if/when we support it)
} | ||
|
||
// Log as structured JSON | ||
console.log(JSON.stringify(entry)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we confident the console.log is going somewhere that's preserved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I guess I need set up some worker log config to preserve it. I will double-check that. Thanks for flagging.
Yes. They are different services. This architecture came from initially planning server-side decryption, but I pivoted to client-side key decryption without rethinking the infrastructure to get this rolling faster. I would suggest a two-phase approach:
WDYT? |
Private Gateway: KMS Integration for Encrypted Content Access
This PR implements the private gateway for handling encrypted content access through a dedicated freeway deployment.
Key Features
Google KMS Integration: Complete RSA key pair setup per space with automatic key generation, integrity validation, and proper space DID mapping.
UCAN Invocation for Encryption Setup: Implementation of space/encryption/setup capability with plan validation and KMS key provisioning for paid users.
UCAN Invocation for Symmetric Key Decryption: Handler for processing symmetric key decryption requests with proper authorization validation and space ownership checks.
Security: Server-side CRC32C validation, standardized error handling, and compliance with Google Cloud KMS security standards.
This enables secure, encrypted content storage and access control for private spaces through a dedicated freeway gateway deployment.
Sequence Diagram: https://gist.github.com/fforbeck/be6486223b387b67f319ba113901da9f
TODO
Code Audit
Security Posture Summary
Report: https://hackmd.io/@fforbeck/H1T7k9YBel
Closes