[keycloak-dev] Improve search for a specific user in the admin console
Alexis Almeida
alexis.almeida at gmail.com
Sun Feb 3 11:34:38 EST 2019
Hi, Stan!
> Another approach for now would be to write a standalone java app that
> uses the keycloak-admin-client to find the user id.? Then it opens that
> user in the browser.? This way, you could use it with any keycloak server.
Thanks for your answer and your sugestion. I just think it is not
interesting to use two tools to operate the solution: the console itself
and another application just to get the user id.
Anyway, your suggestion gave me another idea and I got a workaround for the
problem by just changing the Admin Theme. I implemented the same filter
idea in the "admin/resources/js/controllers/users.js" file. It really is a
workaround but it makes me comfortable to wait for the new version of the
console.
Thanks
Aléxis
Date: Thu, 31 Jan 2019 07:46:43 -0500
> From: Stan Silvert <ssilvert at redhat.com>
> Subject: Re: [keycloak-dev] Improve search by a specific user in the
> admin console
> To: keycloak-dev at lists.jboss.org
> Message-ID: <c7809c72-348b-b984-f3e9-8c8714e4c31d at redhat.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> This has always been a sore spot.? I expect that we will address it when
> we rewrite the admin console, which is in the plan but we don't have a
> timeline yet.
>
> Another approach for now would be to write a standalone java app that
> uses the keycloak-admin-client to find the user id.? Then it opens that
> user in the browser.? This way, you could use it with any keycloak server.
>
> On 1/31/2019 7:21 AM, Alexis Almeida wrote:
> > Considering an instalation of Keycloak where there are 2mi (or more) of
> > users on user_entity table, search for a specific user on the console is
> a
> > stressing task if you do it several times a day. I think it should be
> > possible to do "direct" search by username.
> >
> > Today it is possible to search for a specific user by ID, by typing
> > id:xxxxxx in the search field in the console. IMO this feature could be
> > expanded, so someone could search for a specific user by username or by
> > email, like this: username:xxxxx or email:xxxxxx.
> >
> > I made this change on my local machine and the result was ok.
> >
> > private static final String SEARCH_USERNAME_PARAMETER = "username:";
> > private static final String SEARCH_EMAIL_PARAMETER = "email:";
> > .
> > .
> > .
> > } else if (search.startsWith(SEARCH_USERNAME_PARAMETER)) {
> > UserModel userModel =
> >
> session.users().getUserByUsername(search.substring(SEARCH_USERNAME_PARAMETER.length()).trim(),
> > realm);
> > if (userModel != null) {
> > userModels = Arrays.asList(userModel);
> > }
> > } else if (search.startsWith(SEARCH_EMAIL_PARAMETER)) {
> > UserModel userModel =
> >
> session.users().getUserByEmail(search.substring(SEARCH_EMAIL_PARAMETER.length()).trim(),
> > realm);
> > if (userModel != null) {
> > userModels = Arrays.asList(userModel);
> > }
> > } else {
> > _______________________________________________
> > keycloak-dev mailing list
> > keycloak-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
>
>
>
More information about the keycloak-dev
mailing list