I have the same problem. Did you solve this one in the meantime? If yes, can you tell me how to fix it?
I further investigated this issue. It seems to me like this has something to do with using a custom principal in the custom login module.
If I override the commit()-method of AbstractServerLoginModule and only return true, JBoss Security Manager doesnt make use of my custom principal, but I can see the links for Dashboard and Logout on the top right corner.
Otherwise, if I do not override the commit()-method, my custom prinicpal is used by the Security Manager and I can access it in my portlet. But in this case, the Login-Link doesn't disappear.
Has anyone here had similar problems?
The problem is that the user has to exist in both my database/WS and the jboss-portal database. If it is so, everything works fine, my custom-login-module is called and i see the links on top of the page. Note that the user in the jboss DB just needs to have the same login (password and other info can be different). If you think about it, it makes sense as there are lots of things associated to that user that are jboss specific, as permissions, dashboard, pages, own portals... but it's still a pain.
The problem now is to keep the two databases synchronized. If inserting users through the jboss user management portlet, i thought I could override its WF jbp_identity_validation_approval_workflow (see identity-ui-configuration.xml) to call my Web Service to insert the user in my DB as well. I haven't gone so far yet, but if somebody has done it, please let me know!
I didn't override the commit method in my custom login.
if I unterstand the docs correctly, the synchronization of the two databases can be done by the SynchronizingLoginModule (at least for the JBoss part). It is described here: http://docs.jboss.com/jbportal/v2.6.4/referenceGuide/html/authentication.html#authentication.synchronizing_login_module
You can also turn off the Jboss IdentityModule in login-config.xml, or mark it as optional. Then you won't have to mess around with two databases (but I'm not sure what will happen to JBoss specific functions then).
I already tried logging in with a user that exists in the portal database as well as on the remote server I have to authenticate to, but it's still the same problem. But you said it worked out for you, so I will give it another try.