<?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: Fresh install of alfresco: CSRF problem in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108301#M30444</link>
    <description>&lt;P&gt;You can generate an SSL HTTP Web Proxy with &lt;A href="https://github.com/Alfresco/alfresco-docker-installer" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-docker-installer&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Why don't you try that and compare it with your configuration?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 07:44:08 GMT</pubDate>
    <dc:creator>angelborroy</dc:creator>
    <dc:date>2020-04-02T07:44:08Z</dc:date>
    <item>
      <title>Fresh install of alfresco: CSRF problem</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108298#M30441</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to setup an alfresco on docker. All components seems to work. I have followed this compose file:&lt;BR /&gt;&lt;A href="https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And I used this project to add volumes informations&amp;nbsp;&lt;A href="https://github.com/Alfresco/alfresco-docker-installer" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-docker-installer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In front of this stack, I have setup a haproxy which is listening on HTTPS and serve the certificate. If I try to log in using the public url, I am redirected to an error. In the logs of alfresco-share I can see a CSRF problem:&lt;/P&gt;&lt;PRE&gt;2020-04-01 22:50:38,427  ERROR [alfresco.web.site] [http-nio-8080-exec-4] javax.servlet.ServletException: Possible CSRF attack noted when asserting referer header 'https://xxxxx/share/page/'. Request: POST /share/page/dologin, FAILED TEST: Assert referer POST /share/page/dologin :: referer: 'https://xxxxxx/share/page/' vs server &amp;amp; context: http://xxxx/ (string) or  (regexp)&lt;/PRE&gt;&lt;P&gt;If I try to log in directly on the tomcat, no problem.&lt;/P&gt;&lt;P&gt;How could I add a HTTPS connector to the share container ? The tomcat on share container is listening on HTTP/8080.&lt;BR /&gt;I can't find any configuration for docker over the internet.&lt;/P&gt;&lt;P&gt;My config:&lt;/P&gt;&lt;PRE&gt;share:
    image: alfresco/alfresco-share:6.2.0
    deploy:
      resources:
        limits:
          cpus: '1'
          memory: 1024M
        reservations:
          cpus: '0.5'
          memory: 1024M 
    environment:
      REPO_HOST: "alfresco"
      REPO_PORT: "8080"
      JAVA_OPTS: "
        -Xms896m
        -Xmx896m
        -Dalfresco.host=localhost
        -Dalfresco.port=8080
        -Dalfresco.context=alfresco
        -Dalfresco.protocol=http"
    ports:
      - 8080:8080
    volumes:
      - /data/logs/share:/usr/local/tomcat/logs&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 23:01:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108298#M30441</guid>
      <dc:creator>zerros</dc:creator>
      <dc:date>2020-04-01T23:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Fresh install of alfresco: CSRF problem</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108299#M30442</link>
      <description>&lt;P&gt;Check this &lt;A href="https://github.com/Alfresco/alfresco-docker-installer/blob/master/generators/app/templates/images/share/Dockerfile" target="_blank" rel="noopener nofollow noreferrer"&gt;dockerfile&lt;/A&gt; to know how alfresco docker installer deals with share https.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 05:43:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108299#M30442</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2020-04-02T05:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fresh install of alfresco: CSRF problem</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108300#M30443</link>
      <description>&lt;P&gt;Check this &lt;A href="https://github.com/Alfresco/alfresco-docker-installer/blob/master/generators/app/templates/images/share/Dockerfile" target="_blank" rel="noopener nofollow noreferrer"&gt;dockerfile&lt;/A&gt; to know how alfresco docker installer deals with https&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 05:46:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108300#M30443</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2020-04-02T05:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Fresh install of alfresco: CSRF problem</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108301#M30444</link>
      <description>&lt;P&gt;You can generate an SSL HTTP Web Proxy with &lt;A href="https://github.com/Alfresco/alfresco-docker-installer" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-docker-installer&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Why don't you try that and compare it with your configuration?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 07:44:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108301#M30444</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2020-04-02T07:44:08Z</dc:date>
    </item>
    <item>
      <title>found tRe: Fresh install of alfresco: CSRF problem</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108302#M30445</link>
      <description>&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/5487"&gt;@angelborroy&lt;/A&gt;&amp;nbsp;, no need to generate a new web-proxy on the docker if I already have one with ssl terminaison in a DMZ network.&lt;/P&gt;&lt;P&gt;I'd like to secure all communications betweend networks with SSL, but I can't find anyting how to enable an HTTPS connector on the share module with docker. I have done this manually for my first install (generate a keystore and add a new connector to tomcat). But how should I do this with docker ??&lt;/P&gt;&lt;P&gt;Found how to activate CSRF with docker:&lt;/P&gt;&lt;PRE&gt; share:
    image: alfresco/alfresco-share:6.2.0
    deploy:
      resources:
        limits:
          cpus: '1'
          memory: 1024M
        reservations:
          cpus: '0.5'
          memory: 1024M 
    environment:
&lt;STRONG&gt;      CSRF_FILTER_REFERER: "https://your.domain.com/.*"
      CSRF_FILTER_ORIGIN: "https://your.domain.com"&lt;/STRONG&gt;
      REPO_HOST: "alfresco"
      REPO_PORT: "8080"
      JAVA_OPTS: "
        -Xms896m
        -Xmx896m
        -Dalfresco.host=localhost
        -Dalfresco.port=8080
        -Dalfresco.context=alfresco
        -Dalfresco.protocol=http"
    ports:
      - 8080:8080
    volumes:
      - /data/logs/share:/usr/local/tomcat/logs&lt;/PRE&gt;&lt;P&gt;Automatically there is a script in te share image that verify one of these two variables exists and do the replacement in the correctfile before starting the share module. I've put the two values car it is not working with juste one filled.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 08:18:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/fresh-install-of-alfresco-csrf-problem/m-p/108302#M30445</guid>
      <dc:creator>zerros</dc:creator>
      <dc:date>2020-04-02T08:18:51Z</dc:date>
    </item>
  </channel>
</rss>

