feat: implement custom resolvers for custom auth over oauth2 #11053
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.
Resolves #11052
Describe changes proposed in this pull request:
SecurityMapper
no longer retrieves study groups, these have their own mapperSecurityRepository
now is parametrized by another generic object, that is given by the auth configuration to the repository if used. Such repository then decides whether it is able to be used in the current context. Newly, repository can be switched between withsecurity.repository.type
:SecurityMyBatisRepository
FullAccessResolver
There is included a
LsaaiOauth2DrivenResolver
that demonstrates the usage; I would like to remove this implementation as it is specially designed to work for my usecase. It can be used like this:I would like a discussion on whether this is a good design, or whether there are some issues (interaction with different flows, usage in different scenarios, over-complexity due the need to compile / build images yourself...). But IMHO this is a crucial feature if this app should be used in production systems - being able to customize authentication and authorization to your needs.
No new tests are necessary since this PR just modularizes the current behavior, so the current test suite should be sufficient.
Checks