-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some users don't have a username in the RC database #5
Comments
Indeed, I could find a user in one of our DBs as well, using Before closing, I should check the impact |
Now I finally added some end to end testing, including a user without username. This is exactly, where the script crashed: https://ci.netzbegruenung.verdigado.net/repos/938/pipeline/504/9 Now I want to handle them in the script. The question is what to do with these users? Warn and skip would be my go-to. |
Maybe add a config option to choose what to do? One thing I could imagine might be useful is to just generate a username either a random string or somehow use the name? |
Would that be helpful for your use-case? And do your affected users have a |
I'll check on that, I guess we'll need to decide. |
We are using a keycloak for handling oauth and SSO login, so we could maybe fallback on the
|
As you can see we are still not sure exactly how to handle this case, but these are some of the considerations, I'll update here when we have made some decisions. Maybe we can just create a PR then with some of the options that we would like. |
Hmm, using emails and slicing them up, using just the local part seems a bit naive, as many assumptions about email are in general. What if there are duplicates, then, like Furthermore, our Use-Case is that LDAP or OIDC provides the synapse authentication based on the same login name. Slicing would not be helpful for that case, either. Using the whole email does not work either, as We could check if the |
@chagai95 I have the same case, and we are migrating with keycloak, so, I actually want to map keycloak username, and not rcUsername... look at: #10 (I actually did a lot of research to slice emails, normalise username in keycloak...find users with same username, how to avoid new user to create doubles... a big rabbit hole...) hope it helps! |
@pierreozoux would it be sufficient to use |
It is what I did :) In fact, I used a transformation on |
Ah, sorry. I missed that line and basically, where the attribute is coming from. 😅 I'll review #10 and see how to adapt it for general usage, thank you! |
I think this is probably a highly individual problem and it will be difficult to catch all cases in the migration script. In my opinion we should assume that we use one attribute for the migration and that it contains a valid value for all users, for example I think it would be best to simply update the MongoDB with the necessary attribute. As this is done right before the migration, it should not interfere with the RC operations (if it would be a problem at all even while RC is running). The sanitation of the MongDB could look like this (not tested):
And if different OIDC or SAML attributes are used in Rocket.Chat and Matrix to map the Keycloak users, it is easily possible to update the
You can enter whatever attribute you need to map in |
Thank you very much for the idea. We have connected RocketChat to Keycloak and therefore need the username from Keycloak as the username for Matrix. I have developed a script that processes the JSON files generated by |
I found 3 users in an old db we were using, but maybe there are more. Just wanted to mention this, but it was easy to exclude them, should I close this ticket?
The text was updated successfully, but these errors were encountered: