nixos/minio: harden service
This commit is contained in:
parent
8f5972c5de
commit
5420ae11ea
@ -135,6 +135,44 @@ in
|
|||||||
(legacyCredentials cfg)
|
(legacyCredentials cfg)
|
||||||
else
|
else
|
||||||
null;
|
null;
|
||||||
|
|
||||||
|
# hardening
|
||||||
|
DevicePolicy = "closed";
|
||||||
|
CapabilityBoundingSet = "";
|
||||||
|
RestrictAddressFamilies = [
|
||||||
|
"AF_INET"
|
||||||
|
"AF_INET6"
|
||||||
|
"AF_NETLINK"
|
||||||
|
"AF_UNIX"
|
||||||
|
];
|
||||||
|
DeviceAllow = "";
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateMounts = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
PrivateUsers = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
LockPersonality = true;
|
||||||
|
RemoveIPC = true;
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RestrictSUIDSGID = true;
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
SystemCallFilter = [
|
||||||
|
"@system-service"
|
||||||
|
"~@privileged"
|
||||||
|
];
|
||||||
|
ProtectProc = "invisible";
|
||||||
|
ProtectHostname = true;
|
||||||
|
UMask = "0077";
|
||||||
|
# minio opens /proc/mounts on startup
|
||||||
|
ProcSubset = "all";
|
||||||
};
|
};
|
||||||
environment = {
|
environment = {
|
||||||
MINIO_REGION = "${cfg.region}";
|
MINIO_REGION = "${cfg.region}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user