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