[jboss-user] [Security & JAAS/JBoss] - Re: Deploying issue with SSO

nipunbatra do-not-reply at jboss.com
Wed Nov 1 18:34:52 EST 2006


Thanks for your response Sohil

As you suggested I removed the entry of provisioning but I am not getting Null Pointer Exception 



This is how my sso-cfg file looks like

<?xml version='1.0' encoding='ISO-8859-1'?>

<jboss-sso>
	<!-- 
		identity management related configuration, this is the LDAP based module
		Technically, this can be a provider that can integrate with thirdparty identity systems like SiteMinder etc
	-->
	<identity-management>
		
			
				
					jdbc:ldap://localhost:389/dc=jboss,dc=com?SEARCH_SCOPE:=subTreeScope&amp;secure:=false&amp;concat_atts:=true&amp;size_limit:=10000000
				
				cn=Admin,dc=jboss,dc=com
				jbossrocks
				jbosssso
				role
			
		
	</identity-management>
	
	
	<!-- sso processor for SingleSignOn, the default JBossSingleSignOn processor uses OpenSAML-1.0, 
	the next version of this processor will use the latest SAML specification 
	-->
	<sso-processor>
		
			http://sd1nbatracore.coremetrics.com:8080/federate/trust
		
	</sso-processor>
</jboss-sso>


And this is my class DemoLoginProvider

package com.coremetrics.sso;

import java.security.Principal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.jboss.security.idm.Identity;
import org.jboss.security.idm.IdentityException;
import org.jboss.security.idm.LoginProvider;

public class DemoLoginProvider implements LoginProvider  {
	
	private String id = null;
	
	public DemoLoginProvider(String id,Properties properties)
    {
        this.id = id;
    }
	
	
	
	public Identity read(Principal principal) throws IdentityException{
		return this.read(principal.getName());
	}
    public Identity read(String username) throws IdentityException{
    	Identity identity = new Identity();
    	identity.setFullName("Nick");
    	identity.setUserName("Nick");
    	return identity;
    }
    
    public boolean exists(Principal principal) throws IdentityException{
    	return this.exists(principal.getName());
    }
    public boolean exists(String username) throws IdentityException{
    	if(username.equals("Nick"))
    			return true;
    	else
    			return false;
    }
    
    public boolean login(Principal principal,byte[] password) throws IdentityException{
    	return this.login(principal.getName(),password);
    }
    public boolean login(String username,byte[] password) throws IdentityException{
    	if(username.equals("Nick")){
    		return true;
    	}
    	else{
    		return false;
    	}
    }
    
    public Collection readAllRoles() throws IdentityException{
    	List roleMap = new ArrayList();
    	return roleMap;
    }
    
    public String getId() throws IdentityException{
    	return this.id;
    }

}





Exception is


15:31:13,984 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
15:31:14,468 INFO  [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jbo
ss.net.sockets.DefaultSocketFactory at ad093076
15:31:18,390 ERROR [IdentityManager] org.jboss.security.idm.IdentityManager
java.lang.NullPointerException
        at org.jboss.security.idm.IdentityManager.loadProvisioningProviders(IdentityManager.java:286)
        at org.jboss.security.idm.IdentityManager.loadConfiguration(IdentityManager.java:239)
        at org.jboss.security.idm.IdentityManager.start(IdentityManager.java:193)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:960)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:428)
        at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy9.deploy(Unknown Source)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982491#3982491

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982491



More information about the jboss-user mailing list