Blame


1 d93fca6a 2005-02-11 devnull .TH FACTOTUM 4
2 d93fca6a 2005-02-11 devnull .SH NAME
3 d93fca6a 2005-02-11 devnull factotum \- authentication agent
4 d93fca6a 2005-02-11 devnull .SH SYNOPSIS
5 d93fca6a 2005-02-11 devnull .B factotum
6 d93fca6a 2005-02-11 devnull [
7 d93fca6a 2005-02-11 devnull .B -DdkSun
8 d93fca6a 2005-02-11 devnull ] [
9 d93fca6a 2005-02-11 devnull .B -a authaddr
10 d93fca6a 2005-02-11 devnull ] [
11 d93fca6a 2005-02-11 devnull .B -s
12 d93fca6a 2005-02-11 devnull .I srvname
13 d93fca6a 2005-02-11 devnull ]
14 d93fca6a 2005-02-11 devnull .\" [
15 d93fca6a 2005-02-11 devnull .\" .B -m
16 d93fca6a 2005-02-11 devnull .\" .I mtpt
17 d93fca6a 2005-02-11 devnull .\" ]
18 d93fca6a 2005-02-11 devnull .PP
19 d93fca6a 2005-02-11 devnull .B factotum
20 d93fca6a 2005-02-11 devnull .B -g
21 d93fca6a 2005-02-11 devnull .IB attribute = value
22 d93fca6a 2005-02-11 devnull .B ...
23 d93fca6a 2005-02-11 devnull .IB attribute ?
24 d93fca6a 2005-02-11 devnull .B ...
25 d93fca6a 2005-02-11 devnull .\" .PP
26 d93fca6a 2005-02-11 devnull .\" .B auth/fgui
27 d93fca6a 2005-02-11 devnull .SH DESCRIPTION
28 d93fca6a 2005-02-11 devnull .I Factotum
29 d93fca6a 2005-02-11 devnull is a user-level file system that
30 d93fca6a 2005-02-11 devnull acts as the authentication agent for a user.
31 d93fca6a 2005-02-11 devnull It does so by managing a set of
32 d93fca6a 2005-02-11 devnull .IR keys .
33 d93fca6a 2005-02-11 devnull A key is a collection of information used to authenticate a particular action.
34 d93fca6a 2005-02-11 devnull Stored as a list of
35 d93fca6a 2005-02-11 devnull .IB attribute = value
36 d93fca6a 2005-02-11 devnull pairs, a key typically contains a user, an authentication domain, a protocol, and
37 d93fca6a 2005-02-11 devnull some secret data.
38 d93fca6a 2005-02-11 devnull .PP
39 d93fca6a 2005-02-11 devnull .I Factotum
40 d93fca6a 2005-02-11 devnull presents the following files:
41 d93fca6a 2005-02-11 devnull .TF needkey
42 d93fca6a 2005-02-11 devnull .TP
43 d93fca6a 2005-02-11 devnull .B rpc
44 d93fca6a 2005-02-11 devnull each open represents a new private channel to
45 d93fca6a 2005-02-11 devnull .I factotum
46 d93fca6a 2005-02-11 devnull .TP
47 d93fca6a 2005-02-11 devnull .B proto
48 d93fca6a 2005-02-11 devnull when read lists the protocols available
49 d93fca6a 2005-02-11 devnull .TP
50 d93fca6a 2005-02-11 devnull .B confirm
51 d93fca6a 2005-02-11 devnull for confiming the use of key
52 d93fca6a 2005-02-11 devnull .TP
53 d93fca6a 2005-02-11 devnull .B needkey
54 d93fca6a 2005-02-11 devnull allows external programs to control the addition of new keys
55 d93fca6a 2005-02-11 devnull .TP
56 d93fca6a 2005-02-11 devnull .B log
57 d93fca6a 2005-02-11 devnull a log of actions
58 d93fca6a 2005-02-11 devnull .TP
59 d93fca6a 2005-02-11 devnull .B ctl
60 d93fca6a 2005-02-11 devnull for maintaining keys; when read, it returns a list of keys.
61 d93fca6a 2005-02-11 devnull For secret attributes, only the attribute name follow by a
62 d93fca6a 2005-02-11 devnull .L ?
63 d93fca6a 2005-02-11 devnull is returned.
64 d93fca6a 2005-02-11 devnull .PD
65 d93fca6a 2005-02-11 devnull .PP
66 d93fca6a 2005-02-11 devnull In any authentication, the caller typically acts as a client
67 d93fca6a 2005-02-11 devnull and the callee as a server. The server determines
68 d93fca6a 2005-02-11 devnull the authentication domain, sometimes after a negotiation with
69 d93fca6a 2005-02-11 devnull the client. Authentication always requires the client to
70 d93fca6a 2005-02-11 devnull prove its identity to the server. Under some protocols, the
71 d93fca6a 2005-02-11 devnull authentication is mutual.
72 d93fca6a 2005-02-11 devnull Proof is accomplished using secret information kept by factotum
73 d93fca6a 2005-02-11 devnull in conjunction with a cryptographic protocol.
74 d93fca6a 2005-02-11 devnull .PP
75 d93fca6a 2005-02-11 devnull .I Factotum
76 d93fca6a 2005-02-11 devnull can act in the role of client for any process possessing the
77 d93fca6a 2005-02-11 devnull same user id as it. For select protocols such as
78 d93fca6a 2005-02-11 devnull .B p9sk1
79 d93fca6a 2005-02-11 devnull it can also act as a client for other processes provided
80 d93fca6a 2005-02-11 devnull its user id may speak for the other process' user id (see
81 d93fca6a 2005-02-11 devnull Plan 9's
82 d93fca6a 2005-02-11 devnull \fIauthsrv\fR(6)).
83 d93fca6a 2005-02-11 devnull .I Factotum
84 d93fca6a 2005-02-11 devnull can act in the role of server for any process.
85 d93fca6a 2005-02-11 devnull .PP
86 d93fca6a 2005-02-11 devnull .IR Factotum 's
87 d93fca6a 2005-02-11 devnull structure is independent of
88 d93fca6a 2005-02-11 devnull any particular authentication protocol.
89 d93fca6a 2005-02-11 devnull .I Factotum
90 d93fca6a 2005-02-11 devnull supports the following protocols:
91 d93fca6a 2005-02-11 devnull .TF mschap
92 d93fca6a 2005-02-11 devnull .TP
93 d93fca6a 2005-02-11 devnull .B p9any
94 d93fca6a 2005-02-11 devnull a metaprotocol used to negotiate which actual protocol to use.
95 d93fca6a 2005-02-11 devnull .TP
96 d93fca6a 2005-02-11 devnull .B p9sk1
97 d93fca6a 2005-02-11 devnull a Plan 9 shared key protocol.
98 d93fca6a 2005-02-11 devnull .TP
99 d93fca6a 2005-02-11 devnull .B p9sk2
100 d93fca6a 2005-02-11 devnull a variant of
101 d93fca6a 2005-02-11 devnull .B p9sk1.
102 d93fca6a 2005-02-11 devnull .TP
103 d93fca6a 2005-02-11 devnull .B p9cr
104 d93fca6a 2005-02-11 devnull a Plan 9 protocol that can use either
105 d93fca6a 2005-02-11 devnull .B p9sk1
106 d93fca6a 2005-02-11 devnull keys or SecureID tokens.
107 d93fca6a 2005-02-11 devnull .TP
108 d93fca6a 2005-02-11 devnull .B apop
109 d93fca6a 2005-02-11 devnull the challenge/response protocol used by POP3 mail servers.
110 d93fca6a 2005-02-11 devnull .TP
111 d93fca6a 2005-02-11 devnull .B cram
112 d93fca6a 2005-02-11 devnull the challenge/response protocol also used by POP3 mail servers.
113 d93fca6a 2005-02-11 devnull .TP
114 d93fca6a 2005-02-11 devnull .B chap
115 d93fca6a 2005-02-11 devnull the challenge/response protocols used by PPP and PPTP.
116 d93fca6a 2005-02-11 devnull .TP
117 d93fca6a 2005-02-11 devnull .B mschap
118 d93fca6a 2005-02-11 devnull a proprietary Microsoft protocol also used by PPP and PPTP.
119 d93fca6a 2005-02-11 devnull .TP
120 d93fca6a 2005-02-11 devnull .B rsa
121 d93fca6a 2005-02-11 devnull RSA public key decryption, used by SSH and TLS.
122 d93fca6a 2005-02-11 devnull .TP
123 d93fca6a 2005-02-11 devnull .B pass
124 d93fca6a 2005-02-11 devnull passwords in the clear.
125 d93fca6a 2005-02-11 devnull .TP
126 d93fca6a 2005-02-11 devnull .B vnc
127 d93fca6a 2005-02-11 devnull .IR vnc (1)'s
128 d93fca6a 2005-02-11 devnull challenge/response.
129 d93fca6a 2005-02-11 devnull .TP
130 d93fca6a 2005-02-11 devnull .B wep
131 d93fca6a 2005-02-11 devnull WEP passwords for wireless ethernet cards.
132 d93fca6a 2005-02-11 devnull .PD
133 d93fca6a 2005-02-11 devnull .PP
134 d93fca6a 2005-02-11 devnull The options are:
135 d93fca6a 2005-02-11 devnull .TP
136 d93fca6a 2005-02-11 devnull .B \-a
137 d93fca6a 2005-02-11 devnull supplies the address of the authentication server to use.
138 d93fca6a 2005-02-11 devnull Without this option, it will attempt to find an authentication server by
139 d93fca6a 2005-02-11 devnull querying the connection server, the file
140 d93fca6a 2005-02-11 devnull .BR <mtpt>/ndb ,
141 d93fca6a 2005-02-11 devnull and finally the network database in
142 d93fca6a 2005-02-11 devnull .BR /lib/ndb .
143 d93fca6a 2005-02-11 devnull .TP
144 d93fca6a 2005-02-11 devnull .B \-m
145 d93fca6a 2005-02-11 devnull specifies the mount point to use, by default
146 d93fca6a 2005-02-11 devnull .BR /mnt .
147 d93fca6a 2005-02-11 devnull .TP
148 d93fca6a 2005-02-11 devnull .B \-s
149 d93fca6a 2005-02-11 devnull specifies the service name to use.
150 d93fca6a 2005-02-11 devnull Without this option,
151 d93fca6a 2005-02-11 devnull .I factotum
152 d93fca6a 2005-02-11 devnull does not create a service file in
153 d93fca6a 2005-02-11 devnull .BR /srv .
154 d93fca6a 2005-02-11 devnull .TP
155 d93fca6a 2005-02-11 devnull .B \-D
156 d93fca6a 2005-02-11 devnull turns on 9P tracing, written to standard error.
157 d93fca6a 2005-02-11 devnull .TP
158 d93fca6a 2005-02-11 devnull .B \-d
159 d93fca6a 2005-02-11 devnull turns on debugging, written to standard error.
160 d93fca6a 2005-02-11 devnull .TP
161 d93fca6a 2005-02-11 devnull .B \-g
162 d93fca6a 2005-02-11 devnull causes the agent to prompt for the key, write it
163 d93fca6a 2005-02-11 devnull to the
164 d93fca6a 2005-02-11 devnull .B ctl
165 d93fca6a 2005-02-11 devnull file, and exit.
166 d93fca6a 2005-02-11 devnull The agent will prompt for values for any of the
167 d93fca6a 2005-02-11 devnull attributes ending with a question mark
168 d93fca6a 2005-02-11 devnull .RB ( ? )
169 d93fca6a 2005-02-11 devnull and will append all the supplied
170 d93fca6a 2005-02-11 devnull .I attribute = value
171 d93fca6a 2005-02-11 devnull pairs. See the section on key templates below.
172 d93fca6a 2005-02-11 devnull .TP
173 d93fca6a 2005-02-11 devnull .B \-n
174 d93fca6a 2005-02-11 devnull don't look for a secstore.
175 d93fca6a 2005-02-11 devnull .TP
176 d93fca6a 2005-02-11 devnull .B \-S
177 d93fca6a 2005-02-11 devnull indicates that the agent is running on a
178 d93fca6a 2005-02-11 devnull cpu server. On starting, it will attempt to get a
179 d93fca6a 2005-02-11 devnull .B 9psk1
180 d93fca6a 2005-02-11 devnull key from NVRAM using
181 d93fca6a 2005-02-11 devnull .B readnvram
182 d93fca6a 2005-02-11 devnull (see
183 d93fca6a 2005-02-11 devnull .IR authsrv (3)),
184 d93fca6a 2005-02-11 devnull prompting for anything it needs.
185 d93fca6a 2005-02-11 devnull It will never subsequently prompt for a
186 d93fca6a 2005-02-11 devnull key that it doesn't have.
187 d93fca6a 2005-02-11 devnull This option is typically used by
188 d93fca6a 2005-02-11 devnull the kernel at boot time.
189 d93fca6a 2005-02-11 devnull .TP
190 d93fca6a 2005-02-11 devnull .B \-k
191 d93fca6a 2005-02-11 devnull causes the NVRAM to be written.
192 d93fca6a 2005-02-11 devnull It is only valid with the
193 d93fca6a 2005-02-11 devnull .B \-S
194 d93fca6a 2005-02-11 devnull option.
195 d93fca6a 2005-02-11 devnull This option is typically used by
196 d93fca6a 2005-02-11 devnull the kernel at boot time.
197 d93fca6a 2005-02-11 devnull .TP
198 d93fca6a 2005-02-11 devnull .B \-u
199 d93fca6a 2005-02-11 devnull causes the agent to prompt for user
200 d93fca6a 2005-02-11 devnull id and writes it to
201 d93fca6a 2005-02-11 devnull .BR /dev/hostowner .
202 d93fca6a 2005-02-11 devnull It is mutually exclusive with
203 d93fca6a 2005-02-11 devnull .B \-k
204 d93fca6a 2005-02-11 devnull and
205 d93fca6a 2005-02-11 devnull .BR \-S .
206 d93fca6a 2005-02-11 devnull This option is typically used by
207 d93fca6a 2005-02-11 devnull the kernel at boot time.
208 d93fca6a 2005-02-11 devnull .PD
209 d93fca6a 2005-02-11 devnull .\" .PP
210 d93fca6a 2005-02-11 devnull .\" .I Fgui
211 d93fca6a 2005-02-11 devnull .\" is a graphic user interface for confirming key usage and
212 d93fca6a 2005-02-11 devnull .\" entering new keys. It hides the window in which it starts
213 d93fca6a 2005-02-11 devnull .\" and waits reading requests from
214 d93fca6a 2005-02-11 devnull .\" .B confirm
215 d93fca6a 2005-02-11 devnull .\" and
216 d93fca6a 2005-02-11 devnull .\" .BR needkey .
217 d93fca6a 2005-02-11 devnull .\" For each requests, it unhides itself and waits for
218 d93fca6a 2005-02-11 devnull .\" user input.
219 d93fca6a 2005-02-11 devnull .\" See the sections on key confirmation and key prompting below.
220 d93fca6a 2005-02-11 devnull .SS "Key Tuples
221 d93fca6a 2005-02-11 devnull .PP
222 d93fca6a 2005-02-11 devnull A
223 d93fca6a 2005-02-11 devnull .I "key tuple
224 d93fca6a 2005-02-11 devnull is a space delimited list of
225 d93fca6a 2005-02-11 devnull .IB attribute = value
226 d93fca6a 2005-02-11 devnull pairs. An attribute whose name begins with an exclamation point
227 d93fca6a 2005-02-11 devnull .RB ( ! )
228 d93fca6a 2005-02-11 devnull does not appear when reading the
229 d93fca6a 2005-02-11 devnull .B ctl
230 d93fca6a 2005-02-11 devnull file.
231 d93fca6a 2005-02-11 devnull The required attributes depend on the authentication protocol.
232 d93fca6a 2005-02-11 devnull .PP
233 d93fca6a 2005-02-11 devnull .BR P9sk1 ,
234 d93fca6a 2005-02-11 devnull .BR p9sk2 ,
235 d93fca6a 2005-02-11 devnull and
236 d93fca6a 2005-02-11 devnull .BR p9cr
237 d93fca6a 2005-02-11 devnull all require a key with
238 d93fca6a 2005-02-11 devnull .BR proto = p9sk1 ,
239 d93fca6a 2005-02-11 devnull a
240 d93fca6a 2005-02-11 devnull .B dom
241 d93fca6a 2005-02-11 devnull attribute identifying the authentication domain, a
242 d93fca6a 2005-02-11 devnull .B user
243 d93fca6a 2005-02-11 devnull name valid in that domain, and either a
244 d93fca6a 2005-02-11 devnull .B !password
245 d93fca6a 2005-02-11 devnull or
246 d93fca6a 2005-02-11 devnull .B !hex
247 d93fca6a 2005-02-11 devnull attribute specifying the password or hexadecimal secret
248 d93fca6a 2005-02-11 devnull to be used. Here is an example:
249 d93fca6a 2005-02-11 devnull .PP
250 d93fca6a 2005-02-11 devnull .EX
251 d93fca6a 2005-02-11 devnull proto=p9sk1 dom=avayalabs.com user=presotto !password=lucent
252 d93fca6a 2005-02-11 devnull .EE
253 d93fca6a 2005-02-11 devnull .PP
254 d93fca6a 2005-02-11 devnull .BR Apop ,
255 d93fca6a 2005-02-11 devnull .BR cram ,
256 d93fca6a 2005-02-11 devnull .BR chap ,
257 d93fca6a 2005-02-11 devnull and
258 d93fca6a 2005-02-11 devnull .BR mschap ,
259 d93fca6a 2005-02-11 devnull require a key with a
260 d93fca6a 2005-02-11 devnull .B proto
261 d93fca6a 2005-02-11 devnull attribute whose value matches the protocol,
262 d93fca6a 2005-02-11 devnull in addition to
263 d93fca6a 2005-02-11 devnull .BR server ,
264 d93fca6a 2005-02-11 devnull .BR user ,
265 d93fca6a 2005-02-11 devnull and
266 d93fca6a 2005-02-11 devnull .B !password
267 d93fca6a 2005-02-11 devnull attributes;
268 d93fca6a 2005-02-11 devnull e.g.
269 d93fca6a 2005-02-11 devnull .PP
270 d93fca6a 2005-02-11 devnull .EX
271 d93fca6a 2005-02-11 devnull proto=apop server=mit.edu user=rsc !password=nerdsRus
272 d93fca6a 2005-02-11 devnull .EE
273 d93fca6a 2005-02-11 devnull Vnc is similar but does not require a
274 d93fca6a 2005-02-11 devnull .B user
275 d93fca6a 2005-02-11 devnull attribute.
276 d93fca6a 2005-02-11 devnull .PP
277 d93fca6a 2005-02-11 devnull .B Pass
278 d93fca6a 2005-02-11 devnull requires a key with
279 d93fca6a 2005-02-11 devnull .B proto=pass
280 d93fca6a 2005-02-11 devnull in addition to
281 d93fca6a 2005-02-11 devnull .B user
282 d93fca6a 2005-02-11 devnull and
283 d93fca6a 2005-02-11 devnull .B !password
284 d93fca6a 2005-02-11 devnull attributes; e.g.
285 d93fca6a 2005-02-11 devnull .PP
286 d93fca6a 2005-02-11 devnull .EX
287 d93fca6a 2005-02-11 devnull proto=pass user=tb !password=does.it.matter
288 d93fca6a 2005-02-11 devnull .EE
289 d93fca6a 2005-02-11 devnull .PP
290 d93fca6a 2005-02-11 devnull .B Rsa
291 d93fca6a 2005-02-11 devnull requires a key with
292 d93fca6a 2005-02-11 devnull .B proto=rsa
293 d93fca6a 2005-02-11 devnull in addition to all the hex attributes defining an RSA key:
294 d93fca6a 2005-02-11 devnull .BR ek ,
295 d93fca6a 2005-02-11 devnull .BR n ,
296 d93fca6a 2005-02-11 devnull .BR !p ,
297 d93fca6a 2005-02-11 devnull .BR !q ,
298 d93fca6a 2005-02-11 devnull .BR !kp ,
299 d93fca6a 2005-02-11 devnull .BR !kq ,
300 d93fca6a 2005-02-11 devnull .BR !c2 ,
301 d93fca6a 2005-02-11 devnull and
302 d93fca6a 2005-02-11 devnull .BR !dk .
303 d93fca6a 2005-02-11 devnull By convention, programs using the RSA protocol also require a
304 d93fca6a 2005-02-11 devnull .B service
305 d93fca6a 2005-02-11 devnull attribute set to
306 d93fca6a 2005-02-11 devnull .BR ssh ,
307 d93fca6a 2005-02-11 devnull .BR sshserve ,
308 d93fca6a 2005-02-11 devnull or
309 d93fca6a 2005-02-11 devnull .BR tls .
310 d93fca6a 2005-02-11 devnull .PP
311 d93fca6a 2005-02-11 devnull .B Wep
312 d93fca6a 2005-02-11 devnull requires a
313 d93fca6a 2005-02-11 devnull .BR key1 ,
314 d93fca6a 2005-02-11 devnull .BR key2 ,
315 d93fca6a 2005-02-11 devnull or
316 d93fca6a 2005-02-11 devnull .BR key3
317 d93fca6a 2005-02-11 devnull set to the password to be used.
318 d93fca6a 2005-02-11 devnull Starting the protocol causes
319 d93fca6a 2005-02-11 devnull .I factotum
320 d93fca6a 2005-02-11 devnull to configure the wireless ethernet card
321 d93fca6a 2005-02-11 devnull .B #l/ether0
322 d93fca6a 2005-02-11 devnull for WEP encryption with the given password.
323 d93fca6a 2005-02-11 devnull .PP
324 d93fca6a 2005-02-11 devnull All keys can have additional attibutes that act either as comments
325 d93fca6a 2005-02-11 devnull or as selectors to distinguish them in the
326 83c4506a 2005-02-11 devnull .IR auth (3)
327 d93fca6a 2005-02-11 devnull library calls.
328 d93fca6a 2005-02-11 devnull .PP
329 d93fca6a 2005-02-11 devnull The factotum owner can use any key stored by factotum.
330 d93fca6a 2005-02-11 devnull Any key may have one or more
331 d93fca6a 2005-02-11 devnull .B owner
332 d93fca6a 2005-02-11 devnull attributes listing the users who can use the key
333 d93fca6a 2005-02-11 devnull as though they were the owner.
334 d93fca6a 2005-02-11 devnull For example, the TLS and SSH host keys on a server
335 d93fca6a 2005-02-11 devnull often have an attribute
336 d93fca6a 2005-02-11 devnull .B owner=*
337 d93fca6a 2005-02-11 devnull to allow any user (and in particular,
338 d93fca6a 2005-02-11 devnull .L none )
339 d93fca6a 2005-02-11 devnull to run the TLS or SSH server-side protocol.
340 d93fca6a 2005-02-11 devnull .PP
341 d93fca6a 2005-02-11 devnull Any key may have a
342 d93fca6a 2005-02-11 devnull .B role
343 d93fca6a 2005-02-11 devnull attribute for restricting how it can be used.
344 d93fca6a 2005-02-11 devnull If this attribute is missing, the key can be used in any role.
345 d93fca6a 2005-02-11 devnull The possible values are:
346 d93fca6a 2005-02-11 devnull .TP
347 d93fca6a 2005-02-11 devnull .B client
348 d93fca6a 2005-02-11 devnull for authenticating outbound calls
349 d93fca6a 2005-02-11 devnull .TP
350 d93fca6a 2005-02-11 devnull .B server
351 d93fca6a 2005-02-11 devnull for authenticating inbound calls
352 d93fca6a 2005-02-11 devnull .TP
353 d93fca6a 2005-02-11 devnull .B speaksfor
354 d93fca6a 2005-02-11 devnull for authenticating processes whose
355 d93fca6a 2005-02-11 devnull user id does not match
356 d93fca6a 2005-02-11 devnull .IR factotum 's.
357 d93fca6a 2005-02-11 devnull .PD
358 d93fca6a 2005-02-11 devnull .PP
359 d93fca6a 2005-02-11 devnull Whenever
360 d93fca6a 2005-02-11 devnull .I factotum
361 d93fca6a 2005-02-11 devnull runs as a server, it must have a
362 d93fca6a 2005-02-11 devnull .B p9sk1
363 d93fca6a 2005-02-11 devnull key in order to communicate with the authentication
364 d93fca6a 2005-02-11 devnull server for validating passwords and challenge/responses of
365 d93fca6a 2005-02-11 devnull other users.
366 d93fca6a 2005-02-11 devnull .SS "Key Templates
367 d93fca6a 2005-02-11 devnull Key templates are used by routines that interface to
368 d93fca6a 2005-02-11 devnull .I factotum
369 d93fca6a 2005-02-11 devnull such as
370 d93fca6a 2005-02-11 devnull .B auth_proxy
371 d93fca6a 2005-02-11 devnull and
372 d93fca6a 2005-02-11 devnull .B auth_challenge
373 d93fca6a 2005-02-11 devnull (see
374 d93fca6a 2005-02-11 devnull .IR auth (3))
375 d93fca6a 2005-02-11 devnull to specify which key and protocol to use for an authentication.
376 d93fca6a 2005-02-11 devnull Like a key tuple, a key template is also a list of
377 d93fca6a 2005-02-11 devnull .IB attribute = value
378 d93fca6a 2005-02-11 devnull pairs.
379 d93fca6a 2005-02-11 devnull It must specify at least the protocol and enough
380 d93fca6a 2005-02-11 devnull other attributes to uniquely identify a key, or set of keys, to use.
381 d93fca6a 2005-02-11 devnull The keys chosen are those that match all the attributes specified
382 d93fca6a 2005-02-11 devnull in the template. The possible attribute/value formats are:
383 d93fca6a 2005-02-11 devnull .TP 1i
384 d93fca6a 2005-02-11 devnull .IB attr = val
385 d93fca6a 2005-02-11 devnull The attribute
386 d93fca6a 2005-02-11 devnull .I attr
387 d93fca6a 2005-02-11 devnull must exist in the key and its value must exactly
388 d93fca6a 2005-02-11 devnull match
389 d93fca6a 2005-02-11 devnull .I val
390 d93fca6a 2005-02-11 devnull .TP 1i
391 d93fca6a 2005-02-11 devnull .IB attr ?
392 d93fca6a 2005-02-11 devnull The attribute
393 d93fca6a 2005-02-11 devnull .I attr
394 d93fca6a 2005-02-11 devnull must exist in the key but its value doesn't matter.
395 d93fca6a 2005-02-11 devnull .TP 1i
396 d93fca6a 2005-02-11 devnull .I attr
397 d93fca6a 2005-02-11 devnull The attribute
398 d93fca6a 2005-02-11 devnull .I attr
399 d93fca6a 2005-02-11 devnull must exist in the key with a null value
400 d93fca6a 2005-02-11 devnull .PD
401 d93fca6a 2005-02-11 devnull .PP
402 d93fca6a 2005-02-11 devnull Key templates are also used by factotum to request a key either via
403 d93fca6a 2005-02-11 devnull an RPC error or via the
404 d93fca6a 2005-02-11 devnull .B needkey
405 d93fca6a 2005-02-11 devnull interface.
406 d93fca6a 2005-02-11 devnull The possible attribute/value formats are:
407 d93fca6a 2005-02-11 devnull .TP 1i
408 d93fca6a 2005-02-11 devnull .IB attr = val
409 d93fca6a 2005-02-11 devnull This pair must remain unchanged
410 d93fca6a 2005-02-11 devnull .TP 1i
411 d93fca6a 2005-02-11 devnull .IB attr ?
412 d93fca6a 2005-02-11 devnull This attribute needs a value
413 d93fca6a 2005-02-11 devnull .TP 1i
414 d93fca6a 2005-02-11 devnull .I attr
415 d93fca6a 2005-02-11 devnull The pair must remain unchanged
416 d93fca6a 2005-02-11 devnull .PD
417 d93fca6a 2005-02-11 devnull .SS "Control and Key Management
418 d93fca6a 2005-02-11 devnull .PP
419 d93fca6a 2005-02-11 devnull A number of messages can be written to the control file.
420 d93fca6a 2005-02-11 devnull The mesages are:
421 d93fca6a 2005-02-11 devnull .TP
422 d93fca6a 2005-02-11 devnull .B "key \fIattribute-value-list\fP
423 d93fca6a 2005-02-11 devnull add a new key. This will replace any old key whose
424 d93fca6a 2005-02-11 devnull public, i.e. non ! attributes, match.
425 d93fca6a 2005-02-11 devnull .TP
426 d93fca6a 2005-02-11 devnull .B "delkey \fIattribute-value-list\fP
427 d93fca6a 2005-02-11 devnull delete a key whose attributes match those given.
428 d93fca6a 2005-02-11 devnull .TP
429 d93fca6a 2005-02-11 devnull .B debug
430 d93fca6a 2005-02-11 devnull toggle debugging on and off, i.e., the debugging also
431 d93fca6a 2005-02-11 devnull turned on by the
432 d93fca6a 2005-02-11 devnull .B \-d
433 d93fca6a 2005-02-11 devnull option.
434 d93fca6a 2005-02-11 devnull .PP
435 d93fca6a 2005-02-11 devnull By default when factotum starts it looks for a
436 d93fca6a 2005-02-11 devnull .IR secstore (1)
437 d93fca6a 2005-02-11 devnull account on $auth for the user and, if one exists,
438 d93fca6a 2005-02-11 devnull prompts for a secstore password in order to fetch
439 d93fca6a 2005-02-11 devnull the file
440 d93fca6a 2005-02-11 devnull .IR factotum ,
441 d93fca6a 2005-02-11 devnull which should contain control file commands.
442 d93fca6a 2005-02-11 devnull An example would be
443 d93fca6a 2005-02-11 devnull .EX
444 d93fca6a 2005-02-11 devnull key dom=x.com proto=p9sk1 user=boyd !hex=26E522ADE2BBB2A229
445 d93fca6a 2005-02-11 devnull key proto=rsa service=ssh size=1024 ek=3B !dk=...
446 d93fca6a 2005-02-11 devnull .EE
447 d93fca6a 2005-02-11 devnull where the first line sets a password for
448 d93fca6a 2005-02-11 devnull challenge/response authentication, strong against dictionary
449 d93fca6a 2005-02-11 devnull attack by being a long random string, and the second line
450 d93fca6a 2005-02-11 devnull sets a public/private keypair for ssh authentication,
451 d93fca6a 2005-02-11 devnull generated by
452 d93fca6a 2005-02-11 devnull .B ssh_genkey
453 d93fca6a 2005-02-11 devnull (see
454 d93fca6a 2005-02-11 devnull .IR ssh (1)).
455 d93fca6a 2005-02-11 devnull .PD
456 d93fca6a 2005-02-11 devnull .SS "Confirming key use
457 d93fca6a 2005-02-11 devnull .PP
458 d93fca6a 2005-02-11 devnull The
459 d93fca6a 2005-02-11 devnull .B confirm
460 d93fca6a 2005-02-11 devnull file provides a connection from
461 d93fca6a 2005-02-11 devnull .I factotum
462 d93fca6a 2005-02-11 devnull to a confirmation server, normally the program
463 d93fca6a 2005-02-11 devnull .IR auth/fgui .
464 d93fca6a 2005-02-11 devnull Whenever a key with the
465 d93fca6a 2005-02-11 devnull .B confirm
466 d93fca6a 2005-02-11 devnull attribute is used,
467 d93fca6a 2005-02-11 devnull .I factotum
468 d93fca6a 2005-02-11 devnull requires confirmation of its use. If no process has
469 d93fca6a 2005-02-11 devnull .B confirm
470 d93fca6a 2005-02-11 devnull opened, use of the key will be denied.
471 d93fca6a 2005-02-11 devnull However, if the file is opened a request can be read from it
472 d93fca6a 2005-02-11 devnull with the following format:
473 d93fca6a 2005-02-11 devnull .PP
474 d93fca6a 2005-02-11 devnull .B confirm
475 d93fca6a 2005-02-11 devnull .BI tag= tagno
476 d93fca6a 2005-02-11 devnull .I "<key template>
477 d93fca6a 2005-02-11 devnull .PP
478 d93fca6a 2005-02-11 devnull The reply, written back to
479 d93fca6a 2005-02-11 devnull .BR confirm ,
480 d93fca6a 2005-02-11 devnull consists of string:
481 d93fca6a 2005-02-11 devnull .PP
482 d93fca6a 2005-02-11 devnull .BI tag= tagno
483 d93fca6a 2005-02-11 devnull .BI answer= xxx
484 d93fca6a 2005-02-11 devnull .PP
485 d93fca6a 2005-02-11 devnull If
486 d93fca6a 2005-02-11 devnull .I xxx
487 d93fca6a 2005-02-11 devnull is the string
488 d93fca6a 2005-02-11 devnull .B yes
489 d93fca6a 2005-02-11 devnull then the use is confirmed and the authentication will proceed.
490 d93fca6a 2005-02-11 devnull Otherwise, it fails.
491 d93fca6a 2005-02-11 devnull .PP
492 d93fca6a 2005-02-11 devnull .B Confirm
493 d93fca6a 2005-02-11 devnull is exclusive open and can only be opened by a process with
494 d93fca6a 2005-02-11 devnull the same user id as
495 d93fca6a 2005-02-11 devnull .IR factotum .
496 d93fca6a 2005-02-11 devnull .SS "Prompting for keys
497 d93fca6a 2005-02-11 devnull .PP
498 d93fca6a 2005-02-11 devnull The
499 d93fca6a 2005-02-11 devnull .B needkey
500 d93fca6a 2005-02-11 devnull file provides a connection from
501 d93fca6a 2005-02-11 devnull .I factotum
502 d93fca6a 2005-02-11 devnull to a key server, normally the program
503 d93fca6a 2005-02-11 devnull .IR auth/fgui .
504 d93fca6a 2005-02-11 devnull Whenever
505 d93fca6a 2005-02-11 devnull .I factotum
506 d93fca6a 2005-02-11 devnull needs a new key, it first checks to see if
507 d93fca6a 2005-02-11 devnull .B needkey
508 d93fca6a 2005-02-11 devnull is opened. If it isn't, it returns a error to its client.
509 d93fca6a 2005-02-11 devnull If the file is opened a request can be read from it
510 d93fca6a 2005-02-11 devnull with the following format:
511 d93fca6a 2005-02-11 devnull .PP
512 d93fca6a 2005-02-11 devnull .B needkey
513 d93fca6a 2005-02-11 devnull .BI tag= tagno
514 d93fca6a 2005-02-11 devnull .I "<key template>
515 d93fca6a 2005-02-11 devnull .PP
516 d93fca6a 2005-02-11 devnull It is up to the reader to then query the user for any missing fields,
517 d93fca6a 2005-02-11 devnull write the key tuple into the
518 d93fca6a 2005-02-11 devnull .B ctl
519 d93fca6a 2005-02-11 devnull file, and then reply by writing into the
520 d93fca6a 2005-02-11 devnull .B needkey
521 d93fca6a 2005-02-11 devnull file the string:
522 d93fca6a 2005-02-11 devnull .PP
523 d93fca6a 2005-02-11 devnull .BI tag= tagno
524 d93fca6a 2005-02-11 devnull .PP
525 d93fca6a 2005-02-11 devnull .B Needkey
526 d93fca6a 2005-02-11 devnull is exclusive open and can only be opened by a process with
527 d93fca6a 2005-02-11 devnull the same user id as
528 d93fca6a 2005-02-11 devnull .IR factotum .
529 d93fca6a 2005-02-11 devnull .SS "The RPC Protocol
530 d93fca6a 2005-02-11 devnull Authentication is performed by
531 d93fca6a 2005-02-11 devnull .IP 1)
532 d93fca6a 2005-02-11 devnull opening
533 d93fca6a 2005-02-11 devnull .BR rpc
534 d93fca6a 2005-02-11 devnull .IP 2)
535 d93fca6a 2005-02-11 devnull setting up the protocol and key to be used (see the
536 d93fca6a 2005-02-11 devnull .B start
537 d93fca6a 2005-02-11 devnull RPC below),
538 d93fca6a 2005-02-11 devnull .IP 3)
539 d93fca6a 2005-02-11 devnull shuttling messages back and forth between
540 d93fca6a 2005-02-11 devnull .IR factotum
541 d93fca6a 2005-02-11 devnull and the other party (see the
542 d93fca6a 2005-02-11 devnull .B read
543 d93fca6a 2005-02-11 devnull and
544 d93fca6a 2005-02-11 devnull .B write
545 d93fca6a 2005-02-11 devnull RPC's) until done
546 d93fca6a 2005-02-11 devnull .IP 4)
547 d93fca6a 2005-02-11 devnull if successful, reading back an
548 d93fca6a 2005-02-11 devnull .I AuthInfo
549 d93fca6a 2005-02-11 devnull structure (see
550 d93fca6a 2005-02-11 devnull .IR authsrv (3)).
551 d93fca6a 2005-02-11 devnull .PP
552 d93fca6a 2005-02-11 devnull The RPC protocol is normally embodied by one of the
553 d93fca6a 2005-02-11 devnull routines in
554 d93fca6a 2005-02-11 devnull .IR auth (3).
555 d93fca6a 2005-02-11 devnull We describe it here should anyone want to extend
556 d93fca6a 2005-02-11 devnull the library.
557 d93fca6a 2005-02-11 devnull .PP
558 d93fca6a 2005-02-11 devnull An RPC consists of writing a request message to
559 d93fca6a 2005-02-11 devnull .B rpc
560 d93fca6a 2005-02-11 devnull followed by reading a reply message back.
561 d93fca6a 2005-02-11 devnull RPC's are strictly ordered; requests and replies of
562 d93fca6a 2005-02-11 devnull different RPC's cannot be interleaved.
563 d93fca6a 2005-02-11 devnull Messages consist of a verb, a single space, and data.
564 d93fca6a 2005-02-11 devnull The data format depends on the verb. The request verbs are:
565 d93fca6a 2005-02-11 devnull .TP
566 d93fca6a 2005-02-11 devnull .B "start \fIattribute-value-list\fP
567 d93fca6a 2005-02-11 devnull start a new authentication.
568 d93fca6a 2005-02-11 devnull .I Attribute-value-pair-list
569 d93fca6a 2005-02-11 devnull must include a
570 d93fca6a 2005-02-11 devnull .B proto
571 d93fca6a 2005-02-11 devnull attribute, a
572 d93fca6a 2005-02-11 devnull .B role
573 d93fca6a 2005-02-11 devnull attribute with value
574 d93fca6a 2005-02-11 devnull .B client
575 d93fca6a 2005-02-11 devnull or
576 d93fca6a 2005-02-11 devnull .BR server ,
577 d93fca6a 2005-02-11 devnull and enough other attibutes to uniquely identify a key to use.
578 d93fca6a 2005-02-11 devnull A
579 d93fca6a 2005-02-11 devnull .B start
580 d93fca6a 2005-02-11 devnull RPC is required before any others. The possible replies are:
581 d93fca6a 2005-02-11 devnull .RS
582 d93fca6a 2005-02-11 devnull .TP
583 d93fca6a 2005-02-11 devnull .B ok
584 d93fca6a 2005-02-11 devnull start succeeded.
585 d93fca6a 2005-02-11 devnull .TP
586 d93fca6a 2005-02-11 devnull .B "error \fIstring\fP
587 d93fca6a 2005-02-11 devnull where
588 d93fca6a 2005-02-11 devnull .I string
589 d93fca6a 2005-02-11 devnull is the reason.
590 d93fca6a 2005-02-11 devnull .RE
591 d93fca6a 2005-02-11 devnull .PD
592 d93fca6a 2005-02-11 devnull .TP
593 d93fca6a 2005-02-11 devnull .B read
594 d93fca6a 2005-02-11 devnull get data from
595 d93fca6a 2005-02-11 devnull .I factotum
596 d93fca6a 2005-02-11 devnull to send to the other party. The possible replies are:
597 d93fca6a 2005-02-11 devnull .RS
598 d93fca6a 2005-02-11 devnull .TP
599 d93fca6a 2005-02-11 devnull .B ok
600 d93fca6a 2005-02-11 devnull read succeeded, this is zero length message.
601 d93fca6a 2005-02-11 devnull .TP
602 d93fca6a 2005-02-11 devnull .B "ok \fIdata\fP
603 d93fca6a 2005-02-11 devnull read succeeded, the data follows the space and is
604 d93fca6a 2005-02-11 devnull unformatted.
605 d93fca6a 2005-02-11 devnull .TP
606 d93fca6a 2005-02-11 devnull .B "done
607 d93fca6a 2005-02-11 devnull authentication has succeeded, no further RPC's are
608 d93fca6a 2005-02-11 devnull necessary
609 d93fca6a 2005-02-11 devnull .TP
610 d93fca6a 2005-02-11 devnull .B "done haveai
611 d93fca6a 2005-02-11 devnull authentication has succeeded, an
612 d93fca6a 2005-02-11 devnull .B AuthInfo
613 d93fca6a 2005-02-11 devnull structure (see
614 d93fca6a 2005-02-11 devnull .IR auth (3))
615 d93fca6a 2005-02-11 devnull can be retrieved with an
616 d93fca6a 2005-02-11 devnull .B authinfo
617 d93fca6a 2005-02-11 devnull RPC
618 d93fca6a 2005-02-11 devnull .TP
619 d93fca6a 2005-02-11 devnull .B "phase \fIstring\fP
620 d93fca6a 2005-02-11 devnull its not your turn to read, get some data from
621 d93fca6a 2005-02-11 devnull the other party and return it with a write RPC.
622 d93fca6a 2005-02-11 devnull .TP
623 d93fca6a 2005-02-11 devnull .B "error \fIstring\fP
624 d93fca6a 2005-02-11 devnull authentication failed,
625 d93fca6a 2005-02-11 devnull .I string
626 d93fca6a 2005-02-11 devnull is the reason.
627 d93fca6a 2005-02-11 devnull .TP
628 d93fca6a 2005-02-11 devnull .B "protocol not started
629 d93fca6a 2005-02-11 devnull a
630 d93fca6a 2005-02-11 devnull .B start
631 d93fca6a 2005-02-11 devnull RPC needs to precede reads and writes
632 d93fca6a 2005-02-11 devnull .TP
633 d93fca6a 2005-02-11 devnull .B "needkey \fIattribute-value-list\fP
634 d93fca6a 2005-02-11 devnull a key matching the argument is needed. This argument
635 d93fca6a 2005-02-11 devnull may be passed as an argument to
636 d93fca6a 2005-02-11 devnull .I factotum
637 d93fca6a 2005-02-11 devnull .B -g
638 d93fca6a 2005-02-11 devnull in order to prompt for a key. After that, the
639 d93fca6a 2005-02-11 devnull authentication may proceed, i.e., the read restarted.
640 d93fca6a 2005-02-11 devnull .PD
641 d93fca6a 2005-02-11 devnull .RE
642 d93fca6a 2005-02-11 devnull .TP
643 d93fca6a 2005-02-11 devnull .B "write \fIdata\fP
644 d93fca6a 2005-02-11 devnull send data from the other party to
645 d93fca6a 2005-02-11 devnull .IR factotum .
646 d93fca6a 2005-02-11 devnull The possible replies are:
647 d93fca6a 2005-02-11 devnull .RS
648 d93fca6a 2005-02-11 devnull .TP
649 d93fca6a 2005-02-11 devnull .B "ok
650 d93fca6a 2005-02-11 devnull the write succeeded
651 d93fca6a 2005-02-11 devnull .TP
652 d93fca6a 2005-02-11 devnull .B "needkey \fIattribute-value-list\fP
653 d93fca6a 2005-02-11 devnull see above
654 d93fca6a 2005-02-11 devnull .TP
655 d93fca6a 2005-02-11 devnull .B "toosmall \fIn\fP
656 d93fca6a 2005-02-11 devnull the write is too short, get more data from the
657 d93fca6a 2005-02-11 devnull other party and retry the write.
658 d93fca6a 2005-02-11 devnull .I n
659 d93fca6a 2005-02-11 devnull specifies the maximun total number of bytes.
660 d93fca6a 2005-02-11 devnull .TP
661 d93fca6a 2005-02-11 devnull .B "phase \fIstring\fP
662 d93fca6a 2005-02-11 devnull its not your turn to write, get some data from
663 d93fca6a 2005-02-11 devnull .I factotum
664 d93fca6a 2005-02-11 devnull first.
665 d93fca6a 2005-02-11 devnull .TP
666 d93fca6a 2005-02-11 devnull .B "done
667 d93fca6a 2005-02-11 devnull see above
668 d93fca6a 2005-02-11 devnull .TP
669 d93fca6a 2005-02-11 devnull .B "done haveai
670 d93fca6a 2005-02-11 devnull see above
671 d93fca6a 2005-02-11 devnull .RE
672 d93fca6a 2005-02-11 devnull .TP
673 d93fca6a 2005-02-11 devnull .B authinfo
674 d93fca6a 2005-02-11 devnull retrieve the AuthInfo structure.
675 d93fca6a 2005-02-11 devnull The possible replies are:
676 d93fca6a 2005-02-11 devnull .RS
677 d93fca6a 2005-02-11 devnull .TP
678 d93fca6a 2005-02-11 devnull .B "ok \fIdata\fP
679 d93fca6a 2005-02-11 devnull .I data
680 d93fca6a 2005-02-11 devnull is a marshaled form of the AuthInfo structure.
681 d93fca6a 2005-02-11 devnull .TP
682 d93fca6a 2005-02-11 devnull .B "error \fIstring\fP
683 d93fca6a 2005-02-11 devnull where
684 d93fca6a 2005-02-11 devnull .I string
685 d93fca6a 2005-02-11 devnull is the reason for the error.
686 d93fca6a 2005-02-11 devnull .PD
687 d93fca6a 2005-02-11 devnull .RE
688 d93fca6a 2005-02-11 devnull .TP
689 d93fca6a 2005-02-11 devnull .B attr
690 d93fca6a 2005-02-11 devnull retrieve the attributes used in the
691 d93fca6a 2005-02-11 devnull .B start
692 d93fca6a 2005-02-11 devnull RPC.
693 d93fca6a 2005-02-11 devnull The possible replies are:
694 d93fca6a 2005-02-11 devnull .RS
695 d93fca6a 2005-02-11 devnull .TP
696 d93fca6a 2005-02-11 devnull .B "ok \fIattribute-value-list\fP
697 d93fca6a 2005-02-11 devnull .TP
698 d93fca6a 2005-02-11 devnull .B "error \fIstring\fP
699 d93fca6a 2005-02-11 devnull where
700 d93fca6a 2005-02-11 devnull .I string
701 d93fca6a 2005-02-11 devnull is the reason for the error.
702 d93fca6a 2005-02-11 devnull .PD
703 d93fca6a 2005-02-11 devnull .RE
704 d93fca6a 2005-02-11 devnull .SH SOURCE
705 d93fca6a 2005-02-11 devnull .B \*9/src/cmd/factotum