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)
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; }
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.