infra:hackerpass
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| infra:hackerpass [2024/03/23 17:45] – created kfh | infra:hackerpass [2025/11/22 20:58] (current) – atluxity_idp.hackeriet.no | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | How to hackerpass | + | ====== |
| + | pass is the secret sharing infra we use at hackeriet. It's low effort, and every write becomes a commit. Since hackerpass is on a private repo, the README.md file from that repo is pasted below so others can benefit from the docs. | ||
| + | The name hackerpass is something someone chose at one time to separate from pass. Feel free to name your own non-hackeriet shared pass repo pinkfluffyunicornpass or something to avoid confusion. 🦄 | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Getting started ===== | ||
| + | |||
| + | You'll need a GPG key for this. Send your public key to someone who already has access to follow " | ||
| + | |||
| + | First install pass, then clone this repository into ~/ | ||
| + | |||
| + | |||
| + | < | ||
| + | git clone git@github.com: | ||
| + | </ | ||
| + | |||
| + | Then add the following alias to your .bashrc: | ||
| + | |||
| + | < | ||
| + | alias hackerpass=' | ||
| + | </ | ||
| + | |||
| + | And import the gpg keys: | ||
| + | |||
| + | < | ||
| + | for i in $(< | ||
| + | </ | ||
| + | |||
| + | To update the password database from this repo type: | ||
| + | |||
| + | < | ||
| + | hackerpass git pull | ||
| + | </ | ||
| + | |||
| + | ===== Addding a password ===== | ||
| + | |||
| + | Beware this repository leaks file name information to everyone with access to the repo. Generally use the FQDN as a file name unless it reveals something it should not. | ||
| + | |||
| + | < | ||
| + | hackerpass generate that-place-i-put-that-thing-one-time.com 28 | ||
| + | </ | ||
| + | |||
| + | Then remember to push the new password: | ||
| + | |||
| + | < | ||
| + | hackerpass git push | ||
| + | </ | ||
| + | |||
| + | ===== Adding a new user ===== | ||
| + | |||
| + | ==== 1. Verify identity (lightweight, | ||
| + | |||
| + | Make sure the person in front of you is the one who controls the key. | ||
| + | |||
| + | This does not require formal ID checks. | ||
| + | |||
| + | Avoid adding keys you only know from random electronic contact with no real-world context. | ||
| + | |||
| + | You should at least have met them or otherwise have a non-trivial trust path. | ||
| + | |||
| + | ==== 2. Import the public key ==== | ||
| + | |||
| + | If you received a file (for example '' | ||
| + | |||
| + | <code bash> gpg --import userkey.asc </ | ||
| + | |||
| + | ==== 3. Inspect and confirm the key ID ==== | ||
| + | |||
| + | Avoid listing all keys. Query only the specific key, using an identifier such as email: | ||
| + | |||
| + | <code bash> | ||
| + | gpg --list-keys --keyid-format LONG user@example.org | ||
| + | gpg --fingerprint user@example.org </ | ||
| + | |||
| + | Example output: | ||
| + | |||
| + | < | ||
| + | |||
| + | Use the full fingerprint (for example: '' | ||
| + | |||
| + | |||
| + | ==== 4. Set trust on the key ==== | ||
| + | |||
| + | Mark the key as trusted locally, so GnuPG will actually use it for encryption: | ||
| + | |||
| + | <code bash> gpg --lsign-key < | ||
| + | |||
| + | This avoids errors like: | ||
| + | |||
| + | < | ||
| + | |||
| + | ==== 5. Re-encrypt the store including the new user ==== | ||
| + | |||
| + | Reinitialise the password store with all existing recipients plus the new key: | ||
| + | |||
| + | <code bash> hackerpass init $(< | ||
| + | |||
| + | Then push the updated encryption: | ||
| + | |||
| + | <code bash> hackerpass git push </ | ||
| + | |||
| + | ==== Alternative: | ||
| + | |||
| + | If you cannot or do not want to sign the key with your certification key, you can use GnuPG’s TOFU trust: | ||
| + | |||
| + | <code bash> gpg --tofu-policy good < | ||
| + | |||
| + | Then repeat the re-encryption step: | ||
| + | |||
| + | <code bash> hackerpass init $(< | ||
| + | |||
| + | ===== Notes ===== | ||
| + | |||
| + | Every password change creates a Git commit in the repository. | ||
| + | |||
| + | File names and directory structure are not encrypted. | ||
| + | |||
| + | Always run '' | ||
/srv/hackeriet-wiki/dokuwiki/data/attic/infra/hackerpass.1711215934.txt.gz · Last modified: by kfh