You can configure your connection to the database in one of two ways:
• | You can configure the connection during installation of JasperReports Server by configuring the external.jdbc.driverClassName, external.jdbc.url, external.jdbc.username, and/or external.jdbc.Password properties in default_master.properties. At this time, you can optionally choose to encrypt any of the LDAP connection parameters. This is the preferred method for setting the database connection parameters. See the JasperReports Server Administrator Guide for more information. |
• | If you have an existing JasperReports Server and cannot reinstall it for some reason, you can configure the connection properties directly in your sample-applicationContext-externalAuth-CAS-db-mt.xml file. In this case, the properties, including the password, cannot be encrypted. See Setting the Database Connection Parameters for more information. |
The following file gives an example of how to assign users to multiple organizations by integrating CAS with a JDBC database:
<js-install>/samples/externalAuth-sample-config/sample-applicationContext-externalAuth-CAS-db-mt.xml
This sample uses the detailsQuery property of the casJDBCUserDetailsService bean to extract tenantId from an external database using an appropriate SQL query. Note that the tenantId column name has to be returned by the SQL query in order for externalTenantSetupProcessor to catch and process it correctly. In cases where the external database column has a different name, cast the column name as tenantId, as in the following example:
Recommended Comments
There are no comments to display.