[keycloak-dev] SingleFileExportProvider always tries to export users

Marek Posolda mposolda at redhat.com
Tue May 24 06:17:48 EDT 2016


The only reason is, that singleFile provided can have support just for 
some subset of usersExportStrategy options (REALM_FILE and SKIP). The 
others doesn't makes sense for singleFile provider as it always uses 
same file.

Originally the singleFile export/import provider was intended to be used 
just for small environments with small number of users, where you just 
quickly export everything into single file and you are good.
For environments with big number of users where more flexibility is 
needed, you would use either dir provider or zip provider (which was 
later removed because nobody was using it and it required additional 3rd 
party dependency). So the support for usersExportStrategy and also for 
"pagination" (limiting number of users in each transaction) was added 
just to those providers.

Feel free to create JIRA for support usersExportStrategy and pagination 
for singleFile provider.

Until we have it, you can use dir provider. Or is it something which 
blocks you from using dir provider?

Marek

On 23/05/16 07:20, Stian Thorgersen wrote:
> The usersExportStrategy as stated in the docs is only used by the dir 
> provider, hence why it's hard-coded in the single file export 
> provider. I can't see why it couldn't be supported though.
>
> Marek - is there any good reason why singlefileexport could support 
> skipping users?
>
> On 23 May 2016 at 03:28, Fabricio Milone 
> <fabricio.milone at shinetech.com <mailto:fabricio.milone at shinetech.com>> 
> wrote:
>
>     Hi devs,
>
>     I've been working with some realm configurations and today I
>     wanted to export all my work to a file so I tried to follow this:
>
>     http://keycloak.github.io/docs/userguide/keycloak-server/html/export-import.html
>
>     After some failed attempts due to my custom federator, I've
>     decided to SKIP users from the export using the SKIP property as
>     described in the documentation but it didn't work at all, so I've
>     checked the code that is performing the export action and found
>     that the usersExportStrategy is not being taken from the
>     configuration but it is just set to TRUE instead.
>
>     Look at the lines 65 and 83 in this file:
>
>     https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProvider.java
>
>     For now, I've just modified the code locally to get the
>     configuration correctly from the property I am passing at startup
>     (like MultipleStepsExportProvider.java is doing), but I would like
>     to contribute with a PR if necessary.
>
>     Is there any reason to not do this?
>
>     Thanks in advance.
>
>     Regards,
>     Fabricio
>
>     -- 
>     *Fabricio Milone*
>     Developer
>     *
>     *
>     *
>     Shine Consulting *
>
>     30/600 Bourke Street
>
>     Melbourne VIC 3000
>
>     T: 03 8488 9939
>
>     M: 04 3200 4006
>
>
>     www.shinetech.com <http://www.shinetech.com/>/*a*/ passion for
>     excellence
>
>
>     _______________________________________________
>     keycloak-dev mailing list
>     keycloak-dev at lists.jboss.org <mailto:keycloak-dev at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160524/b45a9339/attachment-0001.html 


More information about the keycloak-dev mailing list