Fisheye users get disabled after username change in LDAP
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
This workaround was tested by Atlassian on Fisheye versions 3.7.0, 3.8.0, and 3.8.1 only. We cannot provide support if the scripts are executed on other versions.
問題
Fisheye users get disabled after their username changes within LDAP, once one of the involved users logs in with the new username, Fisheye/Crucible creates a new account for it and the old one appears as deleted.
診断
Environment:
- Fisheye/ Crucible uses JIRA for user authentication and LDAP to synchronise users.
- Automatic synchronisation is active in Fisheye/Crucible
診断ステップ
Change the username in LDAP for one or more users (eg. username from uppercase to lowercase).
原因
Auto-add users into Fisheye is set to 'true' so, when the user connects for the first time with the new LDAP username Fisheye creates a new user for him.
回避策
The script provided modifies the Fisheye database content and is not intended as a best practice but only as a last resort. Please be aware that repeated use may prevent the correct behaviour of your instance.
One possible workaround is that you fix the situation directly in the Database following this procedure:
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
- Stop Fisheye/Crucible instance
Locate the ID of both the old user and new user in the database:
select new_user.cru_user_id, old_user.cru_user_id from cru_user old_user cross join cru_user new_user where old_user.cru_user_name = 'OLD_USER_NAME - to be modified' and new_user.cru_user_name = 'NEW_USER_NAME - to be removed'
Follow the procedure corresponding to the database you are using
- Start Fisheye/Crucible instance
Reindex Crucible
Administration > Crucible > Re-index
ソリューション
To prevent the problem the best practice is to follow some basic guidelines when it comes to renaming users in LDAP.
Renaming users when FishEye/Crucible is using external authentication