<?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: Cannot configure CSRF origin server for Admin console post requests in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56680#M20501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then the only other option to explain the problem is that the values for your configuration of referer and origin patterns are incorrect. The values are supposed to be regex patterns, so characters like . and * have special meaning. The values I typically use for these properties look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;^https?://my\.host\.tld(?:$|/.+$)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;though quite often they are even more complex to deal with private / public access, e.g. access directly via Tomcat and access via a user-facing web server acting as a proxy. E.g. like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;^https?://(my\.host\.tld|(196\.168\.0\.13|localhost):8080)(?:$|/.+$)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2019 12:03:20 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2019-04-09T12:03:20Z</dc:date>
    <item>
      <title>Cannot configure CSRF origin server for Admin console post requests</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56674#M20495</link>
      <description>Hello,I have difficulties setting the CSRF policy to work with the admin console (for exemple, the workflow console when typing "help" for exemple"). I first encountered this problem with share and find out in the documentation to modify the share-config-custom.xml file. I did the change and it's wo</description>
      <pubDate>Tue, 19 Mar 2019 15:21:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56674#M20495</guid>
      <dc:creator>kevinoudot</dc:creator>
      <dc:date>2019-03-19T15:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot configure CSRF origin server for Admin console post requests</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56675#M20496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check&amp;nbsp;&lt;A class="link-titled" href="https://docs.alfresco.com/6.0/concepts/repository-csrf-policy.html" title="https://docs.alfresco.com/6.0/concepts/repository-csrf-policy.html" rel="nofollow noopener noreferrer"&gt;Cross-Site Request Forgery (CSRF) filters for repository | Alfresco Documentation&lt;/A&gt;&amp;nbsp; - the configuration for the Repository-tier CSRF has been simplified with Alfresco 6.0. You need to provide&amp;nbsp;valid regex-patterns for referrer and origin which cover both the public address with which users access Alfresco via the frontend proxy, and the local address, if some admin may be accessing&amp;nbsp;Tomcat directly. This also includes configuring the pattern for different protocols and ports, if there may be differences.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 20:38:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56675#M20496</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-03-20T20:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot configure CSRF origin server for Admin console post requests</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56676#M20497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thank you for your answer. I already tried something like that, but still it doesn't work.&lt;BR /&gt;I also tried to disable the CSRF filtering for testing. But setting "csrf.filter.enabled=false" in the alfresco-global.properties doesn't work. I still get "Possible CSRF attack" when sending the form from admin consoles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the error, the "&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 12px;"&gt;vs server &amp;amp; context: http://hostname:8080/ (string) or (regexp)" remains the same no matter what I configure in the .properties file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 12px;"&gt;Do you have any idea how to fix this please ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2019 13:59:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56676#M20497</guid>
      <dc:creator>kevinoudot</dc:creator>
      <dc:date>2019-03-27T13:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot configure CSRF origin server for Admin console post requests</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56677#M20498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Okay, it's weird but only this configuration in alfresco-global.properties seems to work :&lt;/P&gt;&lt;P&gt;# CSRF filter overrides&lt;BR /&gt;csrf.filter.enabled=false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I let it true, and add something like that :&lt;/P&gt;&lt;P&gt;# CSRF filter overrides&lt;BR /&gt;csrf.filter.enabled=true&lt;BR /&gt;csrf.filter.referer=https://mywensote.fr/*.&lt;BR /&gt;csrf.filter.referer.always=false&lt;BR /&gt;csrf.filter.origin=https://mywebsite.fr&lt;BR /&gt;csrf.filter.origin.always=false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not taken into account. The origin remains the machine name and not the DNS name ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, configuring this in the .properties file doesn't fix the CSRF policy with "alfresco share". To be able to use the forms (for login for example) in share, I still need to configure&amp;nbsp;&lt;EM&gt;alfresco/web-extension/share-config-custom.xml&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point, I don't understand the why it"s working with share with&amp;nbsp;alfresco/web-extension/share-config-custom.xml and why it needs to be "disabled" for the admin console. Moreover, I don't think it's secure then considering it's for admin console...&lt;/P&gt;&lt;P&gt;Is this a bug ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 10:40:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56677#M20498</guid>
      <dc:creator>kevinoudot</dc:creator>
      <dc:date>2019-03-29T10:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot configure CSRF origin server for Admin console post requests</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56678#M20499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Repository and Share are separate applications, and Share does not use alfresco-global.properties. That is the reason you have to separately configure CSRF in the share-config-custom.xml file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what is the problem in your case. Configuring Repository CSRF via alfresco-global.properties works perfectly in all Alfresco 6.x version I have worked with so far - Community and Enterprise, Docker-ified or plain Tomcat setups.&lt;/P&gt;&lt;P&gt;I don't know how you have set up your Alfresco installation, but I would first make sure that your alfresco-global.properties is actually being used / loaded. Change some other, non-CSRF configuration and see if that has any effect on a restart. Check catalina.properties in the Tomcat conf directory if it correctly includes the shared/classes folder in its shared.loader setting. Make sure that there are not environment variables or -D parameters passed to the Java application that could override your settings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2019 21:43:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56678#M20499</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-04-08T21:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot configure CSRF origin server for Admin console post requests</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56679#M20500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, now I understand clearly how share works with properties and why the xml "share-config-custom" is not applied to all alfresco forms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless, I can confirm my alfresco-global.properties file is used and loaded fine. For exemple, changing the database connection information for example give me this message at the index of alfresco :&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;EM&gt;&lt;STRONG&gt;Cannot find Alfresco Repository on this server.&lt;/STRONG&gt;&amp;nbsp;(Does this application have access to alfresco-global.properties? Does this application have cross-context permissions?)&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;Moreover, using this line allow me to fix the problem with the form :&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;csrf.filter.enabled=false&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;Confirming again that the alfresco-global.properties file is loaded.&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;The problem is, when this filter is enabled (set to true), this is not taking into account the other CSRF filters :&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; padding: 0px;"&gt;csrf.filter.referer=&lt;/SPAN&gt;&lt;A href="https://mywensote.fr/*" rel="nofollow noopener noreferrer" style="color: #1e88e5; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://mywensote.fr/*&lt;/A&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;csrf.filter.referer.always=false&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; padding: 0px;"&gt;csrf.filter.origin=&lt;/SPAN&gt;&lt;A href="https://mywebsite.fr" rel="nofollow noopener noreferrer" style="color: #1e88e5; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://mywebsite.fr&lt;/A&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;csrf.filter.origin.always=false&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;It's only working when&amp;nbsp;&lt;EM&gt;csrf.filter.enabled&lt;/EM&gt; is set to false.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;There is no -D option in the java args nor environment variables to override this setting and the catalina shared.loader is well configured !&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;/P&gt;&lt;P style="color: #000000; padding: 0px 0px 0.333em;"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;thanks for your help !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2019 09:11:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56679#M20500</guid>
      <dc:creator>kevinoudot</dc:creator>
      <dc:date>2019-04-09T09:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot configure CSRF origin server for Admin console post requests</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56680#M20501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then the only other option to explain the problem is that the values for your configuration of referer and origin patterns are incorrect. The values are supposed to be regex patterns, so characters like . and * have special meaning. The values I typically use for these properties look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;^https?://my\.host\.tld(?:$|/.+$)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;though quite often they are even more complex to deal with private / public access, e.g. access directly via Tomcat and access via a user-facing web server acting as a proxy. E.g. like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;^https?://(my\.host\.tld|(196\.168\.0\.13|localhost):8080)(?:$|/.+$)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2019 12:03:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cannot-configure-csrf-origin-server-for-admin-console-post/m-p/56680#M20501</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-04-09T12:03:20Z</dc:date>
    </item>
  </channel>
</rss>

