blob: 01c7903b0afcc860064cf0b36e34dab8e645573b [file] [log] [blame]
rsc058b0112005-01-03 06:40:20 +00001.TH SECSTORE 1
2.SH NAME
rsc8e4cf692005-02-13 22:19:39 +00003aescbc, ipso, secstore \- secstore commands
rsc058b0112005-01-03 06:40:20 +00004.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
rsc8e4cf692005-02-13 22:19:39 +000045.PP
46.B ipso
47[
48.B -a -e -l -f
49] [
50.I file
51\&...
52]
rsc058b0112005-01-03 06:40:20 +000053.SH DESCRIPTION
54.PP
55.I Secstore
56authenticates to the server
57using a password and optionally a hardware token,
58then saves or retrieves a file.
59This is intended to be a credentials store (public/private keypairs,
60passwords, and other secrets) for a factotum.
61.PP
62Option
63.B -p
64stores a file on the secstore.
65.PP
66Option
67.B -g
68retrieves a file to the local directory;
69option
70.B -G
71writes it to standard output instead.
72Specifying
73.I getfile
74of . will send to standard output
75a list of remote files with dates, lengths and SHA1 hashes.
76.PP
77Option
78.B -r
79removes a file from the secstore.
80.PP
81Option
82.B -c
83prompts for a password change.
84.PP
85Option
86.B -v
87produces more verbose output, in particular providing a few
88bits of feedback to help the user detect mistyping.
89.PP
90Option
91.B -i
92says that the password should be read from standard input
rscd93fca62005-02-11 19:21:47 +000093instead of from
94.BR /dev/tty .
rsc058b0112005-01-03 06:40:20 +000095.PP
96Option
97.B -n
98says that the password should be read from NVRAM
rscd93fca62005-02-11 19:21:47 +000099(see
rsc83c45062005-02-11 19:43:43 +0000100.IR authsrv (3))
rsc058b0112005-01-03 06:40:20 +0000101instead of from
rscd93fca62005-02-11 19:21:47 +0000102.BR /dev/tty .
rsc058b0112005-01-03 06:40:20 +0000103.PP
104The server is
rscd93fca62005-02-11 19:21:47 +0000105.BR tcp!$auth!secstore ,
rsc058b0112005-01-03 06:40:20 +0000106or the server specified by option
107.BR -s .
108.PP
109For example, to add a secret to the file read by
rscd93fca62005-02-11 19:21:47 +0000110.IR factotum (4),
111run
rsc058b0112005-01-03 06:40:20 +0000112.sp
113.EX
rscd93fca62005-02-11 19:21:47 +0000114 % cd somewhere-private
rsc058b0112005-01-03 06:40:20 +0000115 % 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:
rscd93fca62005-02-11 19:21:47 +0000120 % cat factotum | 9p write -l factotum/ctl
rsc058b0112005-01-03 06:40:20 +0000121.EE
122.PP
123and delete the window.
rscd93fca62005-02-11 19:21:47 +0000124The middle commands fetch the persistent copy of the secrets,
rsc058b0112005-01-03 06:40:20 +0000125append a new secret,
126and save the updated file back to secstore.
127The final command loads the new secret into the running factotum.
rsc8e4cf692005-02-13 22:19:39 +0000128.PP
129The
130.I ipso
131command packages this sequence into a convenient script to simplify editing of
132.I files
133stored on a secure store.
134It copies the named
135.I files
136into a private directory,
137plumbs them to the editor,
138and waits for a line on the console
139Once a line is typed,
140signifying that editing is complete,
141.I ipso
142prompts the user to confirm copying modifed or newly created files back to
143.I secstore.
144If no
145.I file
146is mentioned,
147.I ipso
148grabs all the user's files from
149.I secstore
150for editing.
151.PP
152By default, ipso will edit the
153.I secstore
154files and, if
155one of them is named
156.BR factotum ,
157flush current keys from factotum and load
158the new ones from the file.
159If the
160.BR -e ,
161.BR -f ,
162or
163.BR -l
164options are given,
165.I ipso
166will just perform only the requested operations, i.e.,
167edit, flush, and/or load.
168.PP
169The
170.B -a
171option of
172.I ipso
173provides a similar service for files encrypted by
174.I aescbc
175.RI ( q.v. ).
176With the
177.B -a
178option, the full rooted pathname of the
179.I file
180must be specified and all
181.I files
182must be encrypted with the same key.
183Also with
184.BR -a ,
185newly created files are ignored.
rsc058b0112005-01-03 06:40:20 +0000186.PP
187.I Aescbc
188encrypts and decrypts using AES (Rijndael) in cipher
189block chaining (CBC) mode.
190.SH SOURCE
rsc30f6ae12005-02-13 23:44:12 +0000191.B \*9/bin/ipso
192.br
193.B \*9/src/cmd/auth/secstore
rsc058b0112005-01-03 06:40:20 +0000194.SH SEE ALSO
195.IR factotum (4),
rscd93fca62005-02-11 19:21:47 +0000196.IR secstored (1)
rsc058b0112005-01-03 06:40:20 +0000197.SH BUGS
198There is deliberately no backup of files on the secstore, so
199.B -r
200(or a disk crash) is irrevocable. You are advised to store
201important secrets in a second location.
rsc8e4cf692005-02-13 22:19:39 +0000202.PP
203When using
204.IR ipso ,
205secrets will appear as plain text in the editor window,
206so use the command in private.
207.PP
208Establishing a private directory in which to store the secret
209files is difficult on Unix.
210On most systems,
211.I ipso
212creates a mode 700 directory
213.BI /tmp/ipso. user
214and works there.
215On Linux systems,
216.I ipso
217looks for a
218.B tmpfs
219file system; if it exists,
220.I ipso
221creates the
222.BI ipso. user
223directory in its root
224instead of
225.BR /tmp .
226.PP
227.I Ipso
228should zero the secret files before removing them.