Hi all,
I am using JMeter (v2.9) to test performance of application based on Alfresco(v5.0.3).
I can not get cookie Alfresco-CSRF Token.
By viewing request in Firefox tools, Alfresco-CSRF Token is given in the Response Header in the request GET /share/page following the request POST /share/page/login.
We have in order :
1. request GET /share/page that sets cookies JSESSIONID; ROUTEECMID; ROUTESHAREID; ROUTESOLRID; CONTLB901
2. request POST /share/page/login that sets JSESSIONID; _alfTest; alfLogin; alfUsername3
3. request GET /share/page that uses in its header cookies : JSESSIONID; _alfTest; alfLogin; alfUsername3; ROUTEECMID; ROUTESHAREID; ROUTESOLRID; CONTLB901. And in its response header, there sould be possible to get Alfresco-CSRF Token.
But, despite sending all needed cookies in the request GET /share/page , there is no cookie Alfresco-CSRF received in the Response Header.
Thanks for your advices
Hi,
not sure if missed something in your description - the client, in your case jmeter, must have a mechanism to receive and store the cookies. Is your jmeter cookie manager enabled and have set CookieManager.save.cookies=true?
Did you follow articles that describe jmeters use in the context of CSRF protection (i.e. How to Load Test CSRF-Protected Web Sites | BlazeMeter )?
or tried to just turn off or configure the Alfresco CSRF protection temporarily? Cross-Site Request Forgery (CSRF) filters | Alfresco Documentation
Hi Martin,
In Jmeter, Cookie Manager is used. But unfortunaly, no cookie CSRF was present in response header. So no parsing was possible.
The problem was that 3 servers ECM, SHARE and SolR sent your own header and i got JSESSIONID cookie instead of CSRF cookie.
It was resolved by changing apache configuration.
The GET on /share/page should redirect you with a 302 response to the actual starting page, normally the user dashboard. The GET for the user dashboard should then provide you with the CSRF token, as these are generated on each page rendition request.
Sorry bothering you with the basic stuff, but it's sometimes hard to see how deep the analysis of the problem went before glad to hear you've got it working
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.