Invalid content type error when uploading attachments to change requests in RSA Identity Governance & Lifecycle 
2 years ago
Originally Published: 2020-01-22
Article Number
000043738
Applies To
RSA Product Set: RSA Identity Governance & Lifecycle
RSA Version/Condition: 7.1.0, 7.1.1
 
Issue
When uploading a file attachment to a change request in RSA Identity Governance & Lifecycle, the following error occurs and the upload fails:
 
Invalid Content Type

We have seen this problem with file extensions .msg, .eml, and .csv.

The following example illustrates the issue.
  1. In the RSA Identity Governance & Lifecycle user interface go to Requests > Requests and select any change request which is not in a Completed State.
  2. Under Attachments, click on the Choose File option and select an email (.msg file extension) to be uploaded.  
User-added image
 
  1. Click on Upload Attachment and notice the error message.
 
User-added image

 
Cause
This is a known issue reported in engineering ticket ACM-101510.
 
Resolution
The resolution to this issue requires a code fix (upgrade/patch) and the import of a mimetype.map file.
 

Step 1: Upgrade/Patch

Upgrade/patch to one of the following RSA Identity Governance & Lifecycle versions:
  • RSA Identity Governance & Lifecycle 7.1.1 P05
  • RSA Identity Governance & Lifecycle 7.2


Step 2: Upload a mimetype.map file:

After upgrading/patching RSA Identity Governance & Lifecycle, a mimetype.map file needs to be uploaded into RSA Identity Governance & Lifecycle.
  1. Download the attached mimetype.map file. The contents of the attached mimetype.map file are:
text/plain,application/octet-stream,application/x-sh
application/x-sql,application/octet-stream,text/plain
message/rfc822,application/octet-stream

NOTE: The contents of this file are not exhaustive. Additional MIME types may be needed to meet the requirements for your specific environment.

  1. In the RSA Identity Governance & Lifecycle user interface, go to Admin > User Interface > Files tab > and choose Mime Type from the drop down menu.
  2. Upload the mimetype.map file.
  3. Go back to your change request and upload the attachment that you were previously unable to upload.
  4. If you still encounter the error, the mimetype.map file needs to be modified. 
  5. To determine what additional MIME type(s) may be needed, follow these steps:
  1. Enable the com.aveksa.common.utils.FileUtils DEBUG flag in RSA Identity Governance & Lifecycle:
  1. In the user interface go to Admin > Diagnostics > Settings > Advanced (button on far right)
  2. Choose Group: com.aveksa
  3. Choose category: com.aveksa.common.utils.FileUtils
  4. Change the drop down next to the category from OFF to DEBUG
  5. Click OK to enable.
  1. Reproduce the error
  2. Search the  aveksaServer.log* file ($AVEKSA_HOME/wildfly/standalone/log/aveksaServer.log) for the phrase: 
mapping didn't have MimeType:
  1. The line of DEBUG code found from this search will contain the Content Type and MIME Type that need to be added to the mimetype.map file.
  2. Add this information to the mimetype.map file and upload the file again.
  3. Test the attachment upload.
  4. Repeat these DEBUG steps for each attachment that results in this error.

EXAMPLE:
 
After enabling DEBUG, your search for mapping didn't have MimeType: results in output similar to the following:
 
02/19/2020 14:07:52.749 DEBUG (default task-55) [com.aveksa.common.utils.FileUtils] 
OS calculated Content Type: text/x-comma-separated-values 
Browser provided MimeType: application/vnd.ms-excel
02/19/2020 14:07:52.749 DEBUG (default task-55) [com.aveksa.common.utils.FileUtils] 
OS calculated Content Type: text/x-comma-separated-values 
mapping didn't have MimeType: application/vnd.ms-excel

Add the Content Type and MimeType from the output to the mimetype.map file as follows:
 
text/plain,application/octet-stream,application/x-sh
application/x-sql,application/octet-stream,text/plain
message/rfc822,application/octet-stream
text/x-comma-separated-values,application/vnd.ms-excel

*Please refer to RSA Knowledge Base Article Artifacts to gather in RSA Identity Governance & Lifecycle to find the location of the aveksaServer.log file for your specific deployment if you are on a WildFly cluster or a non-WildFly platform.
 
Attachments
If the attachment does not open when clicked, please refresh the page and try again. You must be logged into view the file(s).