1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man5 / audit_remote.5
blob9d298a02f8fd2e2018a77db8e36f8a94046c999d
1 '\" te
2 .\"  Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH AUDIT_REMOTE 5 "Sep 8, 2009"
7 .SH NAME
8 audit_remote \- send Solaris audit logs to a remote server
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/lib/security/audit_remote.so\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBaudit_remote\fR plugin module for Solaris audit,
19 \fB/usr/lib/security/audit_remote.so\fR, sends binary audit records
20 (\fBaudit.log\fR(4)) to audit servers specified in \fBaudit_control\fR(4).
21 .sp
22 .LP
23 The \fBaudit_remote\fR plugin is loaded by \fBauditd\fR(1M) if
24 \fBaudit_control\fR contains a \fBplugin:\fR specification of
25 \fBname=audit_remote.so\fR.
26 .SS "Object Attributes"
27 .sp
28 .LP
29 The following attributes specify the configuration of \fBaudit_remote\fR
30 plugin:
31 .sp
32 .ne 2
33 .na
34 \fB\fBp_hosts\fR\fR
35 .ad
36 .sp .6
37 .RS 4n
38 .sp
39 .in +2
40 .nf
41 \fIhost1\fR[:[\fIport1\fR][:\fImech1\fR]][,\fIhost2\fR[:[\fIport2\fR][:\fImech2\fR]],... \e
42     \fIhostn\fR[:[\fIportn\fR][:\fImechn\fR]]]
43 .fi
44 .in -2
45 .sp
47 A list of audit hosts/servers. Audit records are sent to the first available
48 host. If a host is unreachable or a timeout occurs while sending data, the next
49 host in the list is tried. If connection to all hosts fails, the list is tried
50 again from the beginning.
51 .sp
52 The \fIhost\fR part of a \fBp_hosts\fR entry can be in any form acceptable to
53 \fBgetipnodebyname\fR(3SOCKET).
54 .sp
55 The \fIport\fR part of a \fBp_hosts\fR entry is the port on host that is
56 contacted to initiate an audit server connection. If not specified, the port
57 number is that assigned to the \fBsolaris-audit\fR service. See
58 \fBgetservbyname\fR(3XNET).
59 .sp
60 The \fBmech\fR part of a \fBp_host\fR entry is the GSS-API mechanism name
61 (\fBmech\fR(4)). If not specified, the local host's default mechanism is used.
62 The recommended mechanism is \fBkerberos_v5\fR.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBp_retries\fR\fR
69 .ad
70 .sp .6
71 .RS 4n
72 The number of retries for connecting to and sending data to a server.
73 .sp
74 The default value is \fB3\fR.
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fBp_timeout\fR\fR
81 .ad
82 .sp .6
83 .RS 4n
84 The number of seconds in which a connection/sending data timeouts.
85 .sp
86 The default value is \fB5\fR seconds.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB\fBqsize\fR\fR
93 .ad
94 .sp .6
95 .RS 4n
96 The maximum number of outstanding audit records to keep.
97 .sp
98 The default is the value of the kernel queue control high water mark. See
99 \fBauditconfig\fR(1M).
102 .SS "GSS SESSION"
105 The \fBaudit_remote plugin\fR is a TCP client that authenticates configured
106 audit servers using the GSS-API (\fBlibgss\fR(3LIB)). Binary Solaris Audit
107 records are sent with integrity and confidentiality protection as per-message
108 tokens generated by \fBgss_wrap\fR(3GSS).
111 The plugin initiates a TCP connection to an audit server (\fIhost:port:mech\fR)
112 and establishes a GSS security context (with \fBgss_init_sec_context\fR(3GSS)),
113 with appropriate security mechanism (\fBmech\fR(4)).
116 If no port is specified, the service name \fBsolaris-audit\fR is looked up to
117 obtain a TCP port number. If no mechanism is specified, the \fBGSS_C_NO_OID\fR
118 is used as a \fBmech_type\fR parameter of \fBgss_init_sec_context\fR(3GSS), and
119 causes the underlying \fBGSS-API\fR to use the local default mechanism.
122 \fBgss_init_sec_context\fR(3GSS) uses \fBGSS_C_NO_CREDENTIAL\fR as the
123 initiator credential handle and a target name of the form
124 \fBaudit@<ost_fqdn>\fR. The server is expected to use
125 \fBgss_accept_sec_context\fR(3GSS) to complete the context establishment.
128 Once the security context is established, the client (\fBaudit_remote\fR
129 plugin) calls \fBgss_wrap\fR(3GSS) to achieve the confidentiality of the
130 transferred payload - the audit records. The server is expected to use
131 \fBgss_unwrap\fR(3GSS) to unwrap the received data and \fBgss_get_mic\fR(3GSS)
132 to obtain the MIC (Message Integrity Code) to be later sent back to the plugin
133 as a message retrieval acknowledgment.
136 For example, if the \fBkerberos_v5\fR mechanism is configured as \fBGSS_API\fR
137 mechanism on the client and both sides agree on using this mechanism, the
138 client side has to be eligible to non-interactively gain session keys for the
139 \fBaudit/<host_fqdn>@<REALM>\fR principal from the Kerberos  KDC/TGS. At the
140 same time the identity running the audit server application has to have the
141 long term keys associated with the \fBaudit/<host_fqdn>@<REALM>\fR principal
142 stored in the \fBkeytab\fR file (\fBkrb5.conf\fR(4)) to be able to decrypt the
143 session keys.
146 The \fBaudit_remote\fR plugin initiates a connection to first server in the
147 \fBp_hosts\fR list. If the connection fails or audit record sends are not
148 responded to in \fBp_timeout\fR seconds, after \fBp_retries\fR attempts the
149 plugin tries to connect to the next server. If the connection to the last
150 server fails, the plugin retries to connect to the first host in the list.
151 \fBaudit_warn\fR(1M) is executed at every unsuccessful attempt to connect to
152 the server or send timeout with the plugin option plugin \fBaudit_remote.so
153 retry <count> <error>.<error>\fR is connection \fB<host:port> <the network
154 error>\fR\&. An \fBEPROTO\fR network error indicates that the client plugin did
155 not get a successful protocol version handshake.
156 .SS "PROTOCOL DESCRIPTION"
159 All protocol messages are preceded by the 4 octets of the size of the data to
160 follow. This size is in network byte order.
163 The protocol begins with version negotiation followed by a \fBGSS-API\fR
164 security context token exchange. On error the connection is closed (and any
165 output token optionally sent).
168 The version negotiation takes place in the clear with the plugin sending an
169 octet array of the comma (\fB,\fR) separated list of versions supported. The
170 current version number is the characters \fB01\fR. The receiver is expected to
171 respond with the version that they accept (in the current case that is the
172 characters \fB01\fR). A mismatch is considered an error and the connection is
173 closed.
176 The version octet array sent by the plugin and the version characters accepted
177 by the receiver are concatenated together to make up the application data field
178 of the channel bindings of the GSS security context establishment.
180 .in +2
182 <plugin version characters> || <server accepted version characters>"
183 ||" represents concatenation
185 .in -2
189 Subsequent tokens contain a 64 bit sequence number in network byte order and a
190 single audit record (\fBaudit.log\fR(4)); the client uses confidentiality
191 protection. wrap (64 bit sequence number || audit record)
194 The server acknowledges the receipt (and is then responsible for any data loss)
195 with the received 64 bit sequence number and a MIC token of the unwrapped 64
196 bit sequence number and audit record. MIC verification on the client side
197 acknowledges the audit record can be freed and not saved for possible
198 retransmission.
200 .in +2
202 64 bit sequence number || mic (64 bit sequence number || audit record)
204 .in -2
208 Secure remote audit client/server communication flow:
210 .in +2
212 1) Client <--> Server - TCP handshake
214 2) Client <--> Server - protocol version negotiation:
215    a) Client  --> Server - send data size - uint32_t value (2)
216    b) Client  --> Server - send clear text message of the versions
217                            supported comma separated, e.g.,
218                            "01,02,03" for versions 1 and 2 and 3.
219                            The only version supported at present is
220                            "01"
221    c) Client <--  Server - send data size - uint32_t value (2)
222    d) Client <--  Server - send clear text version selected
223                            ("01")
224    :no version match; close connection; try next host
226 3) Security context initiation:
227    a) Client - Construct channel bindings application data value
228                (4 octets "0101")
229    b) Client  --> Server - send token (data) size - uint32_t value
230    c) Client  --> Server - GSS-API per-context token
231    d) Client <--  Server - send token (data) size
232    e) Client <--  Server - GSS-API per-context token
233       :repeat a-e until security context is initialized; if unsuccessful,
234       close connection; try next host
236 4) Client - transmit thread, when audit record to be sent:
237    a) Client  --> Server - send data size
238    b) Client  --> Server - GSS-API per-message token
239                   wrap (sequence number || audit record)
240       :repeat a-b while less than max (qsize) outstanding records
242  5) Client - receive thread:
243     a) Client <--  Server - receive data size - uint32_t value
244     b) Client <--  Server - receive sequence number - uint64_t value
245     c) Client <--  Server - receive MIC
246     d) Client             - MIC verification - OK
247     e) Client             - remove particular audit record
248                             pointed by the sequence number from the
249                             retransmit buffer
250   :repeat a-e, on error close connection; try next host;
251    retransmit unacknowledged audit records
253 6) Server - receive thread:
254     a) Client  --> Server - receive data size
255     b) Client  --> Server - GSS-API receive, uwrap, store
256                    per-message token
258 7) Server - transmit thread:
259     a) Server - MIC generation - message integrity code
260                     mic (sequence number || audit record)
261     b) Client <--  Server - send data size
262     c) Client < -- Server - send sequence number
263     d) Client <--  Server - send MIC
265 .in -2
267 .SH EXAMPLES
269 \fBExample 1 \fRLoading \fBaudit_remote.so\fR and Specifying the Remote Audit
270 Servers
273 The following directives cause \fBaudit_remote.so\fR to be loaded and specify
274 the remote audit servers to where the audit records are sent. The
275 \fBkerberos_v5\fR security mechanism is defined to be used when communicating
276 with the servers.
279 .in +2
281 plugin: name=audit_remote.so;\e
282 p_timeout=90;p_retries=2;\e
283 p_hosts=eggplant.eng.sun.com::kerberos_v5,\e
284 purple.ebay.sun.com:4592:kerberos_v5
286 .in -2
289 \fBExample 2 \fRUsing the Configuration of Usage Default Security Mechanism
292 The following example shows the configuration of usage of default security
293 mechanism. It also shows use of default port on one of the configured servers:
296 .in +2
298 plugin: name=audit_remote.so;\e
299 p_timeout=10;p_retries=2;\e
300 p_hosts=jedger.eng.sun.com,\e
301 jbadams.ebay.sun.com:4592
303 .in -2
306 .SH ATTRIBUTES
309 See \fBattributes\fR(5) for a description of the following attributes:
314 box;
315 c | c
316 l | l .
317 ATTRIBUTE TYPE  ATTRIBUTE VALUE
319 MT Level        MT-Safe
321 Interface Stability     See below.
326 The plugin configuration parameters are Committed. The client/server protocol
327 (version \fB"01"\fR) is Contracted Project Private. See \fBaudit.log\fR(4) for
328 the audit record format and content stability.
329 .SH SEE ALSO
332 \fBauditd\fR(1M), \fBauditconfig\fR(1M), \fBaudit_warn\fR(1M),
333 \fBgetipnodebyname\fR(3SOCKET), \fBgetservbyname\fR(3XNET),
334 \fBgss_accept_sec_context\fR(3GSS), \fBgss_get_mic\fR(3GSS),
335 \fBgss_init_sec_context\fR(3GSS), \fBgss_wrap\fR(3GSS), \fBgss_unwrap\fR(3GSS),
336 \fBlibgss\fR(3LIB), \fBlibsocket\fR(3LIB), \fBaudit_control\fR(4),
337 \fBaudit.log\fR(4), \fBkrb5.conf\fR(4), \fBmech\fR(4), \fBattributes\fR(5),
338 \fBkerberos\fR(5), \fBtcp\fR(7P)
339 .SH NOTES
342 \fBaudit_remote\fR authenticates itself to the remote audit service by way of
343 GSS-API (\fBlibgss\fR(3LIB)). Default gss credentials are used as provided by
344 the \fBgss\fR implementation mechanism, such as Kerberos.
347 The \fBsolaris-audit\fR service port assigned by IANA is \fB16162\fR.