This JAR file contains the encryption classes. The default encryption plug-in also provides key generator classes that can create different encryption keys.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.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 Propagating Cipher Block Chaining, as defined by Kerberos V4Because 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.
Table 2-5 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 5.2.3.2.Listing 2-1 shows the default contents of encryption.properties.
Listing 2-1 #for RSA algorithm, there is a key pair. You should support private-public key pairMETA-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 Bundle-SymbolicName: com.actuate.birt.model.defaultsecurity;singleton:=trueBundle-Activator: com.actuate.birt.model.defaultsecurity.properties.SecurityPluginplugin.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.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
|
|
Copyright Actuate Corporation 2012 |