blob: 6e81855548abf8515fa42a73171e354a640edc26 [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:
Ivan Suzdal1c3ec8d2018-07-30 10:11:54 +040074 1:
75 key: some_rule_key
Ivan Suzdal50a360f2018-06-04 16:07:41 +040076 enabled: true
77 rule_list:
78 - '-w /etc/passwd -p wa'
79 - '-a always,exit -F arch=b64 -S mount'
80
Oleksii Chupryn509fe272018-06-12 13:39:26 +030081Auditd service with syslog plugin configuration
82
83.. code-block:: yaml
84
85 auditd:
86 service:
87 enabled: true
88 log_format: NOLOG
89 ...
90 audisp:
91 enabled: true
92 plugins:
93 syslog:
94 active: 'yes'
95 direction: out
96 path: builtin_syslog
97 type: builtin
98 args: 'LOG_INFO LOG_LOCAL6'
99 format: string
Ivan Suzdal50a360f2018-06-04 16:07:41 +0400100
101References
102=========
103https://github.com/linux-audit/audit-documentation/wiki
104https://linux-audit.com
105https://github.com/linux-audit/audit-userspace
106
107Documentation and Bugs
108======================
109
110To learn how to install and update salt-formulas, consult the documentation
111available online at:
112
113 http://salt-formulas.readthedocs.io/
114
115In the unfortunate event that bugs are discovered, they should be reported to
116the appropriate issue tracker. Use GitHub issue tracker for specific salt
117formula:
118
119 https://github.com/salt-formulas/salt-formula-auditd/issues
120
121For feature requests, bug reports or blueprints affecting entire ecosystem,
122use Launchpad salt-formulas project:
123
124 https://launchpad.net/salt-formulas
125
126Developers wishing to work on the salt-formulas projects should always base
127their work on master branch and submit pull request against specific formula.
128
129You should also subscribe to mailing list (salt-formulas@freelists.org):
130
131 https://www.freelists.org/list/salt-formulas
132
133Any questions or feedback is always welcome so feel free to join our IRC
134channel:
135
136 #salt-formulas @ irc.freenode.net