Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to Set User JNDI Data Source in JasperReports® Server Deployment With Encrypted Password


    Tom C
    • Features: JasperReports Server Version: v6.2 Product: JasperReports® Server

    Users can set "encrypt=true" in default_master.properties file to enable encryption of passwords that reside on the file system.

    Using this setting, users will be able to encrypt TIBCO JasperReports® Server repository and sample foodmart and sugercrm data source passwords in JasperReports Server JNDI resource context file when deploying JasperReports Server with WAR distribution.

    Please refer to "Password encryption" discussion in TIBCO JASPERREPORTS® SERVER INSTALLATION GUIDE RELEASE 6.2, CHAPTER 3 "INSTALLING THE WAR FILE DISTRIBUTION" for more information.

    Users can define their JNDI data source in the same META-INFcontext.xml file in JasperReports Server deployment, and use js-ant refresh-config script to generate obfuscated passwords with the same encryption as used in JasperReports Server installation. Users can follow the steps below to set the password encryption for their user defined data source in JasperReports Server:

    1. Add user data source JNDI resource definition to deployed JasperReports Server META-INFcontext.xml file using plain password;

    2. Restart server and test this user JNDI connection to make sure it works

    3. Stop server;

    4. Go to deployed JasperReports Server buildomaticbuild_confdefaultwebappMETA-INF directory, rename context.xml file to context.xml.org. File used here are for command line js-import and js-export utilities.

    5. Edit default_master.properties file under deployed JasperReports Server buildomatic directory, and set the following property settings:

      dbPassword={your datasource plain password}
      .....
      encrypt=true
      .....
      propsToEncrypt=dbPassword,sysPassword
      

      Please make sure to comment out "encrypt.done=true" if it exists in this file.

    6. Save the change;

    7. At the command prompt, run the following script under deployed JasperReports Server buildomatic folder:

      js-ant refresh-config
      

      This will generate an encrypted password from the plain password provided in dbPassword in step 5;

    8. Open default_master.properties file under deployed JasperReports Server buildomatic directory, copy the encrypted password from dbPassword property setting. For example:

      dbPassword=ENC-f190c61be3478ccf8ddb97a30f1ea3aaf121ea798026d406aaaab3f42e44b213-

      copy this string

      ENC-f190c61be3478ccf8ddb97a30f1ea3aaf121ea798026d406aaaab3f42e44b213-

      and paste to replace the plain password in JNDI resource definition deployed in JasperReports Server META-INFcontext.xml (refer to step 1);

    9. Go to deployed JasperReports Server buildomaticbuild_confdefaultwebappMETA-INF directory, delete "context.xml" file, and rename "context.xml.org" file to "context.xml";

    10. Restart server and test this users JNDI connection to verify it now uses encrypted password.


    TTC-20160331


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...