Creating a BIRT report that uses the default encryption
This section describes an example that shows how the entire mechanism works. This example uses BIRT Designer Professional to create a report design. The report design connects to a MySQL Enterprise database server using the user, root, and password, root, as shown in Figure 44‑1.
Figure 44‑1 Data source properties for the encryption example
The encryption model stores the encrypted value of the database password in the report design file. Along with the value, the model stores the encryptionID. In this way, it identifies the encryption mechanism used to encrypt the password, as shown in the <encrypted-property> element in the following code:
<oda-data-source extensionID="" name="Data Source" id="6">
<property name="odaDriverClass">
<property name="odaURL">
<property name="odaUser">root</property>
<encrypted-property name="odaPassword" encryptionID="jce">
BIRT iHub uses the encryptionID attribute of the <encrypted-property> element to identify the algorithm to decrypt the password. After using the algorithm on the value of <encrypted-property>, BIRT iHub connects to the database and generates the report.