Confluence Server

Overview


Client -> IIS (ISAPI Proxy) -> Tomcat (Confluence)

  • IIS Proxy = boss1: wiki.admsrv.ohiou.edu site
  • Tomcat = boss5: confluence servlet.

Details


No Details Yet

Procedures


Fresh Install w/o Custom Auth

  • Download and extract the current war to a directory somewhere like:
    • E:/Program Files/confluence-2.6.0
  • Set the data directory by editing the confluence.home property in the file confluence/WEB-INF/classes/confluence-init.properties to:
    • confluence.home=E:/Program Files/confluence-2.6.0_data
  • Create an empty file named confluence.xml in the directory:
    • E:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/Catalina/localhost
  • Edit the above file, putting this in it:
<Context 
path="/confluence"
docBase="c:/applications/confluence-2.1.3/confluence"
debug="0"
reloadable="false">


</Context>

  • Put the database info into this file as well, similar to:
<Context 
path="/confluence"
docBase="c:/applications/confluence-2.1.3/confluence"
debug="0"
reloadable="false">


<Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
username="some user"
password="some password"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://some ip:3306/confluence?autoReconnect=true"
validationQuery="Select 1" />

</Context>

- In Mysql, Create the database confluence
- During start-up, select to
-- Connect via a Datasource
-- Datasource name: java:comp/env/jdbc/confluence

  • Put the DB Jar (mysql-connector-java-5.0.6-bin.jar) into:
    • confluence/WEB-INF/lib
  • Restart tomcat.
References

>>http://confluence.atlassian.com/display/DOC/Installing+the+Confluence+EAR-WAR+edition

The Upgrade

  • Download the current war from >>http://www.atlassian.com/software/confluence/ConfluenceDownloadCenter.jspa
  • Extract it to the confluence directory (outside of webapps). In our case E:/Program Files/confluence
  • Copy the custom jars from CONFLUENCE_HOME/WEB-INF/lib
      • ohio-shibcon-2.2.9.jar
      • mysql-connector-java-5.0.6-bin.jar (if needed
  • Copy the properties files from
    • CONFLUENCE_HOME/WEB-INF/classes
      • confluence-init.properties
      • seraph-config.xml
      • log4j.properties
  • Edit the confluence.xml to point to the new home
    • TOMCAT_HOME/conf.Catalina/localhost/confluence.xml
    • configure the JNDI resource
  • add this line to the ConfluenceActionSupport.properties file as in >>http://confluence.atlassian.com/x/issC
    • customusermanagement.tab.name=Manage Users
  • Extract the custom jars (if you have a space in the directory name
  • Config the mail server settings
    • name=OAK Mail Server, from=no-reply@wiki.admsrv.ohio.edu,prefix=[create confluence]

The Upgrade when going from scratch

  • sync users
  • set Attachment size to 25M
  • copy plug-ins from data folder

Links

>>http://confluence.atlassian.com/display/DOC/Upgrading+Confluence >>http://confluence.atlassian.com/display/CONFEXT/Custom+Space+User+Management+Plugin

Other

To create the datasource, edit the tomcat/conf/catalina/localhost… file with this info
<Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
username="yourusername"
password="yourpassword"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/confluence?autoReconnect=true"
validationQuery="Select 1" />

>>http://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat

Allen,

I've attached the jar file and config file necessary to use confluence w/shibboleth. I made some minor changes from what we have in production here, but everything should be OK.

Steps:

1) Create a user with your OAK ID (gattis) (can have any password). Make that user a confluence administrator.

2) Put the attached jar file in the confluence/WEB-INF/lib directory.

3) Edit the seraph-config.xml file in the confluence/WEB-INF/classes directory to look like the one I've attached. Change the ebs.finance… server with the server name of the server that confluence is on.

4) Front confluence with apache and protect all calls to confluence with shibboleth.

That should be it.

Let me know if you have any questions or run into any problems.

Thanks ~Don


- <security-config>
- <parameters>
- <init-param>
<param-name>login.url</param-name>
- <!-- <param-value>/login.action?os_destination=${originalurl}</param-value>
-->
<param-value>>>https://ebs.finance.ohiou.edu/confluence/dashboard.action</param-value>
</init-param>
- <init-param>
<param-name>link.login.url</param-name>
- <!-- <param-value>/login.action</param-value>
-->
<param-value>>>https://ebs.finance.ohiou.edu/confluence/dashboard.action</param-value>
</init-param>
- <init-param>
<param-name>cookie.encoding</param-name>
<param-value>cNf</param-value>
</init-param>
- <init-param>
<param-name>login.cookie.key</param-name>
<param-value>seraph.confluence</param-value>
</init-param>
- <!-- only basic authentication available
-->
- <init-param>
<param-name>authentication.type</param-name>
<param-value>os_authType</param-value>
</init-param>
</parameters>
<rolemapper class="com.atlassian.confluence.security.ConfluenceRoleMapper" />
<controller class="com.atlassian.confluence.setup.seraph.ConfluenceSecurityController" />
- <!-- <authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/>
-->
<authenticator class="edu.ohio.confluence.auth.ShibbolethAuthentication" />
- <services>
- <service class="com.atlassian.seraph.service.PathService">
- <init-param>
<param-name>config.file</param-name>
<param-value>seraph-paths.xml</param-value>
</init-param>
</service>
</services>
- <interceptors>
<interceptor name="login-logger" class="com.atlassian.confluence.user.ConfluenceLoginInterceptor" />
</interceptors>
</security-config>

As part of the trouble shooting, Don sent me a snoop.jsp

<%@ page import="java.util.*" %>
<html>
<body bgcolor="white">
<h1> Request Information </h1>
<font size="4">
JSP Request Method: <%= request.getMethod() %>
<br>
Request URI: <%= request.getRequestURI() %>
<br>
Request Protocol: <%= request.getProtocol() %>
<br>
Servlet path: <%= request.getServletPath() %>
<br>
Content length: <%= request.getContentLength() %>
<br>
Content type: <%= request.getContentType() %>
<br>
Server name: <%= request.getServerName() %>
<br>
Server port: <%= request.getServerPort() %>
<br>
Remote user: <%= request.getRemoteUser() %>
<br>
Remote address: <%= request.getRemoteAddr() %>
<br>
Remote host: <%= request.getRemoteHost() %>
<br>
Authorization scheme: <%= request.getAuthType() %>
<br>
Locale: <%= request.getLocale() %>
<hr>
Headers: <br/>
<%
Enumeration enu = request.getHeaderNames();
while(enu.hasMoreElements()) {
String header = (String)enu.nextElement();
out.print(header + " : " + request.getHeader(header) + "<br/>");
}
%>

<hr>
Cookies: <br/>
<%
Cookie[] c = request.getCookies();
if(c==null) {
out.print("No cookies<br/>");
} else {
for(int i=0;i<c.length;i++) {
if(c[i]!=null) {
out.print("Domain: " + c[i].getDomain() + "<br/>");
out.print("Path: " + c[i].getPath() + "<br/>");
out.print(c[i].getName() + " = " + c[i].getValue() + "<br/>");
}
}
}
%>
</font>
</body>
</html>

Comments