Confluence Data Center

SAML Single Sign On is is tested with Confluence Data Center in the following environment.

Confluence-Nodes

The two Confluence-Nodes confluencedc01 and confluencedc02 are VMs running Debian 8 (Jessie) with Oracle Java version 1.8.0_66-b17.

The Confluence-version is 5.9.4, installed from the tgz-bundle.

The shared home-directory is shared using NFS.

server.xml is modified for the use behind a reverse proxy:

  1. <Server port="8000" shutdown="SHUTDOWN" debug="0">
  2. <Service name="Tomcat-Standalone">
  3. <!-- proxyName, proxyPort and scheme must be configured -->
  4. <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
  5. proxyName="confluencedc59.lab.inserve.local"
  6. proxyPort="443"
  7. scheme="https"
  8. maxThreads="200" minSpareThreads="10"
  9. enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
  10. protocol="org.apache.coyote.http11.Http11NioProtocol" />
  11. <Engine name="Standalone" defaultHost="localhost" debug="0">
  12. <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false">
  13. <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
  14. <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
  15. <Manager pathname="" />
  16. </Context>
  17. </Host>
  18. </Engine>
  19. </Service>
  20. </Server>

Confluence is started and stopped using this systemd-configuration under /etc/systemd/system/confluence594.service:

  1. [Unit]
  2. Description=Confluence 5.9.4
  3. After=network.target
  4. [Service]
  5. Type=simple
  6. User=confluence
  7. PIDFile=/opt/atlassian-confluence-5.9.4/confluence/work/catalina.pid
  8. ExecStart=/opt/atlassian-confluence-5.9.4/bin/start-confluence.sh -fg
  9. ExecStop=/opt/atlassian-confluence-5.9.4/bin/stop-confluence.sh
  10. [Install]
  11. WantedBy=multi-user.target

Database

PostgreSQL 9.4.3 is used as database running on host postgres01, a VM running Debian 8 (Jessie)

Load Balancer/Reverse Proxy

Apache 2.4.10 is used as reverse proxy/load balancer. It also runs on host postgres01. HTTPS is terminated on the reverse proxy.

This is the virtual host configuration:

  1. <VirtualHost *:443>
  2. ProxyRequests off
  3. #
  4. # confluence59.lab.inserve.local is set up as CNAME to postgres01 in the DNS
  5. #
  6. ServerName confluencedc59.lab.inserve.local
  7. #
  8. # Set a routeID-header. This is important to get sticky sessions: All requests from a client must
  9. # be served by the same Confluence node.
  10. # Without this header, WebSudo is not wirking and the SAMLSSO-Plugin caused redirection-loops between the Confluence nodes.
  11. #
  12. Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
  13. <Proxy balancer://confluencecluster>
  14. BalancerMember http://confluencedc01.lab.inserve.local:8090 route=confluencedc01
  15. BalancerMember http://confluencedc02.lab.inserve.local:8090 route=confluencedc02
  16. # Security "we aren't blocking anyone but this the place to make those changes
  17. Order Deny,Allow
  18. Deny from none
  19. Allow from all
  20. </Proxy>
  21. # Here's how to enable the load balancer's management UI if desired
  22. <Location /balancer-manager>
  23. SetHandler balancer-manager
  24. # You SHOULD CHANGE THIS to only allow trusted ips to use the manager
  25. Order deny,allow
  26. Allow from all
  27. </Location>
  28. # Don't reverse-proxy requests to the management UI
  29. ProxyPass /balancer-manager !
  30. # Reverse proxy all other requests to the Confluence cluster
  31. ProxyPass / balancer://confluencecluster/ stickysession=ROUTEID
  32. ProxyPassReverse / balancer://confluencecluster
  33. ProxyPreserveHost on
  34. SSLProxyEngine On
  35. SSLEngine on
  36. SSLCertificateFile /etc/ssl/localcerts/star.lab.inserve.local.pem
  37. SSLCertificateKeyFile /etc/ssl/localcerts/star.lab.inserve.local.key
  38. SSLCertificateChainFile /etc/ssl/localcerts/labca.pem
  39. ErrorLog ${APACHE_LOG_DIR}/error.log
  40. CustomLog ${APACHE_LOG_DIR}/access.log combined
  41. </VirtualHost>