1
0
Fork 0
Commit Graph

7 Commits (master)

Author SHA1 Message Date
Dustin 74fa9264df xactfetch: Configure secretsocket
The `xactfetch` script now uses a helper tool, `secretsocket` to
handle looking up secrets.  This tool supports various secret source
types, including files, environment variables, and external commands.
Separating this functionality out of the main script makes it a lot
more flexible and pluggable.  It's main purpose, though, was actually
to allow `xactfetch` to run in a container while communicating with
`rbw` outside that container, specifically for development puposes.

The `secretsocket` tool reads its configuration from a TOML document.
This document defines the secrets the tool handles, and how to look
them up.

Note that the `xactfetch` container image no longer defines the
`XDG_CONFIG_HOME` environment variable, as it uses Chromium instead of
Firefox now, and the former does not work with a read-only config
directory.  As such, we have to mount the `rbw` configuration in the
default location.
2024-07-11 22:49:07 -05:00
Dustin ee00412bf6 xactfetch: Use separate CronJobs per bank
Usually, `xactfetch` will only fail for one bank or the other.  Rarely
do we want to redownload the data from both banks just because one
failed.  The latest version of `xactfetch` supports specifying a bank
name as a CLI argument, so now we can define separate jobs for each
bank.  Then, when one Job fails, only that one will be retried later.

It's kind of a bummer that it's so repetitive to define two CronJobs
that differ by only a single command-line argument.  I suppose that's
a good argument for using one of the preprocessor tools like Jsonnet
or KCL.
2024-07-11 22:09:27 -05:00
Dustin c741d04d54 xactfetch: Skip wait for manual runs
When the `xactfetch` CronJob is triggered manually, it will now skip
the `sleep` step.  Presumably, whoever triggered it wants the script
to run _right now_, probably to diagnose a problem.
2024-07-11 22:07:54 -05:00
Dustin 365334cea7 xactfetch: Provide Vaultwarden password for sync
Vaultwarden has started prompting for the master password occasionally
when syncing the vault.  Thus, we need to make sure it is available in
the _sync_ container, by mounting the secret and providing the
`PINENTRY_PASSWORD_FILE` environment variable.
2024-05-29 09:36:30 -05:00
Dustin 8bb8ed4402 xactfetch: Additional mounts for rbw sync
In order to sync the Bitwarden vault, `rbw` needs its configuration file
in `/etc/rbw` and access to writable ephemeral storage at `/tmp`.
2024-01-24 12:00:13 -06:00
Dustin 0e20952740 xactfetch: Sync vault before running
The Bitwarden vault needs to be synced before *xactfetch* runs, in case
the password for a bank website has changed since it was first fetched.
2024-01-22 17:52:35 -06:00
Dustin 9561c687aa xactfetch: Run xactfetch in a CronJob
I finally got *xactfetch* cleaned up enough to run in a headless
container.
2023-12-27 11:08:25 -06:00