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

Disallow TRACE HTTP method #450

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Disallow TRACE HTTP method #450

merged 1 commit into from
Aug 12, 2022

Conversation

pharaujo
Copy link
Contributor

Even though I believe there is no actual risk of Cross-Site Tracing attacks in cloudwatch-exporter, disallowing
the TRACE HTTP method in Jetty reduces attack surface and makes security scans happier.

(Non-embedded) Jetty disables TRACE in the default configuration by forcing requests using that method be authenticated. I thought using a customizer would be cleaner and, as a bonus, would also be able to return a more accurate HTTP status code (405 Method Not Allowed).

Even though I believe there is no actual risk of
[Cross-Site Tracing][xst] attacks in cloudwatch-exporter, disallowing
the `TRACE` HTTP method in Jetty reduces attack surface and makes
security scans happier.

(Non-embedded) Jetty disables `TRACE`
[in the default configuration][jetty-webapp] by forcing requests using
that method be authenticated. I thought using a customizer would be
cleaner and, as a bonus, would also be able to return a more accurate
HTTP status code (405 Method Not Allowed).

[xst]: https://owasp.org/www-community/attacks/Cross_Site_Tracing
[jetty-webapp]: https://github.com/eclipse/jetty.project/blob/jetty-11.0.11/jetty-webapp/src/main/config/etc/webdefault.xml#L423-L440

Signed-off-by: Pedro Araujo <[email protected]>
@pharaujo
Copy link
Contributor Author

@matthiasr can you have a look?

@matthiasr
Copy link
Contributor

Awesome, thank you!

@matthiasr matthiasr merged commit b3092f6 into prometheus:master Aug 12, 2022
@pharaujo pharaujo deleted the disable-http-trace branch August 12, 2022 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants