Blob


1 .TH SECSTORE 1
2 .SH NAME
3 aescbc, secstore, ipso \- secstore commands
4 .SH SYNOPSIS
5 .B secstore
6 [
7 .B -s
8 .I server
9 ]
10 [
11 .B -(g|G)
12 .I getfile
13 ]
14 [
15 .B -p
16 .I putfile
17 ]
18 [
19 .B -r
20 .I rmfile
21 ]
22 [
23 .B -c
24 ]
25 [
26 .B -u
27 .I user
28 ]
29 [
30 .B -v
31 ]
32 [
33 .B -i
34 ]
35 .PP
36 .B aescbc
37 -e
38 .I <cleartext
39 .I >ciphertext
40 .br
41 .B aescbc
42 -d
43 .I <ciphertext
44 .I >cleartext
45 .PP
46 .B ipso
47 [
48 .B -a -e -l -f -s
49 ] [
50 .I file
51 \&...
52 ]
53 .PP
54 .SH DESCRIPTION
55 .PP
56 .I Secstore
57 authenticates to the server
58 using a password and optionally a hardware token,
59 then saves or retrieves a file.
60 This is intended to be a credentials store (public/private keypairs,
61 passwords, and other secrets) for a factotum.
62 .PP
63 Option
64 .B -p
65 stores a file on the secstore.
66 .PP
67 Option
68 .B -g
69 retrieves a file to the local directory;
70 option
71 .B -G
72 writes it to standard output instead.
73 Specifying
74 .I getfile
75 of . will send to standard output
76 a list of remote files with dates, lengths and SHA1 hashes.
77 .PP
78 Option
79 .B -r
80 removes a file from the secstore.
81 .PP
82 Option
83 .B -c
84 prompts for a password change.
85 .PP
86 Option
87 .B -v
88 produces more verbose output, in particular providing a few
89 bits of feedback to help the user detect mistyping.
90 .PP
91 Option
92 .B -i
93 says that the password should be read from standard input
94 instead of from
95 .BR /dev/cons .
96 .PP
97 Option
98 .B -n
99 says that the password should be read from NVRAM
100 instead of from
101 .BR /dev/cons .
102 This option is unsupported.
103 .PP
104 The server is
105 .BR tcp!$auth!5356 ,
106 or the server specified by option
107 .BR -s .
108 .PP
109 For example, to add a secret to the file read by
110 .IR factotum (4)
111 at startup, open a new window, type
112 .sp
113 .EX
114 % ramfs -p; cd /tmp
115 % auth/secstore -g factotum
116 secstore password:
117 % echo 'key proto=apop dom=x.com user=ehg !password=hi' >> factotum
118 % auth/secstore -p factotum
119 secstore password:
120 % read -m factotum > /mnt/factotum/ctl
121 .EE
122 .PP
123 and delete the window.
124 The first line creates an ephemeral memory-resident workspace,
125 invisible to others and automatically removed when the window is deleted.
126 The next three commands fetch the persistent copy of the secrets,
127 append a new secret,
128 and save the updated file back to secstore.
129 The final command loads the new secret into the running factotum.
130 .PP
131 The
132 .I ipso
133 command packages this sequence into a convenient script to simplify editing of
134 .I files
135 stored on a secure store.
136 It copies the named
137 .I files
138 into a local
139 .IR ramfs (4)
140 and invokes
141 .IR acme (1)
142 on them. When the editor exits,
143 .I ipso
144 prompts the user to confirm copying modifed or newly created files back to
145 .I secstore.
146 If no
147 .I file
148 is mentioned,
149 .I ipso
150 grabs all the user's files from
151 .I secstore
152 for editing.
153 .PP
154 By default, ipso will edit the
155 .I secstore
156 files and, if
157 one of them is named
158 .BR factotum ,
159 flush your current keys from factotum and load
160 the new ones from the file.
161 If you supply any of the
162 .BR -e ,
163 .BR -f ,
164 or
165 .BR -l
166 options,
167 .I ipso
168 will just perform the operations you requested, i.e.,
169 edit, flush, and/or load.
170 .PP
171 The
172 .B -s
173 option of
174 .I ipso
175 invokes
176 .IR sam (1)
177 as the editor insted of
178 .BR acme ;
179 the
180 .B -a
181 option provides a similar service for files encrypted by
182 .I aescbc
183 .RI ( q.v. ).
184 With the
185 .B -a
186 option, the full rooted pathname of the
187 .I file
188 must be specified and all
189 .I files
190 must be encrypted with the same key.
191 Also with
192 .BR -a ,
193 newly created files are ignored.
194 .PP
195 .I Aescbc
196 encrypts and decrypts using AES (Rijndael) in cipher
197 block chaining (CBC) mode.
198 .SH SOURCE
199 .B \*9/src/cmd/secstore
200 .SH SEE ALSO
201 .IR factotum (4),
202 Plan 9's \fIsecstore\fR(8)
203 .SH BUGS
204 There is deliberately no backup of files on the secstore, so
205 .B -r
206 (or a disk crash) is irrevocable. You are advised to store
207 important secrets in a second location.
208 .PP
209 When using
210 .IR ipso ,
211 secrets will appear as plain text in the editor window,
212 so use the command in private.