-
Notifications
You must be signed in to change notification settings - Fork 122
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
Enhancing RequestMatcher building for the resource server configuration #3397
Comments
See implementation details in the PR description: #3398 |
Breaking changes: Generic REST add-on now requires explicit endpoints security configuration:
Studio issue: https://youtrack.jmix.io/issue/JST-5237 |
Tested on: Checked Url Providers and RequestMatcher Providers - Ok. |
Issue Description
Both the Authorization Server and OpenID Connect (OIDC) add-ons configure a resource server in their auto-configurations.
At the project level, URL patterns can be defined as "protected by this resource server" in the following ways:
AuthorizedUrlsProvider
interface.jmix.rest.authenticated-url-patterns
application property.Problems with the Current Implementation
Limited Functionality of
AuthorizedUrlsProvider
:AuthorizedUrlsProvider
only returns strings with URL patterns, limiting its ability to build complexRequestMatchers
(which can include HTTP methods, for example).Redundant Methods in
AuthorizedUrlsProvider
:AuthorizedUrlsProvider
has two methods:getAuthenticatedUrlPatterns
andgetAnonymousUrlPatterns
. In most cases, users only need thegetAuthenticatedUrlPatterns
method. ThegetAnonymousUrlPatterns
implementation is typically empty. Additionally, the interface nameAuthorizedUrlsProvider
does not imply that it configures anonymous URLs.Misplaced Property:
jmix.rest.authenticated-url-patterns
property is used by the Authorization Server and OIDC add-ons, but its property processor is located in the REST API module. This property only works if the REST API add-on is included. There is no way to configure access to endpoints using properties when you have just Authorization Server add-on in the project and don't have REST API add-on.Suggested Improvements
We should rework the way request matchers are configured for the resource server configuration:
Unified Request Matcher Configuration:
Support for Complex Request Matchers:
RequestMatchers
.The text was updated successfully, but these errors were encountered: