Re:Server-side sandboxing: Containers and seccomp
by rubenfiszel on Tuesday October 24, 2023 @01:07PM
(#38002061)
If you are looking to self-host a scalable backend that runs arbitrary code in python/typescript/bash/go with optional sandboxing using nsjail like figma, nsjail is what we use as isolation layer at https://windmill.dev (Open-source alternative to Retool/Airplane)
[ Parent
| on HN ]
Re:Server-side sandboxing: Containers and seccomp
by jagrsw on Tuesday October 24, 2023 @03:21PM
(#38003981)
nsjail author here (the original one, as the tool is also maintained by others), good job!
Irrelevant nit: .proto files are protobuf definition files (like this one: https://github.com/google/nsjail/blob/master/config.proto), a text representation of a specific protobuf contents is typically called (as per man clang-format): .textpb .pb.txt or .textproto - I use .config for examples distributed with nsjail, but it's licentia poetica :)
Re:Server-side sandboxing: Containers and seccomp
by rubenfiszel on Tuesday October 24, 2023 @03:28PM
(#38004114)
The wonders of HN strikes again. Thank you for this amazing piece of technology that is nsjail. Nsjail is very core to our security, our multitenant would be so slow without it and I think we're one of the applications that leverage it in a way that showcase nsjail to its full extent (as in, we beat containers/firecracker cold starts by a fair margin while keeping most of their benefits). That's one of the reason we're order of magniture more efficient than Airplane that uses fargate under the hood. I would love to chat if you had time, my email in my profile.
Re:Server-side sandboxing: Containers and seccomp
by xyzzy_plugh on Tuesday October 24, 2023 @09:24PM
(#38008021)
Oddly enough the canonical extension seems to now be none of those but .txtpb:
https://protobuf.dev/reference/protobuf/textformat-spec/#tex...
Re:Server-side sandboxing: Containers and seccomp
by shooshx on Wednesday October 25, 2023 @03:31AM
(#38010214)
Why not just use json?
Re:Server-side sandboxing: Containers and seccomp
by jagrsw on Wednesday October 25, 2023 @04:22AM
(#38010535)
I may be mistaken, but does JSON offer the ability to define a schema with default values? Utilizing a single .proto file, I can tackle both the issues of default values and configuration structure, eliminating the need to manually check for missing mandatory sections.
However, I presume there are now JSON extensions that provide similar functionality?
Re:Server-side sandboxing: Containers and seccomp
by freeney on Tuesday October 24, 2023 @06:49PM
(#38006758)
Running arbitrary user code inside a jail that doesn’t isolate networking might not be enough isolation. Also kernel mount namespace binds into the jailed env increases the attack surface. Great for some use-cases, but multi-tenant workloads might need a tighter setup?
I'm definitely going to give Windmill a try. It looks really cool!