Skip to content
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

feat(server): allowed hosts #3680

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

feat(server): allowed hosts #3680

wants to merge 6 commits into from

Conversation

james-d-elliott
Copy link
Member

This implements an allowed hosts middleware which helps prevent communication with Authelia via unknown host headers.

@authelia
Copy link

authelia bot commented Jul 10, 2022

Artifacts

These changes are published for testing on Buildkite, DockerHub and GitHub Container Registry.

Docker Container

  • docker pull authelia/authelia:feat-host-header
  • docker pull ghcr.io/authelia/authelia:feat-host-header

@netlify
Copy link

netlify bot commented Jul 10, 2022

Deploy Preview for authelia-staging ready!

Name Link
🔨 Latest commit 2e7495b
🔍 Latest deploy log https://app.netlify.com/sites/authelia-staging/deploys/6330399a0cf8e6000872f281
😎 Deploy Preview https://deploy-preview-3680--authelia-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@james-d-elliott james-d-elliott force-pushed the feat-host-header branch 2 times, most recently from 09d91ab to 200adb9 Compare July 10, 2022 04:38
This implements an allowed hosts middleware which helps prevent communication with Authelia via unknown host headers.
@codecov
Copy link

codecov bot commented Jul 10, 2022

Codecov Report

Merging #3680 (9e7c83e) into master (32d2815) will increase coverage by 0.04%.
The diff coverage is 87.75%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3680      +/-   ##
==========================================
+ Coverage   68.90%   68.95%   +0.04%     
==========================================
  Files         257      258       +1     
  Lines       16184    16215      +31     
  Branches      431      431              
==========================================
+ Hits        11152    11181      +29     
- Misses       4337     4340       +3     
+ Partials      695      694       -1     
Flag Coverage Δ
backend 69.94% <87.75%> (+0.08%) ⬆️
frontend 62.13% <ø> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/handlers/response.go 56.77% <ø> (-1.87%) ⬇️
internal/server/asset.go 69.75% <0.00%> (ø)
internal/server/handlers.go 92.06% <66.66%> (+0.08%) ⬆️
internal/handlers/handler_status.go 100.00% <100.00%> (ø)
internal/middlewares/allowed_hosts.go 100.00% <100.00%> (ø)
internal/middlewares/metrics.go 100.00% <100.00%> (ø)
internal/middlewares/util.go 77.77% <100.00%> (-22.23%) ⬇️
internal/middlewares/wrap.go 100.00% <100.00%> (ø)
internal/utils/strings.go 96.55% <100.00%> (+0.12%) ⬆️
... and 4 more

@james-d-elliott james-d-elliott added this to the v4.37.0 milestone Sep 13, 2022
@james-d-elliott james-d-elliott added priority/3/medium Medium priority items priority/5/low Low priority items and removed priority/3/medium Medium priority items labels Sep 16, 2022
Copy link
Member

@nightah nightah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a couple of minor nits.

docs/content/en/configuration/miscellaneous/server.md Outdated Show resolved Hide resolved
internal/server/asset.go Outdated Show resolved Hide resolved
Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
Copy link
Member

@nightah nightah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/5/low Low priority items
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants