Apache Roller
  1. Apache Roller
  2. ROL-1805

Error "CustomUserRegistry:getUserDetailsFromAuthentication - Unsupported Principal type in Authentication"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: 4.0.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Apache Roller 4.0.1
      SGBD Oracle 9.2.0.8
      Apache Tomcat 5.5.27
      Java SE 1.5.0_17
      OpenDS 1.2.0
    • Browser Version:
      Firefox 3.0.8 / Internet Explorer 6.0
    • Database:
      Oracle 9.2.0.8
    • JDK Version:
      1.5.0_17
    • O/S Version:
      Windows XP SP2

      Description

      I want to use an ldap authentication with Roller 4.0.1.
      I tried to follow this tutorial: http://blogs.sun.com/treydrake/entry/opends_roller_integration

      When I tried to access to the register page, I've got this error in roller.log:
      WARN 2009-03-30 14:39:59,253 CustomUserRegistry:getUserDetailsFromAuthentication - Unsupported Principal type in Authentication. Skipping auto-registration.

      And the register page is not populated by ldap data.

      You'll find in attachment the ldif file for user creation in OpenDS and my security.xml.

      1. security.xml
        13 kB
        Joël Royer
      2. jroyer.ldif
        1 kB
        Joël Royer

        Activity

        Hide
        Glen Mazza added a comment -

        This JIRA is against Roller 4.0. LDAP was recently re-implemented in Roller trunk (which uses a much more recent version of Spring security) and was working fine during testing. Also the 5.0.4 (unreleased) LDAP implementation is also improved and should be immediately working or nearly so OOTB. Thanks anyway for the report.

        Show
        Glen Mazza added a comment - This JIRA is against Roller 4.0. LDAP was recently re-implemented in Roller trunk (which uses a much more recent version of Spring security) and was working fine during testing. Also the 5.0.4 (unreleased) LDAP implementation is also improved and should be immediately working or nearly so OOTB. Thanks anyway for the report.
        Hide
        Joël Royer added a comment - - edited

        I get the source code and I saw this in class org.apache.roller.weblogger.ui.core.security.CustomUserRegistry:
        --------------------------------------------------------------------------------------------------------------------------------------------------------
        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();

        if(authentication == null)

        { log.warn("No Authentication found in SecurityContextHolder."); return null; }

        Object oPrincipal = authentication.getPrincipal();

        if(oPrincipal == null)

        { log.warn("Principal is null. Skipping auto-registration."); return null; }

        if (!(oPrincipal instanceof UserDetails))

        { log.warn("Unsupported Principal type in Authentication. Skipping auto-registration."); return null; }

        --------------------------------------------------------------------------------------------------------------------------------------------------------

        The variable oPrincipal is obtained via the method getPrincipal() from class org.acegisecurity.Authentication. Is it possible that it is an Acegi's bug?

        Show
        Joël Royer added a comment - - edited I get the source code and I saw this in class org.apache.roller.weblogger.ui.core.security.CustomUserRegistry: -------------------------------------------------------------------------------------------------------------------------------------------------------- Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if(authentication == null) { log.warn("No Authentication found in SecurityContextHolder."); return null; } Object oPrincipal = authentication.getPrincipal(); if(oPrincipal == null) { log.warn("Principal is null. Skipping auto-registration."); return null; } if (!(oPrincipal instanceof UserDetails)) { log.warn("Unsupported Principal type in Authentication. Skipping auto-registration."); return null; } -------------------------------------------------------------------------------------------------------------------------------------------------------- The variable oPrincipal is obtained via the method getPrincipal() from class org.acegisecurity.Authentication. Is it possible that it is an Acegi's bug?

          People

          • Assignee:
            Roller Unassigned
            Reporter:
            Joël Royer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development