About the components of the BIRT default encryption plug-in
The BIRT default encryption plug-in consists of the following main modules:
About acdefaultsecurity.jar
This JAR file contains the encryption classes. The default encryption plug-in also provides key generator classes that can create different encryption keys.
About encryption.properties
This file specifies the encryption settings. BIRT loads the encryption type, encryption algorithm, and encryption keys from the encryption.properties file to do the encryption. The file contains pre-generated default keys for each of the supported algorithms.
You define the following properties in the encryption.properties file:
Type of algorithm. Specify one of the two values, symmetric encryption or public encryption. The default type is symmetric encryption.
The name of the algorithm. You must specify the correct encryption type for each algorithm. For the symmetric encryption type, BIRT supports DES and DESede. For public encryption type, BIRT supports RSA.
In cryptography, a block cipher algorithm operates on blocks of fixed length, which are typically 64 or 128 bits. Because messages can be of any length, and because encrypting the same plaintext with the same key always produces the same output, block ciphers support several modes of operation to provide confidentiality for messages of arbitrary length. Table 2-4 shows all supported modes.
Table 2-4  
Cipher Block Chaining Mode, as defined in the National Institute of Standards and Technology (NIST) Federal Information Processing Standard (FIPS) PUB 81, ”DES Modes of Operation,” U.S. Department of Commerce, Dec 1980
Because a block cipher works on units of a fixed size, but messages come in a variety of lengths, some modes, for example CBC, require that the final block be padded before encryption. Several padding schemes exist. The supported paddings are shown in Table 2-5. All padding settings are applicable to all algorithms.
Optimal Asymmetric Encryption Padding (OAEP) is a padding scheme that is often used with RSA encryption.
The padding scheme described in RSA Laboratories, “PKCS #5: Password-Based Encryption Standard,” version 1.5, November 1993. This encryption padding is the default.
The padding scheme defined in the SSL Protocol Version 3.0, November 18, 1996, section
Actuate provides pre-generated keys for all algorithms.
Listing 2-1 shows the default contents of encryption.properties.
Listing 2-1  
#message symmetric encryption , public encryption.
type=symmetric encryption
#private encryption: DES(default), DESede
#public encryption: RSA
# NONE , CBC , CFB , ECB( default ) , OFB , PCBC
# NoPadding , OAEP , PKCS5Padding( default ) , SSL3Padding
#For key , support default key value for algorithm
#For DESede ,DES we only need to support private key
#private key value of DESede algorithm : 20b0020…
#private key value of DES algorithm: 527c2…
#for RSA algorithm, there is a key pair. You should support private-public key pair
#private key value of RSA algorithm: 30820…
#public key value of RSA algorithm: 30819…
#private key
#public key
META-INF/MANIFEST.MF is a text file that is included inside a JAR file to specify metadata about the file. Java’s default ClassLoader reads the attributes defined in MANIFEST.MF and appends the specified dependencies to its internal classpath.
The encryption plug-in ID is the value of the Bundle-SymbolicName property in the manifest file for the encryption plug-in. You need to change this property when you deploy multiple instances of the default encryption plug-in, as described later in this chapter.
Listing 2-2 shows the contents of the default MANIFEST.MF.
Listing 2-2  
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Actuate Default Security Plug-in
Bundle-SymbolicName: com.actuate.birt.model.defaultsecurity;singleton:=true
Bundle-Version: 11.0.1.<version>
Require-Bundle: org.eclipse.birt.report.model,
Export-Package: com.actuate.birt.model.defaultsecurity.api
Bundle-ClassPath: acdefaultsecurity.jar
Bundle-Vendor: Actuate Corporation
Eclipse-LazyStart: true
Bundle-Activator: com.actuate.birt.model.defaultsecurity.properties.SecurityPlugin
About plugin.xml
plugin.xml is the plug-in descriptor file. This file describes the plug-in to the Eclipse platform. The platform reads this file and uses the information to populate and update, as necessary, the registry of information that configures the whole platform.
The <plugin> tag defines the root element of the plug-in descriptor file. The <extension> element within the <plugin> element specifies the Eclipse extension point that this plug-in uses, org.eclipse.birt.report.model.encryptionHelper. This extension point requires a sub-element, <encryptionHelper>. This element uses the following attributes:
The qualified name of the class that implements the interface IEncryptionHelper. The default class name is com.actuate.birt.model.defaultsecurity.api.DefaultEncryptionHelper.
The unique internal name of the extension. The default extension name is jce.
Field indicating whether this encryption extension is the default for all encryptable properties. This property is valid only in a BIRT Report Designer environment. When an encryption plug-in sets the value of this attribute to true, the BIRT Report Designer uses this encryption method as the default to encrypt data. There is no default encryption mode in Java Components.
The encryption model that BIRT uses supports implementing and using several encryption algorithms. The default encryption plug-in is set as default using this isDefault attribute. If you implement several encryptionHelpers, set this attribute to true for only one of the implementations. If you implement multiple encryption algorithms and set isDefault to true to more than one instance, BIRT treats the first loaded encryption plug-in as the default algorithm.
Listing 2-3 shows the contents of the default encryption plug-in’s plugin.xml.
Listing 2-3  
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
    name="default encryption helper"
    <encryptionHelper class="com.actuate.birt.model.defaultsecurity.api.DefaultEncryptionHelper"
      extensionName="jce" isDefault="true" />

Additional Links:

Copyright Actuate Corporation 2012