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

Issue #5824 Durable ConstraintMappings. #5842

Merged
merged 5 commits into from Jan 11, 2021

Conversation

janbartel
Copy link
Contributor

closes #5824

Ensure that ConstraintMappings that are added to the ConstraintSecurityHandler before the context starts are retained across restarts, but those that are added after the context is starting (eg via annotations, web.xml/web-fragment.xml, javax.security api) are not.

Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
…dler start

Signed-off-by: Jan Bartel <janb@webtide.com>
@janbartel janbartel marked this pull request as ready for review December 29, 2020 15:15
@janbartel janbartel requested a review from gregw December 29, 2020 15:15
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

The PR introduces _durableMappings which is an alternative to constraintMappings when stopped, but a subset of _contrainMappings when started. I find this a little confusing and a bit different to our other durable collections which are always subsets.

I would prefer if the _constrainMappings was always updated and _durableMappings kept as a subset. Then on stop, it is just a matter of setting the _constrainMappings to be the same as the _durableMappings

return _constraintMappings;
else
//otherwise, we only have durables
return _durableConstraintMappings;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary? The _durableConstraintMappings is a subset of _constraintMappings, so isn't it always OK to return _constraintMappings?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see.... will comment more in request for change....

Jetty 9.4.36 automation moved this from In progress to Review in progress Dec 30, 2020
Signed-off-by: Jan Bartel <janb@webtide.com>
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

But tiny quibble... in the add and set methods can you do the same order of handling for _contraintMappings and then _durableMapping

Jetty 9.4.36 automation moved this from Review in progress to Reviewer approved Dec 30, 2020
Signed-off-by: Jan Bartel <janb@webtide.com>
@janbartel janbartel requested a review from gregw January 4, 2021 10:22
@janbartel janbartel merged commit 26ef233 into jetty-9.4.x Jan 11, 2021
Jetty 9.4.36 automation moved this from Reviewer approved to Done Jan 11, 2021
@joakime joakime deleted the jetty-9.4.x-5824-durable-constraintmappings branch February 1, 2021 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Build up of ConstraintMappings when stopping and starting WebAppContext
2 participants