Commit Graph

23 Commits

Author SHA1 Message Date
Stan Silvert c595e3430e
Add access to full group tree. Fix access for members tab. Add missing (#19423)
props to Access object.
Fixes #17589
2023-03-31 15:11:13 -04:00
Sebastian Schuster 916cfbbaf1 13647 Added null checks and some comments/questions for discussions. Will be squashed later if accepted. 2022-08-22 09:34:12 -03:00
Sebastian Schuster 53472e097c 13647 fixed wrong feature flag for checking admin fine-grained authz 2022-08-22 09:34:12 -03:00
Michal Hajas d3b43a9f59 Make sure there is always Realm or ResourceServer when searching for authz entities
Closes #11817
2022-05-11 07:20:01 -03:00
Michal Hajas 99c06d1102
Authorization services refactoring
Closes: #10447 

* Prepare logical layer to distinguish between ResourceServer id and client.id
* Reorder Authz methods: For entities outside of Authz we use RealmModel as first parameter for each method, to be consistent with this we move ResourceServer to the first place for each method in authz
* Prepare Logical (Models/Adapters) layer for returning other models instead of ids
* Replace resourceServerId with resourceServer model in PermissionTicketStore
* Replace resourceServerId with resourceServer model in PolicyStore
* Replace resourceServerId with resourceServer model in ScopeStore
* Replace resourceServerId with resourceServer model in ResourceStore
* Fix PermissionTicketStore bug
* Fix NPEs in caching layer
* Replace primitive int with Integer for pagination parameters
2022-03-22 20:49:40 +01:00
Stian Thorgersen 2cb59e2503
KEYCLOAK-17844 Add option to disable authorization services to workaround issues with many clients 2021-05-27 22:28:56 +02:00
Clement Cureau 73378df52e [KEYCLOAK-11621] Allow user creation via group permissions (Admin API)
Problem:
Using fine-grained admin permissions on groups, it is not permitted to create new users
within a group.

Cause:
The POST /{realm}/users API does not check permission for each group part of the new
user representation

Solution:
- Change access logic for POST /{realm}/users to require MANAGE_MEMBERS and
MANAGE_MEMBERSHIP permissions on each of the incoming groups

Tests:
Manual API testing performed:
  1. admin user from master realm:
    - POST /{realm}/users without groups                  => HTTP 201 user created
    - POST /{realm}/users with groups                     => HTTP 201 user created
  2. user with MANAGE_MEMBERS & MANAGE_MEMBERSHIP permissions on group1
    - POST /{realm}/users without groups                  => HTTP 403 user NOT created
    - POST /{realm}/users with group1                     => HTTP 201 user created
    - POST /{realm}/users with group1 & group2            => HTTP 403 user NOT created
    - POST /{realm}/users with group1 & wrong group path  => HTTP 400 user NOT created
  3. user with MANAGE_MEMBERS permission on group1
    - POST /{realm}/users without groups                  => HTTP 403 user NOT created
    - POST /{realm}/users with group1                     => HTTP 403 user NOT created
    - POST /{realm}/users with group1 & group2            => HTTP 403 user NOT created
    - POST /{realm}/users with group1 & wrong group path  => HTTP 400 user NOT created
2020-09-10 12:26:55 -03:00
Martin Kanis 6a23eb19f5 KEYCLOAK-8166 2018-11-14 20:09:22 +01:00
Pedro Igor b4b3527df7 [KEYCLOAK-7950] - Fixes user pagination when using filtering users members of groups 2018-10-02 15:44:23 -03:00
Bill Burke 06762ba13d KEYCLOAK-5878 2017-11-20 17:03:28 -05:00
Gabriel Lavoie c1664478d9 KEYCLOAK-4858: Slow query performance for client with large data volume
- Changing RESOURCE_SERVER PK to the client ID.
- Changing FK on children of RESOURCE_SERVER.
- Use direct fetch of ResourceServer through ID/PK to avoid a lot of implicit Hibernate flush.
2017-09-06 09:55:53 -03:00
Bill Burke 16954fc370 fix 2017-08-10 14:58:09 -04:00
Bill Burke 41cdd9db70 KEYCLOAK-5268 2017-08-10 09:36:45 -04:00
Bill Burke fbeef3e75f manageMembership not deleted 2017-08-10 09:25:44 -04:00
Bill Burke 45eac1093d show permissions 2017-08-09 10:39:59 -04:00
Bill Burke 2fa55550f3 token exchange permissions 2017-08-09 10:04:14 -04:00
Bill Burke 28b3ef9aa9 admin console work 2017-06-26 11:40:32 -04:00
Bill Burke 52e40922bc removal 2017-06-21 17:42:57 -04:00
Bill Burke a994af9010 remove scope 2017-06-16 11:26:43 -04:00
Bill Burke 94528976d4 console work 2017-06-07 16:29:43 -04:00
Bill Burke 536a57a514 ui for permission reference 2017-06-05 19:52:51 -04:00
Bill Burke b9f7a43a72 group permissions 2017-06-01 20:16:35 -04:00
Bill Burke c3ea847b3e auth changes 2017-05-29 09:53:17 -04:00