Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

Authorization services refactoring#10728

Merged
hmlnarik merged 10 commits intokeycloak:mainfrom
mhajas:10447-Authorization-services-primitives-cleanup
Mar 22, 2022
Merged

Authorization services refactoring#10728
hmlnarik merged 10 commits intokeycloak:mainfrom
mhajas:10447-Authorization-services-primitives-cleanup

Conversation

@mhajas
Copy link
Contributor

@mhajas mhajas commented Mar 14, 2022

This PR contains refactoring of Authz services interfaces.

The main changes:

  • Reordering method's parameters to have "owning/parent" entities (mostly ResourceServer or Resource) as the first parameter of each method (similarly as Realm for other entities)
  • Changing methods to use model objects instead of id reference for identifying searching options (e.g. changing String resourceServerId to ResourceServer resourceServer)
  • Using Integer objects for pagination instead of primitive ints

I tried to split the changes into more commits, but it may happen there are some conflicts between commits, for example, commit 1 may contain some changes removed by commit 3 and so on. Sorry for that.

Also, the first commit fe5417a contains changes that should be probably part of #10509. I used the changes for that issue as a base for the refactoring and then we realized it would be better to do the refactoring separately, however, removing that commit means a significant amount of time spent on resolving conflicts as changes done in that commit are in the same lines as other refactoring changes. So I decided to leave the changes in the interfaces/services/model in this PR and remove changes in Map storage. This means the code distinguishes between Client.id and ResourceServer.id, but it is always the same.

@vramik I will send this as a draft PR because I am not sure this is complete, if you find something is missing please let me know and I will add it.

@mhajas mhajas marked this pull request as draft March 14, 2022 08:17
@mhajas mhajas added area/authorization-services Indicates an issue on Authorization area kind/enhancement Categorizes a PR related to an enhancement area/storage Indicates an issue that touches storage (change in data layout or data manipulation) team/storage-sig labels Mar 14, 2022
@mhajas mhajas requested a review from vramik March 14, 2022 09:02
@hmlnarik hmlnarik marked this pull request as ready for review March 22, 2022 19:47
@hmlnarik hmlnarik merged commit 99c06d1 into keycloak:main Mar 22, 2022
@vramik vramik mentioned this pull request Mar 25, 2022
@mhajas mhajas deleted the 10447-Authorization-services-primitives-cleanup branch July 7, 2022 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/authorization-services Indicates an issue on Authorization area area/storage Indicates an issue that touches storage (change in data layout or data manipulation) kind/enhancement Categorizes a PR related to an enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants