mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
b3162a1074
These modules implement a way to test ACME based on a test instance of Letsencrypt's Boulder service. The service implementation is in letsencrypt.nix and the second module (resolver.nix) is a support-module for the former, but can also be used for tests not involving ACME. The second module provides a DNS server which hosts a root zone containing all the zones and /etc/hosts entries (except loopback) in the entire test network, so this can be very useful for other modules that need DNS resolution. Originally, I wrote these modules for the Headcounter deployment, but I've refactored them a bit to be generally useful to NixOS users. The original implementation can be found here: https://github.com/headcounter/deployment/tree/89e7feafb/modules/testing Quoting parts from the commit message of the initial implementation of the Letsencrypt module in headcounter/deployment@95dfb31110: This module is going to be used for tests where we need to impersonate an ACME service such as the one from Letsencrypt within VM tests, which is the reason why this module is a bit ugly (I only care if it's working not if it's beautiful). While the module isn't used anywhere, it will serve as a pluggable module for testing whether ACME works properly to fetch certificates and also as a replacement for our snakeoil certificate generator. Also quoting parts of the commit where I have refactored the same module in headcounter/deployment@85fa481b34: Now we have a fully pluggable module which automatically discovers in which network it's used via the nodes attribute. The test environment of Boulder used "dns-test-srv", which is a fake DNS server that's resolving almost everything to 127.0.0.1. On our setup this is not useful, so instead we're now running a local BIND name server which has a fake root zone and uses the mentioned node attribute to automatically discover other zones in the network of machines and generate delegations from the root zone to the respective zones with the primaryIPAddress of the node. ... We want to use real letsencrypt.org FQDNs here, so we can't get away with the snakeoil test certificates from the upstream project but now roll our own. This not only has the benefit that we can easily pass the snakeoil certificate to other nodes, but we can (and do) also use it for an nginx proxy that's now serving HTTPS for the Boulder web front end. The Headcounter deployment tests are simulating a production scenario with real IPs and nameservers so it won't need to rely on networking.extraHost. However in this implementation we don't necessarily want to do that, so I've added auto-discovery of networking.extraHosts in the resolver module. Another change here is that the letsencrypt module now falls back to using a local resolver, the Headcounter implementation on the other hand always required to add an extra test node which serves as a resolver. I could have squashed both modules into the final ACME test, but that would make it not very reusable, so that's the main reason why I put these modules in tests/common. Signed-off-by: aszlig <aszlig@redmoonstudios.org> |
||
---|---|---|
.. | ||
common | ||
ammonite.nix | ||
avahi.nix | ||
bittorrent.nix | ||
blivet.nix | ||
boot-stage1.nix | ||
boot.nix | ||
buildbot.nix | ||
cadvisor.nix | ||
cassandra.nix | ||
chromium.nix | ||
cjdns.nix | ||
cloud-init.nix | ||
containers-bridge.nix | ||
containers-extra_veth.nix | ||
containers-hosts.nix | ||
containers-imperative.nix | ||
containers-ipv4.nix | ||
containers-ipv6.nix | ||
containers-macvlans.nix | ||
containers-physical_interfaces.nix | ||
containers-portforward.nix | ||
containers-reloadable.nix | ||
containers-restart_networking.nix | ||
containers-tmpfs.nix | ||
dnscrypt-proxy.nix | ||
docker-edge.nix | ||
docker-registry.nix | ||
docker.nix | ||
ec2.nix | ||
ecryptfs.nix | ||
elk.nix | ||
emacs-daemon.nix | ||
env.nix | ||
etcd-cluster.nix | ||
etcd.nix | ||
ferm.nix | ||
firefox.nix | ||
firewall.nix | ||
flannel.nix | ||
fleet.nix | ||
gitlab.nix | ||
glance.nix | ||
gnome3-gdm.nix | ||
gnome3.nix | ||
gocd-agent.nix | ||
gocd-server.nix | ||
haka.nix | ||
hardened.nix | ||
hibernate.nix | ||
hound.nix | ||
hydra.nix | ||
i3wm.nix | ||
influxdb.nix | ||
initrd-network.nix | ||
installer.nix | ||
ipfs.nix | ||
ipv6.nix | ||
jenkins.nix | ||
kernel-copperhead.nix | ||
kernel-latest.nix | ||
kernel-lts.nix | ||
kernel-params.nix | ||
kexec.nix | ||
keymap.nix | ||
keystone.nix | ||
kubernetes.nix | ||
ldap.nix | ||
leaps.nix | ||
lightdm.nix | ||
login.nix | ||
make-test.nix | ||
mathics.nix | ||
mesos.nix | ||
mesos_test.py | ||
minio.nix | ||
misc.nix | ||
mongodb.nix | ||
mpich-example.c | ||
mumble.nix | ||
munin.nix | ||
mysql-replication.nix | ||
mysql.nix | ||
nat.nix | ||
networking-proxy.nix | ||
networking.nix | ||
nexus.nix | ||
nfs.nix | ||
nginx.nix | ||
nsd.nix | ||
openssh.nix | ||
pam-oath-login.nix | ||
panamax.nix | ||
partition.nix | ||
peerflix.nix | ||
pgjwt.nix | ||
phabricator.nix | ||
plasma5.nix | ||
postgis.nix | ||
postgresql.nix | ||
printing.nix | ||
prometheus.nix | ||
proxy.nix | ||
pump.io.nix | ||
quagga.nix | ||
quake3.nix | ||
rabbitmq.nix | ||
radicale.nix | ||
riak.nix | ||
run-in-machine.nix | ||
samba.nix | ||
sddm.nix | ||
simple.nix | ||
slim.nix | ||
slurm.nix | ||
smokeping.nix | ||
snapper.nix | ||
subversion.nix | ||
sysctl.nix | ||
taskserver.nix | ||
testdb.sql | ||
timezone.nix | ||
tomcat.nix | ||
trac.nix | ||
udisks2.nix | ||
virtualbox.nix | ||
wordpress.nix | ||
xfce.nix | ||
xmonad.nix | ||
xrdp.nix |