Creating a second JasperReports Server authentication manager for use by iReport Designer

Table of Contents 


When using CAS for the server, you'll need to adjust the authentication procedure for web services, such as the iReport plug-in. If left as-is, then the iReport repository plug-in will fail to connect and result in a HTTP 401 error (which is the error code for unauthorized access).

The key is to create another authentication manager that doesn't go through the CAS authentication, and have the web service calls go through the second authentication manager. The first authentication manager, which deals with the usual web UI authentication, will stay enabled for CAS authentication.

The procedure below assumes that you've got the CAS authentication working, and now want to create a second authentication manager so that iReport can connect to the server repository.


Below you'll find the general procedure for putting it in place. The Spring configuration files we mention may differ slightly from version to version, and they are current as of version 4.5.1. In older versions, you may need to check which file contains the specific beans we mention below, but the procedure remains the same.

  • Stop the server
  • Modify the filterChainProxy bean found in applicationContext-security-web.xml, the /services entry:
  • modify ${bean.basicProcessingFilter} to basicProcessingFilter2
  • Create the basicProcessingFilter2 bean (also found in applicationContext-security-web.xml):
  • Make copy of basicProcessingFilter bean and rename to basicProcessingFilter2
  • make sure the class is set to
  • change the ref bean value from authenticationManager to authenticationManager2
  • Create authenticationManager2 bean
  • Edit the applicationContext-security.xml file
  • Copy from authenticationManager bean, rename authenticationManager2
  • Make sure it's set the class to
  • enable only the bean.daoAuthenticationProvider and anonymousAuthenticationProvider
  • Re-start the server
  • iReport properties should go to the usual services URL, for example: http://hostname:port/jasperserver-pro/services/repository