JBoss Community

Configuring IdentityLoginModule in JBoss AS

created by Greg Allen in Beginner's Corner - View the full discussion

I have a web application that I am trying to access in JBoss using the IdentityLoginModule.  It seems like it should be straightforward, but I am having problems.

 

I have added the following <application-policy> in login-config.xml:

 

    <application-policy name="demo">
        <authentication>
            <login-module code="org.jboss.security.auth.spi.IdentityLoginModule"
                         flag="required">
                <module-option name="principal">bfranklin</module-option>
                <module-option name="roles">user</module-option>
            </login-module>
        </authentication>
    </application-policy>

 

From my understanding, any successful login with this policy should result in the user being logged in as the user "bfranklin".

 

Now I log into my application as "mtwain".  I would have expected the actual login to be "bfranklin" when the application main page loads, but it ends up being "mtwain". The application retrieves the logged in user via GetRemoteUser and displays it on that page. And it displays "mtwain".

 

I have confirmed that the getIdentity method is in fact returning "bfranklin".

 

Am I missing something here?  Is there somethine else that needs to be configured?

 

Thanks,

 

-- Greg

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community