container create: add inspect data to event

When the new `events_container_create_inspect_data` option is enabled in
containers.conf set the `ContainersInspectData` event field for each
container-create event.

The data was requested for the purpose of auditing (e.g., intrusion
detection).

Jira: https://issues.redhat.com/browse/RUN-1702
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-11-18 15:42:05 +01:00
parent c49de2210c
commit 71f92d263c
10 changed files with 99 additions and 8 deletions

View File

@ -273,6 +273,11 @@ type EngineConfig struct {
// EventsLogger determines where events should be logged.
EventsLogger string `toml:"events_logger,omitempty"`
// EventsContainerCreateInspectData creates a more verbose
// container-create event which includes a JSON payload with detailed
// information about the container.
EventsContainerCreateInspectData bool `toml:"events_container_create_inspect_data,omitempty"`
// graphRoot internal stores the location of the graphroot
graphRoot string

View File

@ -410,6 +410,10 @@ default_sysctls = [
#
#events_logger = "journald"
# Creates a more verbose container-create event which includes a JSON payload
# with detailed information about the container.
#events_container_create_inspect_data = false
# A is a list of directories which are used to search for helper binaries.
#
#helper_binaries_dir = [