Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to configure JasperReports Server 4.5.1, 4.7.1, 5.0.1 and CAS.


    akonkin
    • Features: User Authorization Version: v5.0.1, v4.7.1, v4.5.1 Product: JasperReports® Server

    In this article, I want to describe a very simple test environment that will allow you to configure and check how CAS and JasperReports Server work togeter to authenticate users. To configure this test environment, I used the information from the article on our community wiki, Integrating CAS with JasperReports Server, and the JasperReports Server v4.0 (4.0.0) External Authentication Cookbook.

    [toc]

    List of the software used to create the test environment:

    CAS authentication was tested with war file installers that listed below:

    1. jasperreports-server-4.5.1-bin
    2. jasperreports-server-4.7.1-bin
    3. jasperreports-server-5.0.1-bin

    Let's start and configure our test environment.

    1. Download JDK and extract it into the /opt folder. For simplicity create the symbolic link from jdk1.7.0_17 to java

      unzip_jdk_0.png.4f8451b3b9921f3f887931b904b40d27.png

    2. Define the JAVA_HOME variable and add java binaries to the system PATH variable

      define_java_variables_1.png.4f7983c020c2c3cb8c1d9e789638ca4d.png

    3. Use keytool utility to self-author a server certificate

      generate_certificate_2.png.0fc4b61c7d1b0b483c607260e5f66595.png

    4. The keytool command has been called under the root account, so .keystore file has been placed in the /root/ folder (/root/.keystore)

      location_of_the_keystore_file_3.png.cf939db1ea64eb0a8934693ed1972c11.png

    5. Rename cas from cas-server-webapp-3.4.5.war to cas.war

      rename_cas_5_0.png.35147369604705540ebbe38aafe19083.png

    6. Enable apache-tomcat gui administrator account.

      enable_tomcat_users_4.png.018437a0f0549569ba46925a02bd95d5.png

    7. Deploy and configure CAS:

      deploy_CAS_via_gui.png.879e3cf66b597dc6ff6354946b64b6c4.png

      cas_properties_file_path.png.d87030581750660ba8d41035a7b49166.png

      configure_cas_properties_file.png.13bad9eba8a2436878fd0cc4e8101d2c.png

      Below I quote the properties from the cas.properties file that should be changed from their default values:

      cas.securityContext.serviceProperties.service=https://castest:8443/cas/services/j_acegi_cas_security_check
      cas.securityContext.casProcessingFilterEntryPoint.loginUrl=https://castest:8443/cas/login
      cas.securityContext.casProxyTicketValidator.casValidate=https://castest:8443/cas/proxyValidate
      cas.securityContext.ticketValidator.casServerUrlPrefix=https://castest:8443/cas
      host.name=castest
      

      As I said above, you can reload CAS application from the apache-tomcat GUI manager by navigating to it's page and clicking the Reload link related to the CAS application

      reload_cas_feature_6.png.bb7c74d00b75ce0b6b9d977e0ac86a6e.png

    8. Enable ssl support in apache-tomcat

      configure_ssl_protocol_4_1.png.ad2cc24fed50de21afee294d75ae667e.png

    9. Configure Java trust to CAS certificate. This should be done in the setenv.sh(bat) file

      configure_java_to_trust_CAS_sertificate_4_2.png.6f518c78fed2eae86f9b0676fb5deb9f.png

    10. Below is shown a very simple default_master.properties file that has been used to deploy JasperReports Server into apache-tomcat.

      The files for v4.7.1 and v5.0.1 versions have the same settings that in this one.

      default_master_properties_file_sample_7.png.e0349c92d48c231ed7c486fd40dc164e.png

    11. Deploy the pre-configured war-file installation of JasperReports Server by executing:

      ./js-install
      

    from the buildomatic folder

    directory_structure_8.png.822da28b12fef02ba37d5a0e04e874e0.png

    copy_configuration_files_9.png.17473b6ec687fdfdddca36fe21bbe93c.png

    Restart apache-tomcat to apply the changes that have been done.

    jasper_url_10.png.6fcaf39c5186c863e841c0a1776ba637.png

    cas_auth_page_11.png.bdcce171bbbdd46e806577487d15b7ef.png

    cas_auth_page_12.png.50a1c349295326f0f97be2131dd2f29c.png

    jasper_reports_server_CAS_13.png.dec4d45127b19ce02be1401c5cd05fe9.png

    If you want to use 2 hosts to test JasperReports Server and CAS please follow the instruction on the picture below

    what_should_be_reconfigured_14.png.d70b1c751415f3afe2dd86e0b1ce25cb.png

    On the picture below is shown contents of the archive that has been attached to this article:

    contents_of_the_arcive_14.png.b46c45d63a59d094b627d89faa5eaa33.png

    Thats all. Thank you for your attention to this article :)

    Alex

    deploy_CAS_via_gui.png.593f29a27c9c095b15f62097cfa8ebd5.png

    configure_cas_properties_file.png.15bc86d6187ef2054ce192efc2ff875c.png

    reload_cas_feature_6.png.12ebcdd383690d0006388d92efa42f05.png

    configure_ssl_protocol_4_1.png.b7049e495bd8400bbeeb7ef9542e2905.png

    configure_java_to_trust_CAS_sertificate_4_2.png.e72b346e2deddaf8615825114c8ddd99.png

    default_master_properties_file_sample_7.png.a7eb3c65e9e651f177c89a763c8e5114.png

    copy_configuration_files_9.png.a72ff21ab66ac7f4d89b49ebd8a8fe18.png

    jasper_url_10.png.16f39e587bacc8aee58193847e3595db.png

    cas_auth_page_11.png.2996cb19a2c7ad0a912a739c52597c1a.png

    cas_auth_page_12.png.c885c41d2468ca3a3ebd5399fb3029a9.png

    jasper_reports_server_CAS_13.png.8acee62b98b6b47391ade1806ec7468e.png

    what_should_be_reconfigured_14.png.c446b885e214d09813c3ce8ef03e3e66.png

    contents_of_the_arcive_14.png.2df22a680cb2242179d49cf0e458ae7b.png

    jasper_reports_server_451_471_501_cas.tar.gz

    jasper_reports_server_451_471_501_cas.zip


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...