Skip to content

Commit

Permalink
nixos/attestation-server: synchronize systemd options with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfullmer committed Apr 30, 2021
1 parent 6bce99c commit d232ba3
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions nixos/attestation-server/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,38 @@ in
SuccessExitStatus = [ 143 ];

DynamicUser = true;
ProtectSystem = "strict";
ProtectHome = true;
StateDirectory = "attestation";
WorkingDirectory = "%S/attestation";

# See attestation.service in upstream repository
CapabilityBoundingSet = "";
IPAddressDeny = "any";
IPAddressAllow = "localhost";
LockPersonality = true;
NoNewPrivileges = true;
PrivateDevices = true;
StateDirectory = "attestation";
WorkingDirectory = "%S/attestation";
PrivateIPC = true;
PrivateTmp = true;
PrivateUsers = true;
ProcSubset = "pid";
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
RestrictAddressFamilies = "AF_INET AF_INET6";
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"~@privileged @resources"
];
};
};

Expand Down

0 comments on commit d232ba3

Please sign in to comment.