I've installed confluence by using the docker container. For some reason firefox doesn't send an Origin HTTP header when invoking POST /rest/webResources/1.0/resources.

      Even when I try to add this header manually and resend the request, firefox is filtering this header, which results in a 403 response from the confluence server.

      Versions:

      I'm actually not sure if this is an CORS or a XSRF problem. I've found this kb article, which matches the behavior of my confluence installation, but there is no <meta name="referrer" content="none"> entry to remove, so it doesn't help.

        1. custom_html.png
          custom_html.png
          25 kB
        2. headers.png
          headers.png
          110 kB
        3. post_values.png
          post_values.png
          58 kB
        4. response.png
          response.png
          13 kB
        5. screenshot-1.png
          screenshot-1.png
          254 kB

            [CONFSERVER-42925] Confluence + Docker + Firefox = not usable

            Carl Moser added a comment -

            @Minh Tran

            A solution could be:

            • The download file (defined by CONFLUENCE_DOWNLOAD_URL) must contain a script, that modifies the server.xml as you described.
            • This script must use an environment variable which contains the correct URL of the server.
            • The environment variable can be set when running the docker container.

            Carl Moser added a comment - @Minh Tran A solution could be: The download file (defined by CONFLUENCE_DOWNLOAD_URL ) must contain a script, that modifies the server.xml as you described. This script must use an environment variable which contains the correct URL of the server. The environment variable can be set when running the docker container.

            Carl Moser added a comment -

            @Minh Tran

            your "solution" doesn't really helps. It's more like a workaround. I have to do this every time after updating confluence. This is not "docker style".

            Carl Moser added a comment - @Minh Tran your "solution" doesn't really helps. It's more like a workaround. I have to do this every time after updating confluence. This is not "docker style".

            Minh Tran added a comment -

            steve.ovens Currently we do not support other virtualisation besides Docker. Could you create a suggestion ticket with the detail?

            Minh Tran added a comment - steve.ovens Currently we do not support other virtualisation besides Docker. Could you create a suggestion ticket with the detail?

            stratus-ss added a comment - - edited

            So an OpenVZ (virtuoso) container is a bit different than a docker container. It functions much more like a VM than docker does. In this regard you have a base OS, that is a tar.gz file which is extracted, then you ssh into it and install your application as normal. In this case I followed the Atlassian guide for installation of Confluence with Postgresql.

            What specific details are you looking for?

            stratus-ss added a comment - - edited So an OpenVZ (virtuoso) container is a bit different than a docker container. It functions much more like a VM than docker does. In this regard you have a base OS, that is a tar.gz file which is extracted, then you ssh into it and install your application as normal. In this case I followed the Atlassian guide for installation of Confluence with Postgresql. What specific details are you looking for?

            Minh Tran added a comment -

            steve.ovens Could you please share the detail steps that you used to install the Confluence? That will be helpful to further troubleshoot

            Minh Tran added a comment - steve.ovens Could you please share the detail steps that you used to install the Confluence? That will be helpful to further troubleshoot

            I am using FF 47.0.1 on Linux and I still have the XSFR error when trying to drag a picture into a new document OR creating a document.

            I would be happy to provide additional information (other than the firebug reports above)

            This issue is definitely NOT resolved

            stratus-ss added a comment - I am using FF 47.0.1 on Linux and I still have the XSFR error when trying to drag a picture into a new document OR creating a document. I would be happy to provide additional information (other than the firebug reports above) This issue is definitely NOT resolved

            Minh Tran added a comment -

            carl.moser221263171: I tried to reproduce this one with Firefox 47.0.1 but there is no luck. I also tried with a custom domain as well.
            Please see the screenshot for more information

            For your question about how to add a host for confluence in docker, please see these steps for how to modify that:

            [14:26:36]/docker/confluence-server-home(master ✗)

            ➜ docker ps

            CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

            794b4b221919 atlassian/confluence-server "./bin/catalina.sh ru" 50 minutes ago Up 15 minutes 0.0.0.0:8090->8090/tcp confluence

            [14:26:48]/docker/confluence-server-home(master ✗)

            ➜ docker exec -it 794b4b221919 bash

            daemon@794b4b221919:/opt/atlassian/confluence$ cd conf/

            daemon@794b4b221919:/opt/atlassian/confluence/conf$ cat server.xml

            <?xml version="1.0"?>

            <Server port="8000" shutdown="SHUTDOWN">

            <Service name="Tomcat-Standalone">

            <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol"/>

            <Engine name="Standalone" defaultHost="localhost">

            <Host name="www.example.com" appBase="webapps" unpackWARs="true" autoDeploy="false">

            <Context path="" docBase="../confluence" reloadable="false" useHttpOnly="true">

            <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->

            <Manager pathname=""/>

            <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/>

            </Context>

            </Host>

            </Engine>

            <!--

            To run Confluence via HTTPS:

            * Uncomment the Connector below

            * Execute:

            %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)

            $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)

            with a password value of "changeit" for both the certificate and the keystore itself.

            * Restart and visit https://localhost:8443/

            For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS

            -->

            <!--

            <Connector port="8443" maxHttpHeaderSize="8192"

            maxThreads="150" minSpareThreads="25"

            protocol="org.apache.coyote.http11.Http11NioProtocol"

            enableLookups="false" disableUploadTimeout="true"

            acceptCount="100" scheme="https" secure="true"

            clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true"

            URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"/>

            -->

            </Service>

            </Server>

            daemon@794b4b221919:/opt/atlassian/confluence/conf$

            Then you could add / modify <host> in the server.xml

            Minh Tran added a comment - carl.moser221263171 : I tried to reproduce this one with Firefox 47.0.1 but there is no luck. I also tried with a custom domain as well. Please see the screenshot for more information For your question about how to add a host for confluence in docker, please see these steps for how to modify that: [14:26:36] /docker/confluence-server-home (master ✗) ➜ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 794b4b221919 atlassian/confluence-server "./bin/catalina.sh ru" 50 minutes ago Up 15 minutes 0.0.0.0:8090->8090/tcp confluence [14:26:48] /docker/confluence-server-home (master ✗) ➜ docker exec -it 794b4b221919 bash daemon@794b4b221919:/opt/atlassian/confluence$ cd conf/ daemon@794b4b221919:/opt/atlassian/confluence/conf$ cat server.xml <?xml version="1.0"?> <Server port="8000" shutdown="SHUTDOWN"> <Service name="Tomcat-Standalone"> <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol"/> <Engine name="Standalone" defaultHost="localhost"> <Host name="www.example.com" appBase="webapps" unpackWARs="true" autoDeploy="false"> <Context path="" docBase="../confluence" reloadable="false" useHttpOnly="true"> <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --> <Manager pathname=""/> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/> </Context> </Host> </Engine> <!-- To run Confluence via HTTPS: * Uncomment the Connector below * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of "changeit" for both the certificate and the keystore itself. * Restart and visit https://localhost:8443/ For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS --> <!-- <Connector port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" protocol="org.apache.coyote.http11.Http11NioProtocol" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true" URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"/> --> </Service> </Server> daemon@794b4b221919:/opt/atlassian/confluence/conf$ Then you could add / modify <host> in the server.xml

            stratus-ss added a comment -

            I am having the same problem with an OpenVZ container of confluence. Firefox has an issue but Chrome does not.

            Here is the firebug:



            And the administration panel showing that there is no custm html as per this link

            stratus-ss added a comment - I am having the same problem with an OpenVZ container of confluence. Firefox has an issue but Chrome does not. Here is the firebug: And the administration panel showing that there is no custm html as per this link

            Carl Moser added a comment - - edited

            In the logs I can found log entries like this:

            passesAdditionalBrowserChecks Additional XSRF checks failed for request:http://example.com/rest/webResources/1.0/resources , origin: null , referrer: https://example.com/dashboard.action , credentials in request: true , allowed via CORS: false – referer: https://example.com/dashboard.action | url: /rest/webResources/1.0/resources | userName: confadmin

            see https://confluence.atlassian.com/confkb/after-upgrading-confluence-you-are-unable-to-create-new-pages-or-spaces-785457379.html

            So finally this seems to be a configuration issue. But I can't find instructions how to modify the server.xml of a confuence docker container in a clean way.

            Carl Moser added a comment - - edited In the logs I can found log entries like this: passesAdditionalBrowserChecks Additional XSRF checks failed for request: http://example.com/rest/webResources/1.0/resources , origin: null , referrer: https://example.com/dashboard.action , credentials in request: true , allowed via CORS: false – referer: https://example.com/dashboard.action | url: /rest/webResources/1.0/resources | userName: confadmin see https://confluence.atlassian.com/confkb/after-upgrading-confluence-you-are-unable-to-create-new-pages-or-spaces-785457379.html So finally this seems to be a configuration issue. But I can't find instructions how to modify the server.xml of a confuence docker container in a clean way.

            Carl Moser added a comment -

            Do you get the issue when using a particular page or feature?

            Yes. Login is possible without problem but with the browser inspection tool I can see some 403 failed requests during the login, without visible issues. But when I try to create a new Space (direct after login), an empty white popup shows up with a loading indicator and nothing happens. By using the firefox inspection tool I can see the initial described 403 response.

            Carl Moser added a comment - Do you get the issue when using a particular page or feature ? Yes. Login is possible without problem but with the browser inspection tool I can see some 403 failed requests during the login, without visible issues. But when I try to create a new Space (direct after login), an empty white popup shows up with a loading indicator and nothing happens. By using the firefox inspection tool I can see the initial described 403 response.

              Unassigned Unassigned
              cef37a0919f2 Carl Moser
              Affected customers:
              1 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: