]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - contrib/openbsm/man/audit_control.5
- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
[FreeBSD/releng/10.3.git] / contrib / openbsm / man / audit_control.5
1 .\" Copyright (c) 2004-2009 Apple Inc.
2 .\" Copyright (c) 2006 Robert N. M. Watson
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1.  Redistributions of source code must retain the above copyright
9 .\"     notice, this list of conditions and the following disclaimer.
10 .\" 2.  Redistributions in binary form must reproduce the above copyright
11 .\"     notice, this list of conditions and the following disclaimer in the
12 .\"     documentation and/or other materials provided with the distribution.
13 .\" 3.  Neither the name of Apple Inc. ("Apple") nor the names of
14 .\"     its contributors may be used to endorse or promote products derived
15 .\"     from this software without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
21 .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 .\" POSSIBILITY OF SUCH DAMAGE.
28 .\"
29 .Dd May 14, 2009
30 .Dt AUDIT_CONTROL 5
31 .Os
32 .Sh NAME
33 .Nm audit_control
34 .Nd "audit system parameters"
35 .Sh DESCRIPTION
36 The
37 .Nm
38 file contains several audit system parameters.
39 Each line of this file is of the form:
40 .Pp
41 .D1 Ar parameter Ns : Ns Ar value
42 .Pp
43 The parameters are:
44 .Bl -tag -width indent
45 .It Va dir
46 The directory where audit log files are stored.
47 There may be more than one of these entries.
48 Changes to this entry can only be enacted by restarting the
49 audit system.
50 See
51 .Xr audit 8
52 for a description of how to restart the audit system.
53 .It Va dist
54 When set to
55 .Va on
56 or
57 .Va yes ,
58 .Xr auditd 8
59 will be creating hardlinks to all trail files in
60 .Pa /var/audit/dist
61 directory.
62 Those hardlinks will be consumed by the
63 .Xr auditdistd 8
64 daemon.
65 .It Va flags
66 Specifies which audit event classes are audited for all users.
67 .Xr audit_user 5
68 describes how to audit events for individual users.
69 See the information below for the format of the audit flags.
70 .It Va host
71 Specify the hostname or IP address to be used when setting the local
72 systems's audit host information.
73 This hostname will be converted into an IP or IPv6 address and will
74 be included in the header of each audit record.
75 Due to the possibility of transient errors coupled with the
76 security issues in the DNS protocol itself, the use of DNS
77 should be avoided.
78 Instead, it is strongly recommended that the hostname be
79 specified in the /etc/hosts file.
80 For more information see
81 .Xr hosts 5 .
82 .It Va naflags
83 Contains the audit flags that define what classes of events are audited when
84 an action cannot be attributed to a specific user.
85 .It Va minfree
86 The minimum free space required on the file system audit logs are being written to.
87 When the free space falls below this limit a warning will be issued.
88 If no value for the minimum free space is set, the default of 20 percent is
89 applied by the kernel.
90 .It Va policy
91 A list of global audit policy flags specifying various behaviors, such as
92 fail stop, auditing of paths and arguments, etc.
93 .It Va filesz
94 Maximum trail size in bytes; if set to a non-0 value, the audit daemon will
95 rotate the audit trail file at around this size.
96 Sizes less than the minimum trail size (default of 512K) will be rejected as
97 invalid.
98 If 0, trail files will not be automatically rotated based on file size.
99 For convenience, the trail size may be expressed with suffix letters:
100 B (Bytes), K (Kilobytes), M (Megabytes), or G (Gigabytes).
101 For example, 2M is the same as 2097152.
102 .It Va expire-after
103 Specifies when audit log files will expire and be removed.
104 This may be after a time period has passed since the file was last
105 written to or when the aggregate of all the trail files have reached a
106 specified size or a combination of both.
107 If no expire-after parameter is given then audit log files will not
108 expire and be removed by the audit control system.
109 See the information below for the format of the expiration
110 specification.
111 .El
112 .Sh AUDIT FLAGS
113 Audit flags are a comma-delimited list of audit classes as defined in the
114 .Xr audit_class 5
115 file.
116 Event classes may be preceded by a prefix which changes their interpretation.
117 The following prefixes may be used for each class:
118 .Pp
119 .Bl -tag -width indent -compact -offset indent
120 .It (none)
121 Record both successful and failed events.
122 .It Li +
123 Record successful events.
124 .It Li -
125 Record failed events.
126 .It Li ^
127 Record neither successful nor failed events.
128 .It Li ^+
129 Do not record successful events.
130 .It Li ^-
131 Do not record failed events.
132 .El
133 .Sh AUDIT POLICY FLAGS
134 The policy flags field is a comma-delimited list of policy flags from the
135 following list:
136 .Pp
137 .Bl -tag -width ".Cm zonename" -compact -offset indent
138 .It Cm cnt
139 Allow processes to continue running even though events are not being audited.
140 If not set, processes will be suspended when the audit store space is
141 exhausted.
142 Currently, this is not a recoverable state.
143 .It Cm ahlt
144 Fail stop the system if unable to audit an event\[em]this consists of first
145 draining pending records to disk, and then halting the operating system.
146 .It Cm argv
147 Audit command line arguments to
148 .Xr execve 2 .
149 .It Cm arge
150 Audit environmental variable arguments to
151 .Xr execve 2 .
152 .It Cm seq
153 Include a unique audit sequence number token in generated audit records (not
154 implemented on
155 .Fx
156 or Darwin).
157 .It Cm group
158 Include supplementary groups list in generated audit records (not implemented
159 on
160 .Fx
161 or Darwin; supplementary groups are never included in records on
162 these systems).
163 .It Cm trail
164 Append a trailer token to each audit record (not implemented on
165 .Fx
166 or
167 Darwin; trailers are always included in records on these systems).
168 .It Cm path
169 Include secondary file paths in audit records (not implemented on
170 .Fx
171 or
172 Darwin; secondary paths are never included in records on these systems).
173 .It Cm zonename
174 Include a zone ID token with each audit record (not implemented on
175 .Fx
176 or
177 Darwin;
178 .Fx
179 audit records do not currently include the jail ID or name).
180 .It Cm perzone
181 Enable auditing for each local zone (not implemented on
182 .Fx
183 or Darwin; on
184 .Fx ,
185 audit records are collected from all jails and placed in a single
186 global trail, and only limited audit controls are permitted within a jail).
187 .El
188 .Pp
189 It is recommended that installations set the
190 .Cm cnt
191 flag but not
192 .Cm ahlt
193 flag unless it is intended that audit logs exceeding available disk space
194 halt the system.
195 .Sh AUDIT LOG EXPIRATION SPECIFICATION
196 The expiration specification can be one value or two values with the
197 logical conjunction of AND/OR between them.
198 Values for the audit log file age are numbers with the following
199 suffixes:
200 .Pp
201 .Bl -tag -width "(space) or" -compact -offset indent
202 .It Li s
203 Log file age in seconds.
204 .It Li h
205 Log file age in hours.
206 .It Li d
207 Log file age in days.
208 .It Li y
209 Log file age in years.
210 .El
211 .Pp
212 Values for the disk space used are numbers with the following suffixes:
213 .Pp
214 .Bl -tag -width "(space) or" -compact -offset indent
215 .It (space) or
216 .It Li B
217 Disk space used in Bytes.
218 .It Li K
219 Disk space used in Kilobytes.
220 .It Li M
221 Disk space used in Megabytes.
222 .It Li G
223 Disk space used in Gigabytes.
224 .El
225 .Pp
226 The suffixes on the values are case sensitive.
227 If both an age and disk space value are used they are separated by
228 AND or OR and both values are used to determine when audit
229 log files expire.
230 In the case of AND, both the age and disk space conditions must be met
231 before the log file is removed.
232 In the case of OR, either condition may expire the log file.
233 For example:
234 .Bd -literal -offset indent
235 expire-after: 60d AND 1G
236 .Ed
237 .Pp
238 will expire files that are older than 60 days but only if 1
239 gigabyte of disk space total is being used by the audit logs.
240 .Sh DEFAULT
241 The following settings appear in the default
242 .Nm
243 file:
244 .Bd -literal -offset indent
245 dir:/var/audit
246 flags:lo,aa
247 minfree:5
248 naflags:lo,aa
249 policy:cnt,argv
250 filesz:2M
251 expire-after:10M
252 .Ed
253 .Pp
254 The
255 .Va flags
256 parameter above specifies the system-wide mask corresponding to login/logout
257 as well as authentication and authorization events.
258 The
259 .Va policy
260 parameter specifies that the system should neither fail stop nor suspend
261 processes when the audit store fills and that command line arguments should
262 be audited for
263 .Dv AUE_EXECVE
264 events.
265 The trail file will be automatically rotated by the audit daemon when the
266 file size reaches approximately 2MB.
267 Trail files will expire when their aggregate size exceeds 10MB.
268 .Sh FILES
269 .Bl -tag -width ".Pa /etc/security/audit_control" -compact
270 .It Pa /etc/security/audit_control
271 .El
272 .Sh SEE ALSO
273 .Xr auditon 2 ,
274 .Xr audit 4 ,
275 .Xr audit_class 5 ,
276 .Xr audit_event 5 ,
277 .Xr audit_user 5 ,
278 .Xr audit 8 ,
279 .Xr auditd 8
280 .Sh HISTORY
281 The OpenBSM implementation was created by McAfee Research, the security
282 division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004.
283 It was subsequently adopted by the TrustedBSD Project as the foundation for
284 the OpenBSM distribution.
285 .Sh AUTHORS
286 .An -nosplit
287 This software was created by McAfee Research, the security research division
288 of McAfee, Inc., under contract to Apple Computer Inc.
289 Additional authors include
290 .An Wayne Salamon ,
291 .An Robert Watson ,
292 and SPARTA Inc.
293 .Pp
294 The Basic Security Module (BSM) interface to audit records and audit event
295 stream format were defined by Sun Microsystems.