| ▲ | ptx 2 hours ago | |
The LLM-generated writing is incredibly tedious to read, but I like the idea of pre-loading the application and then forking the workers (kind of like Android's Zygote), while, as the LLM puts it, "Muru also takes care to freeze the garbage collector's view of the preloaded objects before forking", or, as it's more concisely put in the code, "gc.freeze()". A variation on that theme that I would like to try is forking a worker per user (or per session), which would be sandboxed (e.g. with Capsicum in FreeBSD) and only have access to that user's credentials. A separate process would route requests to these per-user workers and provide them with the appropriate credentials. This could then be combined with PostgreSQL's row-level security, with each user having their own user in PostgreSQL, and the per-user worker only having access to that particular user's database credentials. I feel like this should significantly limit the consequences of both SQL injection vulnerabilities and RCE vulnerabilities. It wouldn't solve stored XSS, I suppose, but I believe that is handled by using a template language for HTML (one that encodes parameters automatically on output). It also probably wouldn't scale to a planet-scale mass-market web application, but there are lots of apps that don't need that kind of scale but do need to be secure. Maybe this sort of thing has already been done and written about (by humans)? | ||