Deadbolt does support multiple deadbolt route modifier tags for one route, which all have to pass to process the route (meaning it's AND and ignores the deadbolt.java.constraint-mode config). See #96.
We might want to implement an OR mode as well.
However that should be a different config than deadbolt.java.constraint-mode because
- before using route modifier tags we were using comments and back than only one comment was allowed (meaning there was no
AND mode back then as well of course). Therefore we also don't need
something like PROCESS_FIRST_CONSTRAINT_ONLY but only AND and OR.
- to be able to control annotations and filter differently. Maybe someone want's to
OR the filter constraints but AND the annotation constraints.
Same here, we could add AND and OR mode. Right now you can not even add multiple constraints for one route...
What needs to be done is:
In AuthorizedRoute change the constraint field to be a List:
private final List<FilterFunction> constraints;
and maybe even add a mode field to be even able to set a different mode for each route:
and of course add a mode config in reference.conf which defines the default for all routes. (Maybe share/use the same config like DeadboltRouteModifierTagsFilter above uses?)
For
DeadboltRouteModifierTagsFilterDeadbolt does support multiple deadbolt route modifier tags for one route, which all have to pass to process the route (meaning it's
ANDand ignores thedeadbolt.java.constraint-modeconfig). See #96.We might want to implement an
ORmode as well.However that should be a different config than
deadbolt.java.constraint-modebecauseANDmode back then as well of course). Therefore we also don't needsomething like
PROCESS_FIRST_CONSTRAINT_ONLYbut onlyANDandOR.ORthe filter constraints butANDthe annotation constraints.For
DeadboltRoutePathFilterSame here, we could add
ANDandORmode. Right now you can not even add multiple constraints for one route...What needs to be done is:
In
AuthorizedRoutechange theconstraintfield to be aList:and maybe even add a
modefield to be even able to set a different mode for each route:and of course add a mode config in
reference.confwhich defines the default for all routes. (Maybe share/use the same config likeDeadboltRouteModifierTagsFilterabove uses?)