-
Notifications
You must be signed in to change notification settings - Fork 4k
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
New cheat sheet proposal: Apache HTTP Server #5
Comments
OK from my side. @jmanico Do you are OK with this proposal? |
As Jim is currently busy, i validate the proposal. |
Ping me when you will start working on it in order that i pass the issue from the backlog to pending. |
I have got this started: https://github.com/danehrlich1/very-secure-apache/blob/master/apache2.conf Things included:
|
Hi, |
I'd like to help with this. H5BP have for a long time been providing developers with a terrific boilerplate of apache security configs, and I feel obligated mentioning them: https://github.com/h5bp/server-configs-apache If there's anything to take away from this comment; I would like to highlight one thing when it comes to HTTP (security) headers: We need a consensus of which headers applies to which |
Thank you very much for your proposal, feel free to submit a PR 😃 |
@danehrlich1 Any news about the PR for this issue ? Thank you very much in advance for your feedback 😃 |
This is not a small task. If you are referring to my proposal of mapping out which headers applies to which I briefly reviewed, and commited to @danehrlich1's PR. There are some very debatable defaults in there, quick example:
This implies all subdomains are HTTPS, and although I agree they should be, this configuration with the (non-standard) |
HSTS preload is easily reversible : https://hstspreload.org/removal/
|
https://hstspreload.org/#removal
Yes it's not the end of the world, but there should be detailed information to the configurations. |
Luckily inclusion in HSTS preload list has significant requirements as you can see from:
https://hstspreload.org/#submission-requirements.
It's rare when site owners add themselves to preload lists "on accident".
But you are right, if you are preloaded and depend on HTTP resources, you are stuck until the next browser update cycle at best. Site owners usually have better luck upgrading HTTP resources to HTTPS fast vs. trying to get preload delisted.
|
Also, the example CSP is rather weak in terms of strictness. I'd like to refer you to https://github.com/h5bp/server-configs-apache/blob/master/src/security/content-security-policy.conf for a strict (https://csp.withgoogle.com/docs/strict-csp.html) example base policy. But which also should, IMO, include I've never contributed to OWASP before and I'm unsure of the course of action. |
I do not agree with the cited documents at all, I state with respect.
All CSP policies should start with default-src 'none' and build from that, ideally. That way object-src 'none' is implicit and is not needed.
Principle of last privileged. no unsafe-inline or unsafe-eval is also key if you want to avoid XSS.
Aloha, Jim
|
About the preload, I'd suggest removing it from the default configuration and adding it as a note for web masters that are managing the domain. A lot folks will be using subdomains and will inject preload, which doesn't hurt by default, but doesn't provide anything extra if they don't know what it is. About CSP, I'd prefer having a not so strict CSP, and a reference to the CSP CS with some Apache examples instead. Having a strict CSPs might get people into trouble without actually reading up a bit on it as it is a bit hard to implement it for new-comers. |
I do agree drop preload from the default policy. It requires careful planning.
|
However, setting no document/navigation directives aligns better with @ThunderSon's opinion on having it less strict by default. Contrary to what I may have indicated, I don't really have strong opinions but I appreciate a dialog. ^^ |
@Malvoz Take the time you need, it was just to "keep the ball rolling" and make a tour on the different issues in pending state at project level. |
@Malvoz We're more than happy to have discussions. We need to give you some feedback as well on how to proceed with the issue/PR. CSP is a hot topic recently and it is worth the investment. |
@Malvoz I 100% agree with you. Preload should be taken out. I am shocked I put that in there. That only works if you properly follow the preload requirements, doesn’t work for self-signing in testing, blah blah. |
@righettod I can work on this more. The only thing though is...you’re never 100% sure with Apache. I’ve literally had different devs on the mailing list for httpd, and these guys are absolutely brilliant, tell me to do different things. The source code is so old...no one is totally sure. A good example of this is that recently, no one knew all the directives you could put in .htaccess, whose source code is based on a different web server (NCSA for University of Illinois) from like 1993. I’ll finish it, but I am going to add two warning labels to the top:
|
@Malvoz I would love to work with you. I’ve already learned a ton from your comments here. |
But preload is still important. Can you add a second header with comments and caveats that includes the preloading?
…--
Jim Manico
On May 29, 2019, at 4:12 PM, Dan Ehrlich ***@***.***> wrote:
@Malvoz I 100% agree with you. Preload should be taken out. I am shocked I put that in there. That only works if you properly follow the preload requirements, doesn’t work for self-signing in testing, blah blah.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
I really like how indulged you are in the Apache configuration versions and how complicated it can get. I'd recommend pushing for the PR, and not worrying as much about these minimal points 😄 |
@danehrlich1 @Malvoz Hello! Any status on the issue? |
Due to the fact that not all apache directives are accessible in the context of |
Personally I think that the best way to address issues is to create a PR with proposal. That way we will be able to add comment to specific line and try to resolve it and avoid statements like 'large percentage'. |
@danehrlich1 hey, what is the status of this issue? Do you need any help from us? |
Let me just get it in and over with. Then we can edit it there still but at least we've heaved it over the finish line. 72 hours. |
This CS will not be picked up by the team in the coming time period, and as such, this issue will be closed. |
Thanks you for proposing a new cheat sheet.
Please provides the following information about your proposal:
Most web servers completely undermine any security that was built into the application. It can render all app security code pointless. Very important to get this right.
Make an updated single source of truth for a generally secure Apache config.
Eliminate the need to rely on 10 year old+ documentation that is scattered across the internet and often wasn't even right back then. Actually explain Apache HTTP Server in a way people not committing to the source code can actually understand.
Thanks you again for your contribution 😃
The text was updated successfully, but these errors were encountered: