-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Harden Traefik systemd service #4302
Conversation
This comment has been minimized.
This comment has been minimized.
a898065
to
d2be65c
Compare
d2be65c
to
fc042bb
Compare
it could also be run by a standard user with these 2 under [Service] |
@alemairebe I thought about adding that too, but then again it requires setting up a user for traefik and assigning appropriate permissions to Maybe we can add that as a comment to the service file?
|
@jacksgt I guess that would be a good first step :-) |
fc042bb
to
f634229
Compare
@mmatur Could you please review this PR? |
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.
Hi @jacksgt,
First of all thanks for your interest in the project. In this contribution all new params should be commented because there are not mandatory.
Only few comments
83c081a
to
389cb86
Compare
I added brief comment for all new parameters (for more in-depth information the systemd man page should be consulted). |
389cb86
to
5db899b
Compare
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.
LGTM
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.
LGTM
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.
LGTM
a656ada
to
11fb692
Compare
Since Traefik is directly connected to the internet, it makes sense to apply various lock down measures to keep the system as safe as possible. Includes mounting most of the directories as read-only or even making them inaccessible, restricting kernel modifications and limiting the number of processes the unit may spawn. Also add checks at service startup to ensure all required files are present. Additionally documents how to set up a separate user for traefik and run the service as that user.
11fb692
to
c311a12
Compare
Since Traefik is running as root on the system, it makes sense to
apply various lock down measures to keep the system as safe as possible.
Includes mounting most of the directories as read-only or even making them
inaccessible, restricting kernel modifications and limiting the number of
processes the unit may spawn.
Also add checks at service startup to ensure all required files are present.