p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
https://phasetwo.io
Other
418 stars 72 forks source link

Adding keycloaks current filter options to api-endpoints #88

Closed paulwer closed 1 year ago

paulwer commented 1 year ago

Hey @xgp, would it be possible to add filter options like "q" f.ex. for the attribute based filtering to the existing api-endpoints?

It would be realy nice to have the same syntax of queriing data from your extensions, that from keycloak itself.

tank you very much.

xgp commented 1 year ago

Thanks for the suggestion. Not on our roadmap, but happy to take a PR.

paulwer commented 1 year ago

@xgp I am currently not that into java-development, but I would suggest looking at https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java to implement the missing fields. I think in the most cases just copy/paste is required.

phamann commented 1 year ago

Funnily enough, we also discovered the need for this functionality this week. So I've just submitted #93 to introduce the ability to seach for orgs based on their attrbutes using the same pattern as the user search: GET /:realm/orgs?q=foo:bar (like @paulwer suggested).

Hope this helps 😄

xgp commented 1 year ago

Thanks @phamann ! Will merge once we've run some other regression tests here.