Siteminder integartion Problem in 4.1

We are using the site minder authentication in confluence 4.1 now we are trying to use same in confluence 4.3.


we found couple of classes changed in the confluence4.3 for authentication
so that we are getting run time errors.

We are using below method:

if (existingSession != null && existingSession.getAttribute(DefaultAuthenticator.LOGGED_IN_KEY) != null)
        {
        	
        	log.info("in method 3");
       Principal loggedInUser= (Principal) existingSession.getAttribute(DefaultAuthenticator.LOGGED_IN_KEY);
            
            //log.info("{} is already logged in."+ loggedInUser.getName());
            return  loggedInUser;
        }

We are getting the ClassCastException

Cause

java.lang.ClassCastException: com.atlassian.confluence.user.SessionSafePrincipal cannot be cast to com.atlassian.user.User
    at com.atlassian.confluence.user.AuthenticatedUserThreadLocal.getUser(AuthenticatedUserThreadLocal.java:25)
Stack Trace:[hide]

java.lang.ClassCastException: com.atlassian.confluence.user.SessionSafePrincipal cannot be cast to com.atlassian.user.User
	at com.atlassian.confluence.user.AuthenticatedUserThreadLocal.getUser(AuthenticatedUserThreadLocal.java:25)
	at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:36)
	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:211)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98)
	at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:30)
	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	erInternal(GzipFilter.java:74)

2 answers

This widget could not be displayed.
Peter Koczan Atlassian Team Nov 21, 2012

Hi,

One of our customers ran into the same problem and published his findings on this answers thread. I suggest that you review it and see if the information there is useful for you.

Kind regards,

Peter

This widget could not be displayed.

Thank you peter.

How we will get all Active directory and Ldap users information from "UserDirectories"

what is the bean name we need to use.

private DirectoryManager getDirectoryManager()
    {
    	
        if (directoryManager == null)
            directoryManager = (DirectoryManager) ContainerManager.getInstance().getContainerContext().getComponent("directoryManager");
       // System.out.println("getDirectoryManager...2"+directoryManager);
        return directoryManager;
    }

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 9 hours ago in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

28 views 0 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you