Feat/fees only - #1265
Open
mandresy753 wants to merge 18 commits into
Open
Conversation
DyferHerioss
requested changes
Jul 16, 2026
DyferHerioss
left a comment
Collaborator
There was a problem hiding this comment.
Create a filter chain in the security config instead of using an annotation, because a filter in a security config is more explicit than an annotation and easier to maintain.
DyferHerioss
requested changes
Jul 22, 2026
Comment on lines
+24
to
+29
| @Order(1) | ||
| public SecurityFilterChain feesOnlyFilterChain(HttpSecurity http) throws Exception { | ||
| if (!feesOnly) { | ||
| http.securityMatcher(request -> false) | ||
| .authorizeHttpRequests(req -> req.anyRequest().denyAll()); | ||
| return http.build(); |
Author
There was a problem hiding this comment.
@Order(1) ensures this chain is evaluated first, so requests forbidden in feesOnly mode get blocked before the other chain (which accepts everything) can let them through.
Comment on lines
+72
to
73
| @Order(2) | ||
| public SecurityFilterChain configure(HttpSecurity httpSecurity) throws Exception { |
Collaborator
There was a problem hiding this comment.
the same here, why you use order ?
Author
There was a problem hiding this comment.
@order(2) ensures this chain is evaluated only after the feesOnly chain, so it only handles requests that aren't blocked by the feesOnly restrictions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groupe 20 :
Description
feesOnlyfeature to restrict access to specific endpoints when the application runs in fees-only mode.-The feature introduces access rules to allow fees-related operations, their required dependencies , and required public endpoints while blocking unrelated functionalities.
SecurityFilterChainconfiguration to make the rules more explicit and easier to maintain.Changes
feesOnlymode is enabledSecurityFilterChainMotivation
Provide a maintainable way to enable a restricted application mode where only fees-related features remain accessible.