<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Alfresco 5 community edition CSRF error when using load balancer in AWS in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105715#M29895</link>
    <description>&lt;P&gt;If loadbalancer is configured to use https, you should check and setup https configs. The error might be due to that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is a doc:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/tasks/configure-ssl-prod.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/tasks/configure-ssl-prod.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can also try disabling the CSRF, add the following in share config and try again:&lt;/P&gt;
&lt;PRE&gt; &amp;lt;config evaluator="string-compare" condition="CSRFPolicy" replace="true"&amp;gt;
        &amp;lt;filter/&amp;gt;
&amp;lt;/config&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;you can also disable CSRF via alfresco-global.properties by adding following property:&lt;/P&gt;
&lt;PRE&gt;csrf.filter.enabled=false&lt;/PRE&gt;
&lt;P&gt;You can find the documentation about CSRF here:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/concepts/csrf-policy.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/csrf-policy.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Nov 2020 16:41:04 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2020-11-13T16:41:04Z</dc:date>
    <item>
      <title>Alfresco 5 community edition CSRF error when using load balancer in AWS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105714#M29894</link>
      <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;We are having an issue with Alfresco 5 community edition and CSRF protection. We are trying to deploy Alfresco into AWS where a load balancer is forwarding the traffic to Alfresco.&lt;/P&gt;&lt;P&gt;As you can see from this error the issue seems to be that we are using https when connecting to the load balancer and alfresco is configured to use http.&lt;/P&gt;&lt;PRE&gt;javax.servlet.ServletException: Possible CSRF attack noted when asserting referer header 'https://ourdomain/alfresco/s/admin/admin-nodebrowser'. Request: POST /alfresco/s/admin/admin-nodebrowser, FAILED TEST: Assert referer POST /alfresco/s/admin/admin-nodebrowser :: referer: 'https://ourdomain/alfresco/s/admin/admin-nodebrowser' vs server &amp;amp; context: http://ourdomain/ (string) or  (regexp)&lt;/PRE&gt;&lt;P&gt;I found this file which contains some configurations related to CSRF (web-scripts-config-custom.xml)&lt;/P&gt;&lt;PRE&gt;&amp;lt;alfresco-config&amp;gt;&lt;BR /&gt;    &amp;lt;config evaluator="string-compare" condition="CSRFPolicy"&amp;gt;
        &amp;lt;filter&amp;gt;
            &amp;lt;rule&amp;gt;
                &amp;lt;request&amp;gt;
                    &amp;lt;method&amp;gt;GET&amp;lt;/method&amp;gt;
                    &amp;lt;path&amp;gt;/service/admin/.*&amp;lt;/path&amp;gt;
                &amp;lt;/request&amp;gt;
                &amp;lt;action name="generateToken"&amp;gt;
                    &amp;lt;param name="session"&amp;gt;{token}&amp;lt;/param&amp;gt;
                    &amp;lt;param name="cookie"&amp;gt;{token}&amp;lt;/param&amp;gt;
                &amp;lt;/action&amp;gt;
            &amp;lt;/rule&amp;gt;
            &amp;lt;rule&amp;gt;
                &amp;lt;request&amp;gt;
                    &amp;lt;method&amp;gt;GET&amp;lt;/method&amp;gt;
                    &amp;lt;path&amp;gt;/s/admin/.*&amp;lt;/path&amp;gt;
                &amp;lt;/request&amp;gt;
                &amp;lt;action name="generateToken"&amp;gt;
                    &amp;lt;param name="session"&amp;gt;{token}&amp;lt;/param&amp;gt;
                    &amp;lt;param name="cookie"&amp;gt;{token}&amp;lt;/param&amp;gt;
                &amp;lt;/action&amp;gt;
            &amp;lt;/rule&amp;gt;
        &amp;lt;/filter&amp;gt;
    &amp;lt;/config&amp;gt;
&amp;lt;/alfresco-config&amp;gt;&lt;/PRE&gt;&lt;P&gt;So my question is that can I configure Alfresco to ignore the difference between http and https or should I rather just try to configure Alfresco to use https? (I am not sure how to approach the https solution, should the load balancer and alfresco use the same certificate?)&lt;/P&gt;&lt;P&gt;If there is any more information I can give or if I didn't explain this well enought please let me know.&lt;/P&gt;&lt;P&gt;(also sorry if this is the wrong forum section, I wasn't able to find any description what should go where)&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 14:54:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105714#M29894</guid>
      <dc:creator>samis</dc:creator>
      <dc:date>2020-11-11T14:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 5 community edition CSRF error when using load balancer in AWS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105715#M29895</link>
      <description>&lt;P&gt;If loadbalancer is configured to use https, you should check and setup https configs. The error might be due to that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is a doc:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/tasks/configure-ssl-prod.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/tasks/configure-ssl-prod.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can also try disabling the CSRF, add the following in share config and try again:&lt;/P&gt;
&lt;PRE&gt; &amp;lt;config evaluator="string-compare" condition="CSRFPolicy" replace="true"&amp;gt;
        &amp;lt;filter/&amp;gt;
&amp;lt;/config&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;you can also disable CSRF via alfresco-global.properties by adding following property:&lt;/P&gt;
&lt;PRE&gt;csrf.filter.enabled=false&lt;/PRE&gt;
&lt;P&gt;You can find the documentation about CSRF here:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/concepts/csrf-policy.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/csrf-policy.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 16:41:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105715#M29895</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-11-13T16:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 5 community edition CSRF error when using load balancer in AWS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105716#M29896</link>
      <description>&lt;P&gt;Thanks for the reply!&lt;/P&gt;&lt;P&gt;I started by going throught the ssl article and configuring our aws load balancer according to this article&amp;nbsp;&lt;A href="https://aws.amazon.com/premiumsupport/knowledge-center/elb-redirect-http-to-https-using-alb/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://aws.amazon.com/premiumsupport/knowledge-center/elb-redirect-http-to-https-using-alb/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Unfortunately that didn't make any difference, we were still using Alfresco via https, and going to the node browser gave the same error.&lt;/P&gt;&lt;P&gt;Adding&amp;nbsp;csrf.filter.enabled=false to our alfresco-global.properties didn't do anything, but adding the xml you suggested into the&amp;nbsp;&lt;SPAN&gt;web-scripts-config-custom.xml&amp;nbsp;&lt;/SPAN&gt;file did disable the CSRF checks and our systems are now working.&lt;/P&gt;&lt;P&gt;I will leave it disabled for now as the aws version is not live yet, but I might need to return to this later after we evaluate if the CSRF protection is necessary.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 13:37:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105716#M29896</guid>
      <dc:creator>samis</dc:creator>
      <dc:date>2020-11-17T13:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 5 community edition CSRF error when using load balancer in AWS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105717#M29897</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/82888"&gt;@samis&lt;/A&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the reply!&lt;/P&gt;
&lt;P&gt;I started by going throught the ssl article and configuring our aws load balancer according to this article&amp;nbsp;&lt;A href="https://aws.amazon.com/premiumsupport/knowledge-center/elb-redirect-http-to-https-using-alb/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://aws.amazon.com/premiumsupport/knowledge-center/elb-redirect-http-to-https-using-alb/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Unfortunately that didn't make any difference, we were still using Alfresco via https, and going to the node browser gave the same error.&lt;/P&gt;
&lt;P&gt;Adding&amp;nbsp;csrf.filter.enabled=false to our alfresco-global.properties didn't do anything, but adding the xml you suggested into the&amp;nbsp;&lt;SPAN&gt;web-scripts-config-custom.xml&amp;nbsp;&lt;/SPAN&gt;file did disable the CSRF checks and our systems are now working.&lt;/P&gt;

&lt;P&gt;I will leave it disabled for now as the aws version is not live yet, but I might need to return to this later after we evaluate if the CSRF protection is necessary.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did you configured the steps given in &lt;A href="https://docs.alfresco.com/5.2/tasks/configure-ssl-prod.html" target="_self" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt; documentation to configure SSL on alfresco/share hosts?&lt;/P&gt;
&lt;P&gt;Check the step5 which has instructions about some properties that needs to be set.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 14:33:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105717#M29897</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-11-17T14:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 5 community edition CSRF error when using load balancer in AWS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105718#M29898</link>
      <description>&lt;P&gt;Yeah we have made those configurations in step 5, and I think they allow us to use Alfresco via https (it seems to work fine otherwise except for the CSRF error). We set these properties to alfresco via JAVA_OPTS.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;alfresco&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;context&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;alfresco
alfresco&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;host&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=ourdomain.com&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;alfresco&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;port&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;443&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;alfresco&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;protocol&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;https
share&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;context&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;share
share&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;host&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=ourdomain.com&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;share&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;port&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;443&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;share&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;protocol&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;https
opencmis&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;context&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;override&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;false&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;opencmis&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;context&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;value&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;opencmis&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;servletpath&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;override&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;false&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;opencmis&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;servletpath&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;value&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;opencmis&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;server&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;override&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;true&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;opencmis&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;server&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;value&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;https&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="com"&gt;//ourdomain.com&lt;BR /&gt;aos.baseUrlOverwrite=https://ourdomain.com/alfresco/aos&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;edit: fixed line breaks in code block&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 08:15:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-5-community-edition-csrf-error-when-using-load-balancer/m-p/105718#M29898</guid>
      <dc:creator>samis</dc:creator>
      <dc:date>2020-11-18T08:15:43Z</dc:date>
    </item>
  </channel>
</rss>

