my client looks like:
...
            char[] password = args[1].toCharArray();
            AppCallbackHandler handler = new AppCallbackHandler(name, password);
            LoginContext lc = new LoginContext("TestClient", handler);
            System.out.println("Created LoginContext");
            lc.login();
...

i want to use JaasServerLoginModule like it is described in the documentation.
I dont do any 
>System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
>        "org.jnp.interfaces.NamingContextFactory");

I have the feeling my jboss.xml is bad.I have added:
<jboss>
        <container-configurations>
                <container-configuration>
                        <container-name>Standard Stateless SessionBean</container-name>
                        <role-mapping-manager>java:/jaas/other</role-mapping-manager>
                        <authentication-module>java:/jaas/other</authentication-module>
                </container-configuration>
        </container-configurations>

        <enterprise-beans>
                <session>
                        <ejb-name>DialogJAAS</ejb-name>
                        <configuration-name>Standard Stateless 
SessionBean</configuration-name>
                </session>
        </enterprise-beans>
</jboss>

My auth.xml is:

...
// The default server login module
other {
    // A realistic server login module, which can be used when the number 
    // of users is relatively small. It uses two properties files:
    //   users.properties, which holds users (key) and their password (value).
    //   roles.properties, which holds users (key) and a comma-separated list of their 
roles (value).
    org.jboss.security.plugins.samples.JaasServerLoginModule required;

    // For database based authentication comment the line above,
    // uncomment the line below and adjust the parameters in quotes
    // Database server login module provides security manager only, no role mapping
    // org.jboss.security.plugins.DatabaseServerLoginModule required 
db="jdbc/DbJndiName" table="UserTable" name="UserNameColumn" 
password="UserPswColumn";
};
 
i have the feeling configurations are bad somewhere but i cant find where :)

D&D


On Mon, 5 Feb 2001 18:39:30 +0200, Alexander Klyubin wrote:

>Try this one:
>System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
>        "org.jnp.interfaces.NamingContextFactory");
>
>System.setProperty("java.naming.provider.url",
>        "YOUR_SERVER_HERE:1099");
>
>Alexander Klyubin
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Darius
>Davidavicius
>Sent: Monday, February 05, 2001 18:31
>To: jBoss
>Subject: RE: [jBoss-User] JAAS security, login mechanism
>
>
>Now i have another error home someone helps me :)
>
>If password is correct.
>client gets such log:
>
>Created LoginContext
>[JAASSecurity] User 'DDD' authenticated.
>javax.naming.NoInitialContextException: Need to specify class name in
>environment or system property, or as an applet parameter, or in an
>application resource
>file:  java.naming.factory.initial
>       at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:646)
>       at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
>       at
>javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)
>       at javax.naming.InitialContext.lookup(InitialContext.java:350)
>       at com.ls.dialog.ejb.dialogjaas.JAASClient.main(JAASClient.java:68)
>
>Thanks in advance
>D&D
>
>
>
>
>--
>--------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>List Help?:          [EMAIL PROTECTED]
>
>
>
>
>--
>--------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>List Help?:          [EMAIL PROTECTED]
>





--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to