Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-24919

Orphan data is left behind after removing LDAP directory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 4.3.4
    • None

      Steps needed to reproduce the problem:

      1. Create new LDAP User Directory.
      2. Sync it with LDAP server.
      3. Remove the created directory.
      4. Reviewing content of cwd_user or cwd_grup table disclose list of records created during the sync and left behind after the directory was deleted.

      Despite that at first it may look as an insignificant problem, for big LDAP repositories we may have possibly thousands of orphaned records.

      _Before:_
      mysql> select ID, directory_name from cwd_directory;
      +-------+-------------------------+
      | ID    | directory_name          |
      +-------+-------------------------+
      |     1 | JIRA Internal Directory |
      | 10001 | Active Directory server |
      +-------+-------------------------+
      2 rows in set (0.00 sec)
      

      After:

      mysql> select ID, directory_name from cwd_directory;
      +-------+-------------------------+
      | ID    | directory_name          |
      +-------+-------------------------+
      |     1 | JIRA Internal Directory |
      +-------+-------------------------+
      1 rows in set (0.00 sec)
      
      mysql> select group_name, directory_id from cwd_group where directory_id=10001;
      +-----------------------------------------+--------------+
      | group_name                              | directory_id |
      +-----------------------------------------+--------------+
      | jira-users                              |        10001 |
      | Enterprise Read-only Domain Controllers |        10001 |
      | Schema Admins                           |        10001 |
      | Distributed COM Users                   |        10001 |
      +-----------------------------------------+--------------+
      4 rows in set (0.00 sec)
      
      mysql> select user_name, directory_id from cwd_user where directory_id=10001;
      +---------------+--------------+
      | user_name     | directory_id |
      +---------------+--------------+
      | Guest         |        10001 |
      | krbtgt        |        10001 |
      | Administrator |        10001 |
      | jira          |        10001 |
      | jirauser      |        10001 |
      | testtest      |        10001 |
      +---------------+--------------+
      6 rows in set (0.00 sec)
      

            Unassigned Unassigned
            bdziedzic Bogdan Dziedzic [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: