report: add systemd-report-sign-tsm backend
A report signing backend that returns a confidential-computing attestation report obtained via configfs-tsm. Implements io.systemd.Report.Signer.Sign(): embeds the digest as the report's inblob and returns the outblob (plus provider and any aux/manifest blobs). Wired up as the "tsm" mechanism with a socket-activated service. Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
@@ -747,6 +747,8 @@ units = [
|
||||
'file' : 'systemd-report-sign-plain@.service.in',
|
||||
'conditions' : ['HAVE_OPENSSL'],
|
||||
},
|
||||
{ 'file' : 'systemd-report-sign-tsm.socket' },
|
||||
{ 'file' : 'systemd-report-sign-tsm@.service.in' },
|
||||
{
|
||||
'file' : 'systemd-resolved.service.in',
|
||||
'conditions' : ['ENABLE_RESOLVE'],
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Report Signing Socket (configfs-tsm)
|
||||
Documentation=man:systemd-report-sign-tsm@.service(8)
|
||||
DefaultDependencies=no
|
||||
Before=sockets.target shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
ConditionSecurity=cvm
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/systemd/report.sign/tsm
|
||||
FileDescriptorName=varlink
|
||||
SocketMode=0600
|
||||
Accept=yes
|
||||
MaxConnectionsPerSource=16
|
||||
RemoveOnStop=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
@@ -0,0 +1,46 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Report Signing Service (configfs-tsm)
|
||||
Documentation=man:systemd-report-sign-tsm@.service(8)
|
||||
DefaultDependencies=no
|
||||
Before=shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
Wants=sys-kernel-config.mount
|
||||
After=sys-kernel-config.mount
|
||||
|
||||
[Service]
|
||||
ExecStart={{LIBEXECDIR}}/systemd-report-sign-tsm
|
||||
CapabilityBoundingSet=
|
||||
DeviceAllow=
|
||||
IPAddressDeny=any
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
NoNewPrivileges=yes
|
||||
PrivateDevices=yes
|
||||
PrivateIPC=yes
|
||||
PrivateNetwork=yes
|
||||
PrivateTmp=disconnected
|
||||
ProtectControlGroups=yes
|
||||
ProtectHome=yes
|
||||
ProtectHostname=yes
|
||||
ProtectKernelLogs=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectSystem=strict
|
||||
ReadWritePaths=-/sys/kernel/config/tsm/report
|
||||
RestrictAddressFamilies=AF_UNIX
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
RuntimeMaxSec=5min
|
||||
SystemCallArchitectures=native
|
||||
SystemCallErrorNumber=EPERM
|
||||
SystemCallFilter=@system-service
|
||||
Reference in New Issue
Block a user