Skip to content

Commit d232ba3

Browse files
committed
nixos/attestation-server: synchronize systemd options with upstream
1 parent 6bce99c commit d232ba3

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

nixos/attestation-server/module.nix

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,38 @@ in
137137
SuccessExitStatus = [ 143 ];
138138

139139
DynamicUser = true;
140-
ProtectSystem = "strict";
141-
ProtectHome = true;
140+
StateDirectory = "attestation";
141+
WorkingDirectory = "%S/attestation";
142142

143+
# See attestation.service in upstream repository
144+
CapabilityBoundingSet = "";
145+
IPAddressDeny = "any";
146+
IPAddressAllow = "localhost";
147+
LockPersonality = true;
143148
NoNewPrivileges = true;
144149
PrivateDevices = true;
145-
StateDirectory = "attestation";
146-
WorkingDirectory = "%S/attestation";
150+
PrivateIPC = true;
151+
PrivateTmp = true;
152+
PrivateUsers = true;
153+
ProcSubset = "pid";
154+
ProtectClock = true;
155+
ProtectControlGroups = true;
156+
ProtectHome = true;
157+
ProtectHostname = true;
158+
ProtectKernelLogs = true;
159+
ProtectKernelModules = true;
160+
ProtectKernelTunables = true;
161+
ProtectProc = "invisible";
162+
ProtectSystem = "strict";
163+
RestrictAddressFamilies = "AF_INET AF_INET6";
164+
RestrictNamespaces = true;
165+
RestrictRealtime = true;
166+
RestrictSUIDSGID = true;
167+
SystemCallArchitectures = "native";
168+
SystemCallFilter = [
169+
"@system-service"
170+
"~@privileged @resources"
171+
];
147172
};
148173
};
149174

0 commit comments

Comments
 (0)