Skip to content

Add RequestRejectedHandler #7052

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

Closed
wants to merge 1 commit into from

Conversation

leonard84
Copy link
Contributor

@leonard84 leonard84 commented Jun 28, 2019

…uests

Fixes gh-5007

@pivotal-issuemaster
Copy link

@leonard84 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@leonard84
Copy link
Contributor Author

@rwinch the company cla is currently at our legal department, but you can review the pr already.

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @leonard84! I provided feedback inline.

Can you please update the documentation to include this new feature?

Another thing to consider is that we need support for XML based users. I'd really appreciate if the ticket includes this support. However, if you are unable to contribute XML namespace support, please create a ticket instead.

@rwinch rwinch self-assigned this Jul 3, 2019
@rwinch rwinch added in: web An issue in web modules (web, webmvc) status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 3, 2019
@leonard84
Copy link
Contributor Author

@rwinch I had some open questions in the issue:

  • FilterChainProxy is configured in WebSecurity, but the ExceptionHandlingConfigurer lives in a different package, so the getRequestRejectedHandler() would have to be public. Would it make more sense to make it a property of WebSecurity?
  • Travis seems to have removed Oracle Java 8 support
$ ~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"
install-jdk.sh 2019-06-25
Expected feature release number in range of 9 to 14, but got: 8
The command "~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"" failed and exited with 3 during .

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jul 4, 2019
@leonard84
Copy link
Contributor Author

@rwinch friendly ping, see above

@rwinch
Copy link
Member

rwinch commented Jul 24, 2019

Thanks for the ping.

I'd say we should just expose the handler via a Bean lookup similar to how httpFirewall is looked up in WebSecurity.

I'm not sure what is happening with the JDK. Our travis build is passing with JDK 8. How did you reproduce this?

@rwinch rwinch removed their assignment Jul 29, 2019
@rwinch
Copy link
Member

rwinch commented Aug 6, 2019

FYI it appears the Travis build was related to gh-7169 which has been resolved

@leonard84 leonard84 marked this pull request as ready for review August 16, 2019 13:25
@pivotal-issuemaster
Copy link

@leonard84 Thank you for signing the Contributor License Agreement!

@leonard84
Copy link
Contributor Author

@rwinch please take another look

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks for the ping. I've provided some more feedback inline.

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks for the updates and ping @leonard84! I have provided additional feedback inline

@leonard84
Copy link
Contributor Author

@rwinch I've implemented your requests

@leonard84
Copy link
Contributor Author

@rwinch ping

@leonard84 leonard84 requested a review from rwinch September 11, 2019 16:19
@leonard84
Copy link
Contributor Author

@rwinch ping again

@leonard84 leonard84 changed the title WIP: Add RequestRejectedHandler to offer a way to handle rejected req… Add RequestRejectedHandler to offer a way to handle rejected req… Nov 15, 2019
@leonard84
Copy link
Contributor Author

@rwinch I've rebased to fix the merge problems and squashed the commits into one

@skjolber
Copy link

@rwinch ping

@ptahchiev
Copy link

Ping again - this is a much needed feature :)

@patrykks
Copy link

Any update in this thread? This is really needed by community.

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

I've provided feedback inline. Also please update tests to be Java based as we don't use Groovy for tests anymore. Finally, please make sure you rebase off the current master.

@leonard84 leonard84 requested a review from rwinch April 29, 2020 17:46
@leonard84
Copy link
Contributor Author

@rwinch I've rebased and converted the Spock tests to the old JUnit 4 style and removed the cglib dependency as byte-buddy is now used to proxy classes.
Out of interest, what was the reason for the removal of Spock/groovy for testing?

@rwinch rwinch removed the status: feedback-provided Feedback has been provided label May 1, 2020
@rwinch rwinch self-assigned this May 1, 2020
@rwinch rwinch added the type: enhancement A general enhancement label May 1, 2020
@rwinch rwinch added this to the 5.4.0-M1 milestone May 1, 2020
@rwinch
Copy link
Member

rwinch commented May 1, 2020

Thanks for the PR @leonard84! This is now merged into master. I've added a bit of polish 0483b3e and support for configuring via XML 4a9fa03.

Out of interest, what was the reason for the removal of Spock/groovy for testing?

As a Java project, testing in Groovy made an unnecessary hurtle for contributors. We switched to make contributions easier for our audience.

@rwinch rwinch changed the title Add RequestRejectedHandler to offer a way to handle rejected req… Add RequestRejectedHandler May 1, 2020
@rwinch rwinch closed this May 1, 2020
@leonard84 leonard84 deleted the implement-5007 branch May 4, 2020 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way to handle RequestRejectedException
7 participants