Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-10915

calling getUser via the userAccessor returns null

XMLWordPrintable

      A customer with a custom ConfluenceAuthenticator (based on the Soulwing CAS Authenticatory is reporting that their method calls for getUser in the userAccessor class are returning null.

      The result is odd, because the behaviour of the authenticator is to:

      1. Check whether or not they exist in Confluence
      2. Create the user account via userAcessor.addUser
      3. Check the user account just created.

      The user has been added, and saved in Confluence's database yet the subsequent call to check if the user exists returns a null. However, if the server is bounced, the getUser query is successful

      What looked to be caused by not using the userAccessor.saveUser, but implementing this method did not resolve the issue.
      After reviewing the customer's source code with Paul, we suspect this problem may be caused by a particular hibernate query failing to execute:

          <query name="atluser.user_findAllUserNames"><![CDATA[
              select user.name
              from DefaultHibernateUser user
              order by user.name
       ]]></query>
      

      Hibernate logs show null returned immediately after a user is added.

        1. UscmConfluenceCasAuthenticator.java
          2 kB
          Justin Sabelko
        2. tomcat_and_other_confluence_config_files.zip
          9 kB
          Justin Sabelko
        3. custom_code.zip
          54 kB
          Justin Sabelko
        4. ConfluenceCasAuthenticator.java
          6 kB
          Justin Sabelko
        5. confluence_confg_and_added_files.zip
          436 kB
          Justin Sabelko
        6. atlassian-confluence_with_hibernate_logging2.log
          7.27 MB
          Justin Sabelko
        7. atlassian-bucket-1.2-SNAPSHOT.jar
          137 kB
          Anatoli

            shaffenden Steve Haffenden (Inactive)
            ktran Kevin Tran [Atlassian]
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: