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.
- In the RSA Identity Governance & Lifecycle user interface go to Requests > Requests and select any change request which is not in a Completed State.
- Under Attachments, click on the Choose File option and select an email (.msg file extension) to be uploaded.
Image description
- Click on Upload Attachment and notice the error message.
Image description
This is a known issue reported in engineering ticket ACM-101510.
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.
- 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.
- In the RSA Identity Governance & Lifecycle user interface, go to Admin > User Interface > Files tab > and choose Mime Type from the drop down menu.
- Upload the mimetype.map file.
- Go back to your change request and upload the attachment that you were previously unable to upload.
- If you still encounter the error, the mimetype.map file needs to be modified.
- To determine what additional MIME type(s) may be needed, follow these steps:
- Enable the com.aveksa.common.utils.FileUtils DEBUG flag in RSA Identity Governance & Lifecycle:
- In the user interface go to Admin > Diagnostics > Settings > Advanced (button on far right)
- Choose Group: com.aveksa
- Choose category: com.aveksa.common.utils.FileUtils
- Change the drop down next to the category from OFF to DEBUG
- Click OK to enable.
- Reproduce the error
- Search the aveksaServer.log* file ($AVEKSA_HOME/wildfly/standalone/log/aveksaServer.log) for the phrase:
mapping didn't have MimeType:
- 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.
- Add this information to the mimetype.map file and upload the file again.
- Test the attachment upload.
- 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.