Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support to forward auditd to syslog #49

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The OS package provides the client side tools for working with the linux kernel

- node['auditd']['ruleset'] - ruleset to use, either "default" (the default if unset) or one of the provided examples
- node['auditd']['backlog'] - backlog size, default is 320 should be larger for busy systems
- node['auditd']['syslog'] - true, false - enable or disable forwarding messages to syslog

# Usage

Expand Down Expand Up @@ -67,4 +68,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@

default['auditd']['ruleset'] = 'default.rules'
default['auditd']['backlog'] = 320
default['auditd']['syslog'] = false
11 changes: 11 additions & 0 deletions recipes/conf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@
when 'cis'
auditd_conf_file 'cis.auditd'
end

template '/etc/audisp/plugins.d/syslog.conf' do
source 'audisp_syslog.conf.erb'
owner 'root'
group 'root'
mode '0640'
variables(
active: node['auditd']['syslog']
)
notifies :reload, 'service[auditd]', :delayed
end
ressl marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 6 additions & 0 deletions templates/audisp_syslog.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
active = <%= @active ? 'yes' : 'no' %>
ressl marked this conversation as resolved.
Show resolved Hide resolved
direction = out
path = builtin_syslog
type = builtin
args = LOG_INFO
format = string