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

Allow disabling HTTP TRACE/TRACK verbs #7907

Merged
merged 6 commits into from
May 21, 2021

Conversation

wmccarley
Copy link
Contributor

Motivation

Pulsar broker's embedded Jetty client does not disable HTTP TRACE and TRACK by default which causes the application to be flagged as insecure in certain corporate environments

Modifications

Created a new servlet filter: DisableDebugHttpMethodFilter that is attached to the servlets as they are added at startup. I used this StackOverflow answer for reference.

Verifying this change

This change added tests and can be verified as follows:

(example:)

  • Added test case testDisableHttpTraceAndTrackMethods in WebServiceTest class

Does this pull request potentially affect one of the following parts:

  • The rest endpoints: (yes) -- the property is set to false by default in broker.conf so it should not introduce any ill side effects in existing environments

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (comment in broker.conf)

@rdhabalia rdhabalia added this to the 2.7.0 milestone Aug 26, 2020
@rdhabalia
Copy link
Contributor

@wmccarley can you please rebase the PR.

@codelipenghui
Copy link
Contributor

@wmccarley Could you please resolve the conflicts?

@codelipenghui
Copy link
Contributor

move to 2.8.0 first

@codelipenghui codelipenghui modified the milestones: 2.7.0, 2.8.0 Nov 17, 2020
@codelipenghui codelipenghui merged commit 2e5788f into apache:master May 21, 2021
yangl pushed a commit to yangl/pulsar that referenced this pull request Jun 23, 2021
### Motivation

*Pulsar broker's embedded Jetty client does not disable HTTP TRACE and TRACK by default which causes the application to be flagged as insecure in certain corporate environments*

### Modifications

*Created a new servlet filter: DisableDebugHttpMethodFilter that is attached to the servlets as they are added at startup. I used [this StackOverflow answer](https://stackoverflow.com/a/40990957)* for reference.
@lazybird23
Copy link

currently which branch fixed this?

bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### Motivation

*Pulsar broker's embedded Jetty client does not disable HTTP TRACE and TRACK by default which causes the application to be flagged as insecure in certain corporate environments*

### Modifications

*Created a new servlet filter: DisableDebugHttpMethodFilter that is attached to the servlets as they are added at startup. I used [this StackOverflow answer](https://stackoverflow.com/a/40990957)* for reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants