How to add an edge encrypted attachment to a record using an Inbound REST web service callDescription<!-- div.margin{ padding: 10px 40px 5px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing: 8px; border-collapse: separate; } table.internalTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:0; } .sp td{ border-bottom: 1px solid; border-right: 1px solid; border-color:#E0E0E0; background-color: #ffffff; height: 20px; padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; } .sphr td{ border-right: 1px solid; border-bottom: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; height: 20px; } .title { color: #D1232B; font-weight:; font-size:25px; } .hd1{ color: #D1232B; font-weight:; font-size:18px; } .hd2{ color: #646464; font-weight:bold; font-size:16px; } .hd3{ color: #7a7a7a; font-weight:; font-size:16 px; text-decoration:; } <span id="CmCaReT"></span> .hd4{ color: #000000; font-weight:bold; font-size:14 px; text-decoration:; } --> Adding an edge encrypted attachment to a record using an inbound REST web service call Overview You can encrypt an attachment to a record using an Edge Encryption proxy using an inbound REST POST. By using the REST client Postman, a Chrome browser extension, you can post an attachment to the incident table. This may also be done using other REST clients. Add an edge encrypted attachment using an inbound REST web service call Create an Edge Encryption attachment configuration for the table the REST call makes an attachment to. In the following example, it is the incident table: Login to the instance using the Edge Proxy and elevate Roles to security_admin.Navigate to Edge Encryption Configuration > Encryption Configurations > Create New.Create a new record as follows: Table=Incident [incident]Type=AttachmentEncryption type = <as appropriate to your environment>Active = checkedSave In order for the instance to accept the attachment you must set this system property to false in the sys_properties table: Name = glide.security.use_csrf_token Type = true|false Value = false Otherwise you will see this in the node log when trying to post the attachment: 2017-04-06 14:51:43 (684) Default-thread-48 2882029C4FC2B2002BEDA9D18110C762 WARNING *** WARNING *** Attachment request received without valid CSRF token The Postman App and Postman Interceptor Extension need to be added to the Chrome browser. These can be found and added from the Chrome Web Store:From Chrome, navigate to Settings > Extensions > Postman.Select Details > Launch App.Set the action to be a POST and set the URL to point to the Edge Encryption hostname, port, and sys_attachment.do (for example, https://localhost:8092/sys_attachment.do).You do not need to set an authorization or any other settings.Select Body and Form-data, and create the following content: NameValueTypeContent-Type: multipart/form-data; boundary=---------------------------12296202189918688451571609901TextContent-Length23038Text-----------------------------12296202189918688451571609901 Textsysparm_sys_id6ef8cd2fdbf4f200d5cff2131f961927Text-----------------------------12296202189918688451571609901 Textsysparm_tableincidentText-----------------------------12296202189918688451571609901 TextattachFile<choose the attachment file, e.g. a file named myFile.txt>FilefilenamemyFile.txtText-----------------------------12296202189918688451571609901-- Text Notes: 12296202189918688451571609901 is arbitrary and used as the separator of the multipart form dataMaintain the same number of dashes (--------) as in the example for all linesThe value of Content-Length is arbitrarysysparm_sys_id is the sys_id of the record in the ServiceNow instance where the attachment is made, in this case a sys_id of an incident recordsysparm_table is the name of the table that corresponds to the sysparm_sys_id, i.e. the table that gets the attachment, in this case the incident table will get the attachment for the incident sys_id of 6ef8cd2fdbf4f200d5cff2131f961927attachFile is the actual file that you attach (which you will add to the REST request as loaded from a local file location)filename is the name of the attachment file stored on the instance From the upper right corner, select the Interceptor icon and set it to active.Following is the complete setting for Postman:To make the encrypted attachment, select Send from Postman. If this is successful, you should see 200 OK and the Response Body Attachment processed:To verify the attachment is not accessible when bypassing the Edge Encryption Proxy, log into the instance using the non-Edge Encryption proxy URL (for example, the normal https://<instance_name>.service-now.com) and go to the record where the attachment was made (for example, to the sysparm_table table and the sysparm_sys_id sys_id).Select the attachment.The following information is displayed:This indicates that the attachment is not accessible because it is encrypted and you are not accessing the record using the Edge Encryption proxy.To verify that the attachment is accessible using the Edge Encryption Proxy, log into the instance using the Edge Encryption proxy URL, and go to the record where the attachment was made (to the sysparm_table table and the sysparm_sys_id sys_id). When you select the attachment, you have the option to download:After downloading the file, ensure that the content is as expected and is not encrypted.