blob: b9df62fcb8b70d5eb720f6c8b2b839364c9893b1 [file] [log] [blame]
Ivan Suzdal50a360f2018-06-04 16:07:41 +04001
2==================================
3Auditd Formula
4==================================
5
6The Linux Audit system provides a way to track security-relevant information on
7your system. Based on pre-configured rules, Audit generates log entries to
8record as much information about the events that are happening on your system
9as possible. This information is crucial for mission-critical environments to
10determine the violator of the security policy and the actions they performed.
11Audit does not provide additional security to your system; rather, it can be
12used to discover violations of security policies used on your system.
13These violations can further be prevented by additional security
14measures such as SELinux.
15
Ivan Suzdal91e02452018-06-20 12:33:16 +040016Please, be aware of one *feature*.
17If you enable auditd.rules.rules.privileged it will dynamically generate a list
18of binaries which have suid/sgid bit for all mounted file systems which do not
19have **nosuid** or **noexec** mount option (except the *special* file systems
20such as **sysfs**, **nsfs**, **cgroup**, **proc** and so one).
Ivan Suzdal9f9fbf42018-07-11 18:27:25 +040021The list of such *special* file systems can be configured
22with auditd:rules:filter_fs pillar.
23
Ivan Suzdal91e02452018-06-20 12:33:16 +040024It was done because it is nearly impossible to create that list manually. It
25always will differ from one installation to another.
26This behavior can not be changed but it can be extended manually by putting
Ivan Suzdal9f9fbf42018-07-11 18:27:25 +040027necessary rules into the **rule_list** list.
28
29Also it is possible to add paths which will be filtered in search. It implements
30the idea of *white lists* but on a directory level, not for a particular file.
31It can be configured with auditd:rules:filter_paths pillar.
Ivan Suzdal50a360f2018-06-04 16:07:41 +040032
33
34Sample Metadata
35===============
36
37Single auditd service
38
39.. code-block:: yaml
40 auditd:
41 service:
42 enabled: true
43 log_file: /var/log/audit/audit.log
44 log_format: NOLOG
45 log_group: root
46 priority_boost: 4
47 flush: INCREMENTAL
48 freq: 20
49 num_logs: 5
50 disp_qos: lossy
51 dispatcher: /sbin/audispd
52 name_format: HOSTNAME
53 max_log_file: 6
54 max_log_file_action: ROTATE
55 space_left: 75
56 space_left_action: SYSLOG
57 action_mail_acct: root
58 admin_space_left: 50
59 admin_space_left_action: SUSPEND
60 disk_full_action: SUSPEND
61 disk_error_action: SUSPEND
62 tcp_listen_queue: 5
63 tcp_max_per_addr: 1
64 tcp_client_max_idle: 0
65 enable_krb5: 'no'
66 krb5_principal: auditd
67 audisp:
68 enabled: true
69 rules:
70 options:
71 enabled: 0
72 bufsize: 8192
73 rules:
74 some_rule_key:
75 enabled: true
76 rule_list:
77 - '-w /etc/passwd -p wa'
78 - '-a always,exit -F arch=b64 -S mount'
79
Oleksii Chupryn509fe272018-06-12 13:39:26 +030080Auditd service with syslog plugin configuration
81
82.. code-block:: yaml
83
84 auditd:
85 service:
86 enabled: true
87 log_format: NOLOG
88 ...
89 audisp:
90 enabled: true
91 plugins:
92 syslog:
93 active: 'yes'
94 direction: out
95 path: builtin_syslog
96 type: builtin
97 args: 'LOG_INFO LOG_LOCAL6'
98 format: string
Ivan Suzdal50a360f2018-06-04 16:07:41 +040099
100References
101=========
102https://github.com/linux-audit/audit-documentation/wiki
103https://linux-audit.com
104https://github.com/linux-audit/audit-userspace
105
106Documentation and Bugs
107======================
108
109To learn how to install and update salt-formulas, consult the documentation
110available online at:
111
112 http://salt-formulas.readthedocs.io/
113
114In the unfortunate event that bugs are discovered, they should be reported to
115the appropriate issue tracker. Use GitHub issue tracker for specific salt
116formula:
117
118 https://github.com/salt-formulas/salt-formula-auditd/issues
119
120For feature requests, bug reports or blueprints affecting entire ecosystem,
121use Launchpad salt-formulas project:
122
123 https://launchpad.net/salt-formulas
124
125Developers wishing to work on the salt-formulas projects should always base
126their work on master branch and submit pull request against specific formula.
127
128You should also subscribe to mailing list (salt-formulas@freelists.org):
129
130 https://www.freelists.org/list/salt-formulas
131
132Any questions or feedback is always welcome so feel free to join our IRC
133channel:
134
135 #salt-formulas @ irc.freenode.net