WIP: feat(hardening): blocks architecture with core and hardened tiers #16
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Discussion
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Help Wanted
Status
Need More Info
Prio - Hoog
Prio - Laag
Prio - Middel
styling
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MinBZK/DAWO-NixOS!16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bram.buijs/DAWO-NixOS:feat/blocks-rework-interface"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
References #8. Supersedes #12.
Reworks the hardening set from the earlier opt-in PR (#12) onto the blocks model
from #8. Every capability is now a block exposed as
flake.modules.nixos.<name>,with the interface
dawo.<block>.enableplusdawo.<block>.options.<...>and thebody in
mkIf cfg.enable, so a consumer flake takes this repo as an input andcomposes blocks (same shape as thecloudexplorers/nixos-blocks).
Two tier-aggregates:
profiles-dawo-core(mandatory): usb-control, ssh, sysctl-baseline, timesync,audit. Forced on with
lib.mkForce, so a consumer can configure them throughdawo.<block>.options.*but cannot silently drop one. Wired intoprofiles-dawo-generic.profiles-dawo-hardened(opt-in): declares the risky/specialist blocks defaultoff (AppArmor for now; pam-u2f/pam-oath/egress-deny to follow). A workplace
imports it and flips what it wants.
Enforcement follows the #8 rules:
lib.mkForce(no escape hatch, a host cannot lower thefloor); suggested tunables are
lib.mkDefault.non-positive
maxAuthTriesassert at build time; the usbguard empty allowlistis a defined safe default (block newly-inserted, allow already-present), not an
undefined option.
the NixOS audit module reject the generated rules ("error in line 2", status
255), which would fail every rebuild. The block is wired so the contract holds;
the body fills once that is fixed upstream. journald and chrony cover the
log/time base meanwhile.
Norm: BIO/NCSC (the per-block comments map back to the ANSSI/CIS origins).
nix flake checkis green on both hosts. Build/deploy proof on a Lenovo T495s tofollow before merge.
Question: are you happy with
dawo.as the public option prefix and the twoprofile-aggregate names (
profiles-dawo-core/profiles-dawo-hardened) as theconsumer interface?
ca50580b9dto7b47873dc7Loving the detail and references in this PR! Keep up the good work.
Please prove this builds with the defined profiles and I'm happy to merge.
7b47873dc7todfe1adbd15feat(hardening): blocks architecture with core and hardened tiersto WIP: feat(hardening): blocks architecture with core and hardened tiersView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.