jaasclient {
    // Login Module to use for the example jaasclient.

    //First, use a LoginModule for the authentication
    // Use the resource memrlm_1

    //By default it uses the server named 'jonas' to authenticate
    // to specify a different server name, use attribute 'serverName="myJonas"'
    org.objectweb.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
	;

	// The previous JResourceLoginModule was renamed to JDirectResourceLoginModule
	// You need to activate the registration of resources in jonas.properties file


    // Use the login module to propagate security to the JOnAS server
    // globalCtx is set to true in order to set the security context
    // for all the threads of the client container instead of only
    // on the current thread.
    // Useful with multithread applications (like Swing Clients)
    org.objectweb.jonas.security.auth.spi.ClientLoginModule  required
    globalCtx="true"
	;
};


jetty {
    // Login Module to use for the web container Jetty


    // Uncomment this if you want to check that the certificates
    // were not revocated by the Certification Authority
    //org.objectweb.jonas.security.auth.spi.CRLLoginModule required
    //CRLsResourceName="Directory"
    //CRLsDirectoryName="/home/jonas/CRLs"
    //;


    //LoginModule for the authentication
    //add parameter certCallback="true" if you want use certificate callback
    // Use the resource memrlm_1
    //By default it uses the server named 'jonas' to authenticate
    // to specify a different server name, use attribute 'serverName="myJonas"'
    org.objectweb.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
	;
};

tomcat {
    // Login Module to use for the web container Tomcat

    // Uncomment this if you want to check that the certificates
    // were not revocated by the Certification Authority
    //org.objectweb.jonas.security.auth.spi.CRLLoginModule required
    //CRLsResourceName="Directory"
    //CRLsDirectoryName="/home/jonas/CRLs"
    //;

    //LoginModule for the authentication
    //add parameter certCallback="true" if you want use certificate callback
    // Use the resource memrlm_1
    //By default it uses the server named 'jonas' to authenticate
    // to specify a different server name, use attribute 'serverName="myJonas"'

    //********************** Begin eXo configuration ********************** 
    //org.objectweb.jonas.security.auth.spi.JResourceLoginModule required
    //resourceName="memrlm_1"
    //;

    // Use the eXo Platform JAAS login module
    org.exoplatform.services.security.j2ee.JonasLoginModule required;
    
    // Authentication might be needed to invoke EJBs from a Context listener of
    // a Web Application. In that case, the JOnAS JAAS Realm is not used and the
    // security context information is not set. As a consequence it is needed to
    // use the Client Login Module which does that job. globalCtx is set to
    // false as the security context needs to be set in the current Thread only.
    org.objectweb.jonas.security.auth.spi.ClientLoginModule required
    globalCtx="false"
    ;
    //********************** End eXo configuration ********************** 
};

exo-domain {
    // Login Module to use for the web container Tomcat

    //********************** Begin eXo configuration ********************** 
    //the same configuration as above, just another name	
    // Use the eXo Platform JAAS login module
    org.exoplatform.services.security.j2ee.JonasLoginModule required;
    org.objectweb.jonas.security.auth.spi.ClientLoginModule required
    globalCtx="false"
    ;
    //********************** End eXo configuration ********************** 
};


test {
    // Login Module to use for the a client without setting for all threads the identity

    //LoginModule for the authentication
    //add parameter certCallback="true" if you want use certificate callback
    // Use the resource memrlm_1
    //By default it uses the server named 'jonas' to authenticate
    // to specify a different server name, use attribute 'serverName="myJonas"'
    org.objectweb.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
	;

    //Security propagation
    org.objectweb.jonas.security.auth.spi.ClientLoginModule  required;
};

bonita {
    // Use the resource dsrlm_1
    org.objectweb.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="dsrlm_1"
	;
    // Use the login module to propagate security to the JOnAS server
    org.objectweb.jonas.security.auth.spi.ClientLoginModule  required
	;
};

TestClient {
    // Use the resource dsrlm_1
    org.objectweb.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="dsrlm_1"
	;
    // Use the login module to propagate security to the JOnAS server
    org.objectweb.jonas.security.auth.spi.ClientLoginModule  required
	;
};

bonita-policy {
    org.objectweb.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="dsrlm_1"
	;
    // Use the login module to propagate security to the JOnAS server
    org.objectweb.jonas.security.auth.spi.ClientLoginModule  required
	;
};