New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/nginx: populate extraDomains with vhosts using useACMEHost #46379
Draft
vincentbernat
wants to merge
1
commit into
NixOS:master
Choose a base branch
from
vincentbernat:feature/nginx-acme
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To reduce the number of issued certificates for LE, a solution is to request one certificate for several domains. This can be done if all domains are part of the same virual host definition (with serverAliases) or by using useACMEHost instead of enableACME attribute. In the later case, the user still had to add the appropriate domains to the extraDomains attribute of the certificate. We do that for them. This has been tested with the following configuration: security.acme.production = false; services.nginx = { enable = true; recommendedTlsSettings = true; virtualHosts."exo.89.145.160.62.nip.io" = { forceSSL = true; enableACME = true; serverAliases = [ "exo3.89.145.160.62.nip.io" ]; }; virtualHosts."exo2.89.145.160.62.nip.io" = { forceSSL = true; useACMEHost = "exo.89.145.160.62.nip.io"; serverAliases = [ "exo4.89.145.160.62.nip.io" ]; }; virtualHosts."exo5.89.145.160.62.nip.io" = { forceSSL = true; enableACME = true; }; virtualHosts."exo6.89.145.160.62.nip.io" = { forceSSL = true; enableACME = true; serverAliases = [ "exo7.89.145.160.62.nip.io" ]; }; }; And I get certificates with the following subject alt names: - DNS:exo.89.145.160.62.nip.io, DNS:exo2.89.145.160.62.nip.io, DNS:exo3.89.145.160.62.nip.io, DNS:exo4.89.145.160.62.nip.io - DNS:exo5.89.145.160.62.nip.io - DNS:exo6.89.145.160.62.nip.io, DNS:exo7.89.145.160.62.nip.io
Any updates on this pull request, please? |
Ping? 😇 cc #40593 . |
Is this likely to be merged? |
@GrahamcOfBorg test nginx acme |
I marked this as stale due to inactivity. → More info |
stale
bot
added
the
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
label
Jun 7, 2021
stale
bot
removed
the
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
label
Mar 20, 2024
wegank
added
the
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
label
Mar 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2.status: merge conflict
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: nixos
8.has: module (update)
10.rebuild-darwin: 0
10.rebuild-linux: 0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
To reduce the number of issued certificates for LE, a solution is to
request one certificate for several domains. This can be done if all
domains are part of the same virual host definition (with
serverAliases) or by using useACMEHost instead of enableACME
attribute. In the later case, the user still had to add the
appropriate domains to the extraDomains attribute of the certificate.
We do that for them.
This has been tested with the following configuration:
And I get certificates with the following subject alt names:
DNS:exo3.89.145.160.62.nip.io, DNS:exo4.89.145.160.62.nip.io
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)