Focal Point
[CLOSED] Sample of Java Servlet Filter inside of WebFOCUS web applcation

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5417051296

December 12, 2019, 10:36 PM
nox
[CLOSED] Sample of Java Servlet Filter inside of WebFOCUS web applcation
Hi,

Anyone have try using Custom SSO integration by using Servlet filter?
I read about WebFOCUS Manual on Security and Administration and in there mansion about "The best way to accomplish this sort of integration is through the deployment of a custom Java
servlet filter inside the WebFOCUS web application." any idea how to do this? and where exact that I need to deploy servlet into WebFOCUS?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS v8.2.06 , Windows
December 13, 2019, 10:53 AM
Wep5622
Not for SSO, but we do something of the sort for logging.

It boils down to:

package your.package.name;

import javax.servlet.*;
import javax.servlet.http.*;

public final class SSOFilter implements Filter
{
	...

	public void doFilter(
		ServletRequest request,
		ServletResponse response,
		FilterChain chain
	) throws ServletException, IOException
	{
		// Handle SSO
		// ...


		try {
			// Chain to the next filter
			chain.doFilter(httpRequest, httpResponse);
		}
		finally {
			// Do clean-up
		}
	}
}


You'll also need to add filter and filter-mapping entries to the WebFOCUSnn/webapps/webfocus/WEB-INF/web.xml file:
<filter>
<filter-name>SSOWrapper</filter-name>
<filter-class>your.package.name.SSOFilter</filter-class>
</filter>
...
<filter-mapping>
<filter-name>SSOWrapper</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


That's the gist of things. It's possible that you need to add the same filter to some of the other WebFOCUS webapps or that you need to apply it on a different url-pattern, hard to tell with what you told us.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
December 13, 2019, 12:11 PM
FP Mod Chuck
Nox

The servlet filter is a custom java program that can be contracted to be installed by IBI professional services. The documentation I have is very old and may be out of date, but I can send it to you just not the actual software as I don't have a current copy.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
December 15, 2019, 08:12 PM
nox
Thanks, it help a lot. So I just have to figure out how to implementing Servlet filter.
The situation what I encounter is that having user to login SSO portal first, after login successfully and then click a button to pass user's ID(username) to redirect to WebFOCUS with encrypted username. SSO is base on browser base development. Decryption is not our problem, the problem is how to auto sign-in?

Main objective is to allow user able to access WebFOCUS without typing username and Password again after done it at SSO.

Chunk you reach me with: gorazlee@yahoo.com


WebFOCUS v8.2.06 , Windows