roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joël Royer (JIRA) <j...@apache.org>
Subject [jira] Issue Comment Edited: (ROL-1805) Error "CustomUserRegistry:getUserDetailsFromAuthentication - Unsupported Principal type in Authentication"
Date Thu, 02 Apr 2009 16:01:13 GMT

    [ https://issues.apache.org/jira/browse/ROL-1805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695044#action_12695044
] 

Joël Royer edited comment on ROL-1805 at 4/2/09 8:59 AM:
---------------------------------------------------------

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?

      was (Author: jroyer):
    I get the source code and I saw this in class org.apache.roller.weblogger.ui.core.security.CustomUserRegistry:
{code}
        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;
        }
{code}

The variable oPrincipal is obtained via the method getPrincipal() from class org.acegisecurity.Authentication.
Is it possible that it is an Acegi's bug?
  
> Error "CustomUserRegistry:getUserDetailsFromAuthentication - Unsupported Principal type
in Authentication"
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ROL-1805
>                 URL: https://issues.apache.org/jira/browse/ROL-1805
>             Project: Roller
>          Issue Type: Bug
>          Components: Authentication, Roles and Access Controls
>    Affects Versions: 4.0.1
>         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 
>            Reporter: Joël Royer
>            Assignee: Roller Unassigned
>         Attachments: jroyer.ldif, security.xml
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message