Question & Answer
Question
Restricting file types (extentions) from being uploaded using COMPANY_FILE and IMPORT_CONTENT TRIRIGA properties
Cause
Need to avoid users from uploading certain file extensions due to security concerns.
Answer
Due to security concerns or specific business needs, customers might want to prevent their users from uploading specific file extensions (types) into IBM TRIRIGA.
IBM TRIRIGA can implement this by using restriction properties"COMPANY_FILE_" and "IMPORT_CONTENT_" (set in TRIRIGAweb.properties file) .
See that "COMPANY_FILE_" is related to restrictions for image files. whereas "IMPORT_CONTENT_" is related to restrictions for document files. For each restriction type, you can have a "_EXCUDE_" and "_INCLUDE_" set up.
You should use either "_EXCLUDE_" or "_INCLUDE_", but using both is not a good practice since you may have a conflict for the settings. Therefore if you use both, the "_INCLUDE_" property takes precedence. If neither of those properties is used, then file uploads are not restricted.
When using "_EXCLUDE_", that will be a looser restriction meaning you will be accepting uploads of all file extensions (types), except the ones listed for the "_EXCLUDE_" property.
When using "_INCLUDE_", that will be a tighter restriction meaning you will be only accepting uploads of the file extensions (types) listed for the "_INCLUDE_" property.
The available properties are listed on the TRIRIGAWEB.properties document page .
See below the available "COMPANY_FILE_" and "IMPORT_CONTENT_" properties on the TRIRIGAweb.properties file:
1. COMPANY_FILE_UPLOAD_EXCLUDE_EXTENSIONS=[Valid file extensions list]
Used for image uploads. Restricts file uploads of image files according to their file extensions. Separate the file extensions in the list with commas. All image file extensions will be allowed, except the ones listed.
Example: COMPANY_FILE_UPLOAD_EXCLUDE_EXTENSIONS=.tiff, .bmp
2. COMPANY_FILE_UPLOAD_INCLUDE_EXTENSIONS=[Valid file extensions list]
Used for image uploads. Restricts file uploads of image files according to their file extensions. Separate the file extensions in the list with commas. Only the image file extensions listed will be allowed.
Example: COMPANY_FILE_UPLOAD_INCLUDE_EXTENSIONS=.png, .bmp, .jpeg
3, IMPORT_CONTENT_EXCLUDE_EXTENSIONS=[Valid file extensions list]
Used for document uploads. Restricts file uploads according to their file extensions. Separate the file extensions in the list with commas. All document file extensions will be allowed, except the ones listed.
Example: IMPORT_CONTENT_EXCLUDE_EXTENSIONS=.exe, .js, .sh
4. IMPORT_CONTENT_INCLUDE_EXTENSIONS=[Valid file extensions list]
Used for document uploads. Restricts file uploads according to their file extensions. Separate the file extensions in the list with commas. Only the document file extensions listed will be allowed.
Example: IMPORT_CONTENT_INCLUDE_EXTENSIONS=.doc, .docx, .pdf
The change of those settings is not on-the-fly and need your servers (application & process servers / JVMs) to be restarted so that each respective TRIRIGAweb.properties file can be reloaded.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21962423