| Age | Commit message (Collapse) | Author |
|
Move back to using plain containers, as they have stronger security
guarantees (`container machine` forwards SSH socket for example).
|
|
Similar to how we added an "RC" system to the init script, we
now have a custom tear-down script (which can do things like
unmount loop devices).
Furthermore, we make sure that an `$XDG_RUNTIME_DIR/dbx` exists
for things like SSH control sockets (so they can go somewhere
where an application has R/W access to, while only keeping RO
access to the configurations).
|
|
First of all, we just use Bash instead of POSIX `sh` - there are some
goodies that make it more robust (like `pipefail` and array expansion).
This also allows us to make a few more checks on the parameters (such
as denying invalid host specifies for `scp`).
Added an option for regenerating the SSH configuration
|
|
I ended up fighting with C for no benefit. We are back to a Shell
script, but this time we use (mostly) POSIX shell (we use `local`
because it is so convenient, although it is technically not POSIX).
Additionally, this time we create a monolithic script, and already
add hooks to allow for multiple contianer engines to work with the
script (for now, just `container` is implemented and `podman krun`
is stubbed).
|
|
|
|
We setup a single-use SSH key and can generate an SSH
configuration. Additionally, we support user SSH settings in
`~/.config/dbx/$NAME.ssh_config`.
This still doesn't quite work (there are some left-over TODOs).
In particular:
1. We need to get the generated SSH public key to the authorized
keys list on the devbox
2. We need to SCP and run the optional post-installation script
|
|
|
|
With `container` v1, a new `machine` subcommand was introduced in
order to support long-lived machines.
Port the `dbx` utility to use `container machine` instead of using
regular containers. The main motivation for this is:
- `container machine`s are more elastic; when they are stopped
their containers are removed entirely (which is different to a
container that is stopped, but not removed)
- `container machine`s can modify settings (such as CPU and memory
limits) after creation, allowing for the machine to change over
time as needed
Overall, the structure stays largely the same as before; the main
difference being how initialization is done (since `container
machine` has built-in support for initializing a user with
passwordless `sudo`). Note we explicitly set `--home-mount=none`
in order to keep the same filesystem isolation guarantees that
existed before (files can be copied with `scp`; there is no
`container cp` analogy for machines).
One notable difference is network management. `container machine`s
are assigned their own virtual network device and get a completely
separate IP to the host (which is different than before where
container ports were being published to the host). I do not know
which one is more secure...
|
|
|
|
|
|
|
|
License code for publishing under GPL, and cleanup a bit (in
particular, add a `Makefile` for building the Go `dbx-proxy`
executable).
|