generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auditd to Node image for photon OS
- Add auditd service - Enable on boot - Recreate log dir once sysprep cleans log dirs - Add containerd audit rules - Make sure all auditd customizations happen for photon OS only SYSPREP ROLE - Include Photon OS tasks at end. - Move machine mode fact out of OS specific sysprep role to set at begining of role execution.
- Loading branch information
1 parent
00377e8
commit 3f8beda
Showing
10 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ common_debs: | |
- socat | ||
|
||
common_photon_rpms: | ||
- audit | ||
- conntrack-tools | ||
- distrib-compat | ||
- ebtables | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2019 The Kubernetes Authors. | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# 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. | ||
|
||
--- | ||
# Enable causes auditd to correctly | ||
# create auto-start symlink. | ||
# Auditd is diabled by default in Photon OS: https://github.com/vmware/photon/blob/366cf888f3b3c7e54f883c2e3223f5a752fe0e60/SPECS/audit/audit.spec#L104 | ||
- name: Ensure auditd is running and comes on at reboot | ||
service: | ||
name: auditd | ||
state: started | ||
enabled: yes | ||
|
||
- name: configure auditd rules for containerd | ||
template: | ||
src: photon-os/etc/audit/rules.d/containerd.rules | ||
dest: /etc/audit/rules.d/containerd.rules |
10 changes: 10 additions & 0 deletions
10
images/capi/ansible/roles/node/templates/photon-os/etc/audit/rules.d/containerd.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-w /var/lib/containerd/ -p rwxa -k containerd | ||
-w /etc/containerd/ -p rwxa -k containerd | ||
-w /etc/systemd/system/containerd.service -p rwxa -k containerd | ||
-w /etc/systemd/system/containerd.service.d/ -p rwxa -k containerd | ||
-w /run/containerd/ -p rwxa -k containerd | ||
-w /usr/local/bin/containerd-shim -p rwxa -k containerd | ||
-w /usr/local/bin/containerd-shim-runc-v1 -p rwxa -k containerd | ||
-w /usr/local/bin/containerd-shim-runc-v2 -p rwxa -k containerd | ||
-w /usr/local/sbin/runc -p rwxa -k containerd | ||
-w /usr/local/bin/containerd -p rwxa -k containerd |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters