]> err.no Git - pwstore/blob - README.asciidoc
c546a2de5d6d98a91ab7b03b3c4d8986135502a9
[pwstore] / README.asciidoc
1 introduction
2 ============
3
4 The pws tool allows you to store passwords (or anything else, really) in
5 a set of encrypted files.  Each file can be encrypted to a different set
6 of users.  pws helps you with the bookkeeping of which keys to encrypt
7 each file to and provides a convinient wrapper to edit protected files.
8
9 initialization
10 ==============
11 First you need a file where your users and group are defined in.  This
12 file is named .users.  Lines consist of assignments of the form
13  <username> = <keyfingerprint>
14 and
15  @<groupname> = <username>|@<groupname> [, [<username>|@<groupname> ...]
16
17 Lines starting with a # are comments and thus get ignored.
18
19 --------------------------------
20 cat .users
21
22 # This file needs to be gpg signed by a key whose fingerprint
23 # is listed in ~/.pws-trusted-users
24
25 formorer   = 6E3966C1E1D15DB973D05B491E45F8CA9DE23B16
26 weasel     = 25FC1614B8F87B52FF2F99B962AF4031C82E0039
27 @admins    = formorer, weasel
28
29 zobel    = 6B1856428E41EC893D5DBDBB53B1AC6DB11B627B
30 maxx     = 30DC1D281D7932F55E673ABB28EEB35A3E8DCCC0
31 @vienna = zobel, maxx
32
33 @all = @admins, @vienna
34
35 # gpg --clear .users && mv .users.asc .users
36 --------------------------------
37
38 The .users file is designed to live in a SCM repository, such as git,
39 alongside all the other encrypted files.  In order to prevent
40 unauthorized tampering with the .users file - for tricking somebody to
41 re-encrypt data to the wrong key - the .users file needs to be
42 PGP-clearsigned with a key from a whitelist.
43
44 This whitelist lives in ~/.pws-trusted-users, and simply takes one
45 key fingerprint per line:
46
47 ---------------------------------
48 # cat ~/.pws-trusted-users
49
50 #formorer
51 6E3966C1E1D15DB973D05B491E45F8CA9DE23B16
52 ---------------------------------
53
54 Currently this whitelist is the same for any pws repositories a user
55 might have.  A patch to remove this limitation would be nice.
56
57
58 adding a new file
59 =================
60
61 -----------------------------
62 # pws ed -n file
63 -----------------------------
64
65 editing files
66 =============
67
68 Every file needs a header like:
69
70 ------------------------------
71 access: @all
72 ------------------------------
73
74 You can edit the encrypted file with the pws tool: +pwd ed file+.
75
76 updating the keyring
77 ====================
78
79 If available as .keyring pws instructs GnuPG to use this keyring in
80 addition to the user's default keyrings.  This allows sharing of the
81 keyring in the repository.  Use +pws update-keyring+ to
82 update/initialize this keyring.
83