Repository navigation
Conversation
* Add new ClientRepresentation Co-authored-by: Peter Zaoral <pzaoral@redhat.com> Co-authored-by: Václav Muzikář <vmuzikar@redhat.com> Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Add APIs Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Add ApiModelMapper SPI Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Add MapStruct as default ApiModelMapper Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Add default APIs implementations Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Provide Service SPI and ClientService Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Add default Keycloak services and Client service Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Add ModelMapper to shared modules Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Implement Client service, add ServiceException class Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Use ClientService in Client REST API Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Update rest/admin-api/src/main/java/org/keycloak/admin/api/client/ClientsApi.java Co-authored-by: Václav Muzikář <vaclav@muzikari.cz> Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Fix ModelMapperSpi Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Use /admin/api/v2 as a root path Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Support latest API version by default Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Rename path param to comply with API spec Signed-off-by: Martin Bartoš <mabartos@redhat.com> --------- Signed-off-by: Martin Bartoš <mabartos@redhat.com> Co-authored-by: Peter Zaoral <pzaoral@redhat.com> Co-authored-by: Václav Muzikář <vmuzikar@redhat.com> Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
and adding a default to representation Signed-off-by: Steve Hawkins <shawkins@redhat.com>
* shows what patching logic should look like also shows basic field validation Signed-off-by: Steve Hawkins <shawkins@redhat.com> * updates based upon review comments Signed-off-by: Steve Hawkins <shawkins@redhat.com> --------- Signed-off-by: Steve Hawkins <shawkins@redhat.com>
* implementing json patch Signed-off-by: Steve Hawkins <shawkins@redhat.com> * adding zjsonpatch to the dist and adding basic tests Signed-off-by: Steve Hawkins <shawkins@redhat.com> --------- Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Signed-off-by: Václav Muzikář <vmuzikar@redhat.com>
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.cluster.GroupInvalidationClusterTest#crudWithFailover |
What fields would you not want to be searchable?
In situations where logical operations take place after filtering you have to be careful. Partial push-down of predicates means you can't also pushdown limit / offset, or grouping should that ever need to be supported. You could also consider having formal parameters for things that are indexed, rather than looking for them in the q parameter.
There is subtlety here. Reflection / toString may not capture the actual Jackson mapping. And it flattens the type model - everything is a string, which may be problematic for numerical values - especially floating point numbers or if we introduce greater than / less than. You could entertain simply supporting json path predicates on top of the result rather than a custom query syntax. Of course json path could be used for projection as well. |
|
Quite related to search is sort, do we have some discussion around that? |
|
I would like to see some research on different approaches in existing APIs (I mostly like GH search syntax, but..), as well as looking for if there is some existing libraries that can be useful rather than inventing/implementing our own. I'd also like to see some more concrete use-cases/examples; for example find me all clients that have at least one web-origin set, or all clients that do use a non-https redirect-uri. Expand the examples also to users, as that would have different use-cases. |
|
I don't like commenting/discussing this through a PR (as this PR could be closed and then discussions would be somewhat lost), would be better to use a discussion. |
266bb90 to
d207105
Compare
02245d9 to
17e8407
Compare
This PR is meant as a discussion with concrete example (hence not opening it just as a GH Discussion) of how querying could work, it is not meant as a final result (even just for the prototype).
The design choices made here are made with simplicity in mind, i.e. it does not itroduce arbitrary existing formats or libraries. This allows us to have full control over what expressions we support and what we don't support, while keeping the implementation relatively simple.
It captures two parts:
Query syntax
Uses a custom syntax inspired by GitHub APIs. We're making a few assumptions here to keep it simple which implies a few limitations.
field:valuefield1:value1 field2:value2field:"value with spaces and :colons"field.subfield:valuefield:[item1, item2]orfield:[key1:val1, key2:val2]phone, we could do something likeattrs:[phone].Additional limitations:
Alternatives
SCIM query syntax is an obvious candidate though there are a few considerations to make around that.
Resource filtering