CSRF Protect in processor

RatneshTSN
Giga Guru

Do anyone know, how to use in CSRF token in processor.

I have created processor & I want to explore *CSRF protect* option.

If I make it active, how it will be called, I am not finding any help in servicenow docs, or any online posts

Here is what I check or tried

1. Checked the sys_properties, it is true

find_real_file.png

2. Enable it on processor

find_real_file.png

3. Access it, getting 401, unauthorized

find_real_file.png

4. Without CSRF enable, its working fine

find_real_file.png

5. How I can pass CSRF token to the URL, first thing I want to understand where it is set in system & its working.

Any help would be great.

Thanks, in advance.

1 ACCEPTED SOLUTION

Hi Ratnesh,

Got it working. Here is the solution

pass the parameter 'sysparm_ck' in the url and use gs.getSessionToken() to set the value. if you are using the scoped application you should use the alternative of gs.getSessionToken() which you can find in the API section.

 

Something like

https://yourinstance.service-now.com/test?sysparm_ck=ef7694294f07230038663cb28110c7cfe7008b31e34a74257593facbc10c901510bca07f

View solution in original post

5 REPLIES 5

RatneshTSN
Giga Guru

  sergiu.panaite sachin.namjoshi pradeepksharma



Hello Sergiu/Sachin/Pradeep: Would you please help on this, I am stuck at this from long time.


Sergiu Panaite


That flag just tells the platform to use a CSRF token. The CSRF option comes from :



High Security Settings


Ravish Rawat
ServiceNow Employee
ServiceNow Employee

Any update on this. Facing the same issue

Sorry buddy, No, I did not get the answer.

If by -chance you get any please update here.

Many thanks.