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.ow2.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.ow2.jonas.security.auth.spi.ClientLoginModule  required
    globalCtx="true"
    ;
};

jaas-jmx {
    // Use LoginModule for JMX authentication
    org.ow2.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
    ;

    // Use the login module to add tenantId in TenantContext
    // org.ow2.jonas.lib.tenant.loginmodule.TenantIdLoginModule required;
};

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.ow2.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.ow2.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.ow2.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.ow2.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
    ;
};

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.ow2.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
    ;

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

ask_remote {
    // Ask the remote side
    org.ow2.jonas.security.auth.spi.RemoteLoginModule required
    entryName="remote" providerURLs="rmi://localhost:1099, rmi://localhost:1979" serverName="jonas" serverNames="jonas,j1,j2,j3"
    ;

};


remote {
    // Do authentication and sign the Subject.
    org.ow2.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
    ;

    // Specify the keystore to use with the alias and the associated password used to get the private key.
    org.ow2.jonas.security.auth.spi.SignLoginModule required
    keystoreFile="/tmp/keystore" keystorePass="keystorepass" keyPass="keypass" alias="OW"
    ;

};

shelbie {
    org.ow2.jonas.security.auth.spi.JResourceLoginModule required
    resourceName="memrlm_1"
    ;
};
