BUPSTASH-NEW-SUB-KEY(1)

๐Ÿ“ฆ
version 0.12.0 ยท 3 versions
, in alpine 3.24

โœจ bupstash-new-sub-key โœจ

ok so this is the bupstash-new-sub-key page from the General Commands Manual โ€” yes bestie, the big one, and it's giving "make me a baby key with trust issues" ๐Ÿ’… let's go

๐ŸŒธ SYNOPSIS ๐ŸŒธ

Generate a bupstash sub key with lesser encryption and decryption capabilities.

bupstash new-sub-key -k KEY -o SUB_KEY

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So bupstash new-sub-key creates a brand new bupstash key that can do a subset of the encryption and decryption operations of the main key. literally that's the whole vibe โ€” same family, way fewer permissions ๐Ÿซถ

Capabilities are any of 'put', 'list' and 'list-contents'. Break it down:

  • 'put' keys can create new backups but not decrypt data ๐Ÿ”ฅ
  • 'list' keys can decrypt tags and other metadata ๐Ÿ‘‘
  • 'list-contents' keys can decrypt the contents of items created by 'bupstash put' ๐Ÿ˜ญ (yes, the most powerful one, handle with care)

A typical use of a list only key would be to allow a cron job to rotate old backups by their search tags, without exposing the data decryption key. iconic low-privilege behavior, no cap ๐ŸŽ€

The generated key will be marked readable only for the creating user. periodt ๐Ÿ’œ

If a sub-key is lost, the original key will still be able to decrypt any data in the repository encrypted by that sub-key. phew ๐Ÿ˜ฎโ€๐Ÿ’จ

NOTE: decryption differs from access โ€” An attacker may still delete data by simply deleting the items or files they have access to. Use bupstash-serve(1) access controls to restrict which operations a user can perform and prevent unauthorized deletion of data. This can be done via an ssh authorized_keys file, or through mechanisms such as sudo or doas configuration. ๐Ÿ’€ this is the part where you sit up straight, bestie โ€” not having the key doesn't mean someone can't just yeet your files.

โœจ OPTIONS โœจ

  • -k, --key PATH โ€” Key to derive the new sub-key from. the main character key ๐Ÿ”‘
  • -o, --output PATH โ€” Path to where the sub-key will be written. the glow-up destination ๐ŸŽ€
  • --put โ€” The key is able to encrypt data for 'put' operations. โœจ
  • --list โ€” The key will be able to decrypt metadata and perform queries. ๐Ÿฆ‹
  • --list-contents โ€” The key will be able to list item contents with 'list-contents' (implies --list). โญ

๐ŸŒˆ EXAMPLES ๐ŸŒˆ

๐Ÿงš Create a new put only key

$ bupstash new-sub-key --put -k backups.key -o ./put.key
$ bupstash put -k ./backups-put.key ./data

๐Ÿ’– Create a new listing key

$ bupstash new-sub-key -k ./backups.key -o ./list.key --list
$ bupstash list -k ./list.key

๐Ÿ‘‘ Create a new content listing key

$ bupstash new-sub-key -k ./backups.key -o ./list-contents.key --list-contents
$ bupstash list-contents -k ./list-contents.key name=some-backup.tar

๐ŸŒธ SEE ALSO ๐ŸŒธ

bupstash(1), bupstash-keyfiles(7)

go read those too, iykyk ๐Ÿซถ

ok that's the whole page, slay ๐Ÿ’… this was bupstash-new-sub-key(1) from the General Commands Manual, dated May 2025 โ€” mwah, drink water, protect your main key ๐Ÿ”ฅ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from