How to Disable CSRF token.json in AEM 6.5 | Community
Skip to main content
October 19, 2020
Solved

How to Disable CSRF token.json in AEM 6.5

  • October 19, 2020
  • 1 reply
  • 4369 views

I need to disable the CSRF token.json call in every page load. In developer console, network tab token.json is getting generated which needs to be stopped. Please find the below screenshot for the same:

I have tried making changes in dispatcher.any by changing "allow" to "deny"

/0013 { /type "allow" /method "GET" /url '/libs/granite/csrf/token.json' /extension 'json' }

 

And also, I have tried the config change by adding /content path in exclude filter at http://localhost:4504/system/console/configMgr/com.adobe.granite.csrf.impl.CSRFFilter 

 

Referrence URL: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/disable-csrf-on-aem-6-3/td-p/325503


Still I am unable to stop the token.json call, Could anyone please help me on how to disable the same.

Thanks in advance!
@arunpatidar @kautuk_sahni @theo_pendle @vijayalakshmi_s @vanegi @briankasingli 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by vanegi

Hi @Sudeshna1992,

Please check this post https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/disable-csrf-on-aem-6-3/td-p/325503

 

It is not a recommendation to remove the token.json call as this token.json call is used to prevent CSRF attacks and removing this would lead to a major security risk. Please refer to the documentation at [1].

 

If you still want to remove the call, you need to remove all dependencies to "granite.jquery" in the code.

 

[1] https://helpx.adobe.com/ca/experience-manager/6-3/sites/developing/using/csrf-protection.html

[2] https://helpx.adobe.com/experience-manager/6-5/forms/using/admin-help/preventing-csrf-attacks.html

[3] https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/configuring-d...

 

Thanks!!

1 reply

vanegi
Adobe Employee
vanegiAdobe EmployeeAccepted solution
Adobe Employee
October 19, 2020

Hi @Sudeshna1992,

Please check this post https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/disable-csrf-on-aem-6-3/td-p/325503

 

It is not a recommendation to remove the token.json call as this token.json call is used to prevent CSRF attacks and removing this would lead to a major security risk. Please refer to the documentation at [1].

 

If you still want to remove the call, you need to remove all dependencies to "granite.jquery" in the code.

 

[1] https://helpx.adobe.com/ca/experience-manager/6-3/sites/developing/using/csrf-protection.html

[2] https://helpx.adobe.com/experience-manager/6-5/forms/using/admin-help/preventing-csrf-attacks.html

[3] https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/configuring-d...

 

Thanks!!