-
Notifications
You must be signed in to change notification settings - Fork 41
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
Enable HTTP3 in nginx #1660
Open
bwbroersma
wants to merge
1
commit into
internetstandards:main
Choose a base branch
from
bwbroersma:gh1660-nginx-add-http3-quic
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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.
Open
Enable HTTP3 in nginx #1660
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
include http.headers; | ||
include hsts.header; | ||
include hsts_h3.headers; | ||
include conf.d/csp.header; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env sh | ||
|
||
# See https://nginx.org/en/docs/http/ngx_http_v3_module.html#quic_host_key | ||
# Sets a file with the secret key used to encrypt stateless reset and address validation tokens. | ||
# By default, a random key is generated on each reload. Tokens generated with old keys are not accepted. | ||
|
||
# The default NGX_QUIC_DEFAULT_HOST_KEY_LEN is 32 bytes (ngx_event_quic.h) | ||
# Since reloads happen due to Certbot, set a static persistent host key per release. | ||
|
||
openssl rand 32 > /etc/nginx/quic_host.key |
3 changes: 2 additions & 1 deletion
3
docker/webserver/hsts.header → docker/webserver/hsts_h3.headers
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Do *not* add includeSubdomains before https://github.com/internetstandards/Internet.nl/issues/324 is resolved, | ||
# adding includeSubdomains without adding the wildcard SSL certificates will otherwise break the connection test. | ||
add_header 'Strict-Transport-Security' 'max-age=31536000;' always; | ||
add_header 'Strict-Transport-Security' 'max-age=31536000' always; | ||
add_header 'Alt-Svc' 'h3=":443"; ma=86400' always; | ||
|
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This regenerates the key on restart though, right? Certbot reloads every 60 days? We might release more often than that. If it was a concern to regenerate the key every 60 days, we need this to be persistent rather than on start.
We do also have reloads when adding batch users, so reloads are more frequent - that's just not mentioned as a reason here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, there are more reasons, I will add them.
My idea was a new release or container restart might be a good time to regenerate the key, this will invalidate old QUIC Address Validation tokens, the alternative would be persistent storage, but I'm unsure if it is needed to periodically cycle the key.
So all in all, is just updating the comment enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just for future clarity :)