summary refs log tree commit diff
path: root/nixos/modules/security
Commit message (Collapse)AuthorAge
* grsecurity: update stable/testing kernels, refactoringAustin Seipp2014-06-22
| | | | | | | | | | This updates the new stable kernel to 3.14, and the new testing kernel to 3.15. This also removes the vserver kernel, since it's probably not nearly as used. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* sudo: Always keepVisudo in order to simplify sudo buildWilliam A. Kennington III2014-06-17
|
* nixos.tests.installer: Fix test failures due to network being disabledRicardo M. Correia2014-06-17
|
* Rename environment.systemVariables -> environment.sessionVariablesEelco Dolstra2014-06-13
| | | | This makes it clearer that they're part of PAM sessions.
* Revert "Revert "Merge #2692: Use pam_env to properly setup system-wide env""Eelco Dolstra2014-06-10
| | | | This reverts commit 491c088731022463978e595956427e72db6306a9.
* Revert "Merge #2692: Use pam_env to properly setup system-wide env"Eelco Dolstra2014-06-10
| | | | This reverts commit 18a0cdd86416a8cbc263cfa8cb96c460a53f7b5c.
* Merge #2692: Use pam_env to properly setup system-wide envVladimír Čunát2014-06-10
|
* Enable checking sudoers syntax. Fixes #2850, probably.Michael Raskin2014-06-09
|
* grsecurity: Fix module evaluationRicardo M. Correia2014-05-22
|
* nixos/duosec: Add an option to allow TCP forwardingAustin Seipp2014-05-20
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix fallout from 4f27ad14Austin Seipp2014-05-18
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* grsec: refactor grsecurity packagesAustin Seipp2014-05-17
| | | | | | | | This now provides a handful of different grsecurity kernels for slightly different 'flavors' of packages. This doesn't change the grsecurity module to use them just yet, however. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* kernel: enable AppArmor by defaultAustin Seipp2014-05-17
| | | | | | | | | | AppArmor only requires a few patches to the 3.2 and 3.4 kernels in order to work properly (with the minor catch grsecurity -stable includes the 3.2 patches.) This adds them to the kernel builds by default, removes features.apparmor (since it's always true) and makes it the default MAC system. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* sudo: env_keep TERMINFO for urxvtAristid Breitkreuz2014-05-04
|
* polkit: Remove unnecessary restartEelco Dolstra2014-04-28
| | | | There already is a restart trigger that takes care of this.
* polkit: Restart using systemctlEelco Dolstra2014-04-28
| | | | | The use of pkill is now particularly bad due to containers (it might kill processes in containers).
* rtkit: Update from 0.10 to 0.11Rickard Nilsson2014-04-21
|
* grsecurity: Update all patchesRicardo M. Correia2014-04-21
| | | | | | stable: 3.0-3.2.57-201404131252 -> 3.0-3.2.57-201404182109 test: 3.0-3.13.10-201404141717 -> 3.0-3.14.1-201404201132 vserver: 3.0-3.2.57-vs2.3.2.16-201404131253 -> 3.0-3.2.57-vs2.3.2.16-201404182110
* Restart polkit if its configuration may have changedEelco Dolstra2014-04-19
|
* Put /var/setuid-wrappers on a tmpfsEelco Dolstra2014-04-19
| | | | | This allows all other filesystems to be mounted without the suid option.
* setuid-wrapper: Fix broken string comparisonEelco Dolstra2014-04-19
|
* setuid-wrapper: Drop runtime dependency on setuid-wrapper.cEelco Dolstra2014-04-19
|
* setuid-wrapper.c: Remove tabsEelco Dolstra2014-04-19
|
* Apply pam_loginuid before pam_systemdEelco Dolstra2014-04-17
| | | | As recommended by the pam_systemd manpage.
* nixos: transmission improvementsAustin Seipp2014-04-15
| | | | | | | | | | | | | | | | | | | This mostly upgrades transmission, and does some very minor touchups on AppArmor support. In particular, there is now no need to ever specify the umask as part of the settings, as it will be mixed in by default (which is essentially always what you want). Also, the default configuration is now more sensible: Downloads are put in /var/lib/transmission/Downloads, and incomplete files are put in /var/lib/transmission/.incomplete - this also allows easy use of file syncing probrams, like BitTorrent Sync. Finally, this unconditionally enables the AppArmor profiles for the daemon, if AppArmor is enabled - rather than letting the user specify profile support, it's best to default to supporting profiles for daemons transparently in all places. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Rewrite ‘with pkgs.lib’ -> ‘with lib’Eelco Dolstra2014-04-14
| | | | | | | | Using pkgs.lib on the spine of module evaluation is problematic because the pkgs argument depends on the result of module evaluation. To prevent an infinite recursion, pkgs and some of the modules are evaluated twice, which is inefficient. Using ‘with lib’ prevents this problem.
* nixos: extend documentation example for security.setuidOwnersBjørn Forsman2014-04-13
| | | | Show that it is possible to set custom permission bits.
* grsecurity: Fix GRKERNSEC_PROC restrictionsAustin Seipp2014-04-12
| | | | | | | | | | | | | | | | | Previously we were setting GRKERNSEC_PROC_USER y, which was a little bit too strict. It doesn't allow a special group (e.g. the grsecurity group users) to access /proc information - this requires GRKERNSEC_PROC_USERGROUP y, and the two are mutually exclusive. This was also not in line with the default automatic grsecurity configuration - it actually defaults to USERGROUP (although it has a default GID of 1001 instead of ours), not USER. This introduces a new option restrictProcWithGroup - enabled by default - which turns on GRKERNSEC_PROC_USERGROUP instead. It also turns off restrictProc by default and makes sure both cannot be enabled. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* nixos: add grsecurity module (#1875)Austin Seipp2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This module implements a significant refactoring in grsecurity configuration for NixOS, making it far more usable by default and much easier to configure. - New security.grsecurity NixOS attributes. - All grsec kernels supported - Allows default 'auto' grsec configuration, or custom config - Supports custom kernel options through kernelExtraConfig - Defaults to high-security - user must choose kernel, server/desktop mode, and any virtualisation software. That's all. - kptr_restrict is fixed under grsecurity (it's unwriteable) - grsecurity patch creation is now significantly abstracted - only need revision, version, and SHA1 - kernel version requirements are asserted for sanity - built kernels can have the uname specify the exact grsec version for development or bug reports. Off by default (requires `security.grsecurity.config.verboseVersion = true;`) - grsecurity sysctl support - By default, disabled. - For people who enable it, NixOS deploys a 'grsec-lock' systemd service which runs at startup. You are expected to configure sysctl through NixOS like you regularly would, which will occur before the service is started. As a result, changing sysctl settings requires a reboot. - New default group: 'grsecurity' - Root is a member by default - GRKERNSEC_PROC_GID is implicitly set to the 'grsecurity' GID, making it possible to easily add users to this group for /proc access - AppArmor is now automatically enabled where it wasn't before, despite implying features.apparmor = true The most trivial example of enabling grsecurity in your kernel is by specifying: security.grsecurity.enable = true; security.grsecurity.testing = true; # testing 3.13 kernel security.grsecurity.config.system = "desktop"; # or "server" This specifies absolutely no virtualisation support. In general, you probably at least want KVM host support, which is a little more work. So: security.grsecurity.enable = true; security.grsecurity.stable = true; # enable stable 3.2 kernel security.grsecurity.config = { system = "server"; priority = "security"; virtualisationConfig = "host"; virtualisationSoftware = "kvm"; hardwareVirtualisation = true; } This module has primarily been tested on Hetzner EX40 & VQ7 servers using NixOps. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* nixos: add Duo Security moduleAustin Seipp2014-03-16
| | | | | | | | | | | | | | | | | | | | | | | | This module adds the security.duosec attributes, which you can use to enable simple two-factor authentication for NixOS logins. The module currently provides PAM and SSH support, although the PAM unix system configuration isn't automatically dealt with (although the configuration is automatically built). Enabling it is as easy as saying: security.duosec.ssh.enable = true; security.duosec.ikey = "XXXXXXXX..."; security.duosec.skey = "XXXXXXXX..."; security.duosec.host = "api-XXXXXXX.duosecurity.com"; security.duosec.group = "duosec"; which will enforce two-factor authentication for SSH logins for users in the 'duosec' group. This requires uid/gid support in the environment.etc module. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Remove /etc/ca-bundle.crtEelco Dolstra2014-02-11
| | | | Applications should use /etc/ssl/certs/ca-bundle.crt instead.
* polkit: Add some examplesEelco Dolstra2013-11-18
|
* polkit: Fix authenticating as a wheel userEelco Dolstra2013-11-18
| | | | | In Javascript-based PolKit, "unix-user:0;unix-group:wheel" is not valid; it should be a list "unix-user:0", "unix-group:wheel".
* polkit: The rule file needs to end in .rulesEelco Dolstra2013-11-18
| | | | Otherwise it's ignored.
* polkit: major update 0.105 -> 0.112Vladimír Čunát2013-11-09
| | | | | | | - It now uses JavaScript for configuration (only), so I had to "convert" config for NetworkManager. - I tested suspend/restart/(un)mount on KDE/Xfce, Phreedom tested NetworkManager config conversion.
* Add lots of missing option typesEelco Dolstra2013-10-30
|
* Substitute "types.uniq types.string" -> "types.str"Eelco Dolstra2013-10-30
|
* Remove uses of the "merge" option attributeEelco Dolstra2013-10-28
| | | | | It's redundant because you can (and should) specify an option type, or an apply function.
* Allow PAM resource limits to be integersEelco Dolstra2013-10-17
|
* Fix PAM resource limitsEelco Dolstra2013-10-17
|
* sshd: Remove the usePAM optionEelco Dolstra2013-10-15
| | | | | | | Sshd *must* use PAM because we depend on it for proper session management. The original goal of this option (disabling password logins) can also be implemented by removing pam_auth authentication from sshd's PAM service.
* Turn security.pam.services into an attribute setEelco Dolstra2013-10-15
| | | | | | | | | | | | That is, you can say security.pam.services.sshd = { options... }; instead of security.pam.services = [ { name = "sshd"; options... } ]; making it easier to override PAM settings from other modules.
* add prey: Proven tracking software that helps you find, lock and recover ↵Domen Kožar2013-10-14
| | | | your devices when stolen or missing
* Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra2013-10-10