This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JForum and the fly likes Configure SSO and categories Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Configure SSO and categories" Watch "Configure SSO and categories" New topic
Author

Configure SSO and categories

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello everybody,

I have installed and configured JForum. It works fine using the default authentication method.

I have a user belonging to a group attached to one category. When I log in, using the default authentication method, I can enter and get the forums I am authorized to see.
It is perfect.

Since JForum will be called by another webapp, using a JDBCRealm authentication, I have set the authentication type to SSO and defined the security constraints into web.xml

Now I can login (say with username gilles), but once logged I cannot see the forums. I have only access to one general forum, but I have not access to the forums of my group. Again, this worked with the default authentication method. User gilles is defined with the users (I need that to tell to what group it belongs to).

Could you please tell me what I missed in the configuration. I do not want my users to have to sign in again.

I have the same problem with the Admin. I have defined an Admin user in my database so that I can authenticate using the Realm. I can log into Jforum but do not have access to the Administration panel.

Thank you for your help.

Gilles
[originally posted on jforum.net by gilducret]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Well,

Having progressed a bit on the subject. It is now like if it do not take into account the fact that I am logged to the other application.

I can enter the first application, enter the username and password. Then I jump to the forum and I am being asked to enter it again.

The opposite is true. If I first login to the forum I am asked to enter username and password. Then if I jump to the application I am beign asked to enter it again.

Here is my config:

In server.xml
<Realm className="org.apache.catalina.realm.JDBCRealm" name="LFRealm" <br /> debug="99" <br /> driverName="org.gjt.mm.mysql.Driver" <br /> connectionURL="jdbc:mysql://localhost/lf?user=jjj&password=kkk" <br /> connectionName="uuu" <br /> connectionPassword="jjj" <br /> userTable="user" <br /> userNameCol="userName" <br /> userCredCol="password" <br /> userRoleTable="role" <br /> roleNameCol="roleName" />

In the forum web.xml, I have just copied the security constraint I have in the other application:

<security-role>
<description>Administrateur du site Lettres Frontiere</description>
<role-name>administrator</role-name>
</security-role>
<security-role>
<description>Administrateur local</description>
<role-name>areaAdmin</role-name>
</security-role>

<security-role>
<description>RA</description>
<role-name>Rhone-Alpes</role-name>
</security-role>

<security-role>
<description>SR</description>
<role-name>Suisse-Romande</role-name>
</security-role>

<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted Area</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>

<auth-constraint>
<role-name>administrator</role-name>
<role-name>areaAdmin</role-name>
<role-name>Rhone-Alpes</role-name>
<role-name>Suisse-Romande</role-name>
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>FORM</auth-method>
<realm-name>LFRealm</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>

Many thanks for your help




[originally posted on jforum.net by gilducret]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Solved: I had to uncomment the SingleSignOn Valve in Tomcat server.xml file

Regards

Gilles
[originally posted on jforum.net by gilducret]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configure SSO and categories
 
Similar Threads
RemoteSSO?
SSO prohibits Registration,login for all - How admin can access Admin control panel
need help on hsqldb
Integration Question
Control Panel admin URL is missing