Filter Streams: User matching issue between Keycloak/OIDC (johndoe) and Confluence XML (john.doe which becomes john_doe)

Hello,

I am currently migrating our content from Confluence to XWiki, and I am facing a user mapping / rights issue for historical content.

Context:

  • Our XWiki instance is connected to Keycloak via OIDC.

  • My current XWiki username (created via OIDC) is zoethivet (based on ${oidc.user.preferredUsername._clean._lowerCase}).

  • To import the data, I am using the Filter Streams Converter application (Confluence XML input stream → XWiki instance output stream).

  • After the import, the pages I historically modified in Confluence display “Modified by zoe_thivet” in XWiki, meaning I do not recover my original editing rights/ownership on them.

I looked into the Confluence XML export files and found how my user profile was stored originally:

<object class="ConfluenceUserImpl" package="com.atlassian.confluence.user">
<id name="key">000_the_key_000</id>
<property name="name">zoe.thivet</property>
<property name="lowerName">zoe.thivet</property>
<property name="email">zoe.thivet@whatever.com</property>
</object>

It seems the Filter Streams converter translated the Confluence <property name="name">zoe.thivet</property> into the XWiki user id zoe_thivet (replacing the dot with an underscore → I’ve noted, from reading past docs, that the dot is not allowed), creating a mismatch with my actual Keycloak-created profile (zoethivet).

What is the best way to handle this user reconciliation when using Filter Streams?

  • Is there an option or a script mapper I can inject into the Filter Streams pipeline to alter the author mapping during the import?

  • Or should I handle this post-import? (For example, can XWiki users have aliases?)

  • Or maybe shoud I just rework the XML file before uploading it in Filter Streams…

I’ve tried the “Change document user” extension, which comes handy, but I’m not sure it will cover all the cases. In particular, the rights on documents on which the user has never contributed. And the Confluence groups…

Thanks in advance.