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