freeipa/init
Alexander Bokovoy 84eed2a67f frontend: add systemd journal audit of executed API commands
For each executed command in server context, send the information about
the command to the systemd journal. The resulting string is similar to
what is recored in httpd's error_log for API requests coming through the
RPC layer.

In server mode operations are performed directly on the server over
LDAPI unix domain socket, so httpd end-point is not used and therefore
operations aren't recorded in the error_log.

With this change any IPA API operation is sent as an audit event to the
journal, alog with additional information collected by the journald
itself.

To aid with identification of these messages, an application name is
replaced with IPA.API and the actual name from api.env.script is made a
part of the logged message. The actual application script name is
available as part of the journal metadata anyway.

If no Kerberos authentication was used but rather LDAPI autobind was in
use, the name of the authenticated principal will be replaced with
[autobind].

Messages sent with syslog NOTICE priority.

More information is available in the design document 'audit-ipa-api.md'

Fixes: https://pagure.io/freeipa/issue/9589

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-05-22 17:06:23 -04:00
..
systemd frontend: add systemd journal audit of executed API commands 2024-05-22 17:06:23 -04:00
tmpfilesd configure: Use HTTPD_GROUP in init/tmpfiles/ipa.conf.in 2021-11-25 21:02:56 -05:00
ipa-dnskeysyncd Build: integrate init and init/systemd into build system 2016-11-09 13:08:32 +01:00
ipa-ods-exporter Build: integrate init and init/systemd into build system 2016-11-09 13:08:32 +01:00
Makefile.am Move tmpfiles.d configuration handling back to spec file 2017-08-30 13:05:23 +02:00