Creating an upload security adapter
The default security for iHub Visualization Platform client upload functionality checks a file’s type against the value of the UPLOAD_FILE_TYPE_LIST parameter in web.xml. The iHub Visualization Platform client upload security adapter provides additional external verification features for the file upload feature using a Java interface, com.actuate.iportal.security.IUploadSecurityAdapter.
Visualization Platform upload security adapter establishes an additional layer of logic to the existing Visualization Platform authentication, as shown in Figure 28‑2.
Figure 28‑2 Visualization Platform upload security system
If an upload security adapter is configured, iHub Visualization Platform client calls isFileTypeAllowed to check whether the file’s file type is allowed. If so, then it calls verifyFile to perform any additional verification steps. If either isFileTypeAllowed or verifyFile returns false, iHub Visualization Platform client displays an error message supplied by getErrorMessage, or a generic message if getErrorMessage returns null.
To create an upload security adapter, perform the following steps:
*Ensure that your application can access the necessary Java classes.
*Create a Java class that implements the upload security adapter interface.
*Deploy the upload security adapter class to iHub Visualization Platform client.