1 | | See [wiki:"faq/admin/keyringer"]. |
| 1 | = MFPL Shared Keyring = |
| 2 | |
| 3 | [wiki:support-team Support Team Home] |
| 4 | |
| 5 | MFPL uses an OpenPGP encrypted file, that is shared via git, to store root and encrypted disk passphrases. |
| 6 | |
| 7 | To help us securely read and create new keys, we use a program called [http://git.sarava.org/?p=keyringer.git;a=summary keyringer]. |
| 8 | |
| 9 | = Setting up Keyringer = |
| 10 | Members of the support team can access the keys by following these steps: |
| 11 | |
| 12 | * Checkout the keyringer software: |
| 13 | {{{ |
| 14 | git clone git://git.sarava.org/keyringer.git |
| 15 | }}} |
| 16 | * Edit ~/.bashrc and add the following line, which is the path to your bash $PATH variable. After editing ~/.bashrc: |
| 17 | {{{ |
| 18 | export PATH="$PATH:/path/to/keyringer" |
| 19 | }}} |
| 20 | * Source your bash: |
| 21 | {{{ |
| 22 | source ~/.bashrc |
| 23 | }}} |
| 24 | * Initialize the MFPL keyringer. Replace "/path/to/keys" with the path where you want to checkout the MFPL keyring in your filesystem |
| 25 | {{{ |
| 26 | keyringer mfpl init /path/to/keys gitosis@git.mayfirst.org:mfpl/keys |
| 27 | }}} |
| 28 | * Before you can successfully run the script, you must have all of the people in the "config/recipients" in you gpg keyring. To ensure they are all in your keyring you can run: |
| 29 | {{{ |
| 30 | for fpr in $(grep -v '#' config/recipients/default |cut -d\ -f2); do gpg --recv-key $fpr; done |
| 31 | }}} |
| 32 | * Create a symlink to the pass script in the keys directory in your bin directory: |
| 33 | {{{ |
| 34 | ln -s /path/to/keys/pass ~/bin/ |
| 35 | }}} |
| 36 | * Use the bash wrapper script in the MFPL key ringer directory to search for keys. For example, to find the passphrase for assata: |
| 37 | {{{ |
| 38 | pass assata |
| 39 | }}} |
| 40 | |
| 41 | = Editing a Keyringer Entry = |
| 42 | From time to time you may need to edit a row in the keyring, for example after changing a password. |
| 43 | |
| 44 | == Using the helper script == |
| 45 | |
| 46 | The MF/PL keyringer repository comes with a script call pass that can be used as a wrapper to the keyringer commands used to decrypt and encrypt the keyring file. |
| 47 | |
| 48 | To search for a key try: |
| 49 | |
| 50 | {{{ |
| 51 | ./pass <server> |
| 52 | }}} |
| 53 | |
| 54 | Or, to add one, simply type: |
| 55 | |
| 56 | {{{ |
| 57 | ./pass |
| 58 | }}} |
| 59 | |
| 60 | And follow the prompts. |
| 61 | |
| 62 | == Manually == |
| 63 | |
| 64 | Assuming that you have keyringer set up properly, there is a command should unlock the keys, and pass it to an editor. It also creates a decrypted temp file in the keyringer temp directory. The command is: |
| 65 | |
| 66 | Be sure to update your git repository before trying to add a new key or you will create a messy conflict situation: |
| 67 | |
| 68 | {{{ |
| 69 | git pull |
| 70 | }}} |
| 71 | |
| 72 | {{{ |
| 73 | keyringer mfpl edit mfpl.asc |
| 74 | }}} |
| 75 | |
| 76 | You will be prompted for your key auth (if it isn't already loaded). It will then check all signatures against the recipients file ({{{/path/to/keys/config/recipients/default}}}. Then it will present you with an option like: |
| 77 | {{{ |
| 78 | Press any key to open the decrypted data in /usr/bin/emacsclient -a '' -t, Ctrl-C to abort |
| 79 | }}} |
| 80 | |
| 81 | Pressing "any key" has never worked for me. However I can edit the tmp file. The tmp directory is in the mfpl keyring directory, ie {{{/path/to/keys/tmp}}}. After editing the tmp file, you can hit Ctrl-C in your terminal. This will encrypt the tmp file to all recipients in th recipients list, and overwrite the original. |
| 82 | |
| 83 | Next you will need to commit your changes. Assuming your're in your {{{/path/to/keys/}}} dir, a simple: |
| 84 | |
| 85 | {{{ |
| 86 | git commit -a |
| 87 | }}} |
| 88 | |
| 89 | should do the trick. |
| 90 | |
| 91 | You will then need to push your changes so that the rest of the support team has access to the new password: |
| 92 | |
| 93 | {{{ |
| 94 | git push origin master |
| 95 | }}} |