Etherpad with Shibboleth Authentication (Technical document)

I want to login to Etherpad with my UK federation/Shibboleth login.

Firstly I need to get my SP working.
Configure SP & Apache initially..
I need to configure Tomcat to use Shibboleth for Authentication configure Jetty to use Shibboleth Authentication.
Once this is done I will have the users attributes as environment variables.

Now I have the variables I need to create a script to check the variables and create an account if required.  All sounds pretty simple right?  Let’s hope so, as I make progress I will document my changes.

I’m referring to the LDAP plugin patch code for how to handle “talking to etherpad”.

ETA is 3/4 weeks.  Sucks that I need to use Apache but oh well!!

Note:  Etherpad runs on Jetty, not Tomcat and doesn’t require Apache.  It is the shibboleth element of this that requires Apache to operate.

Note:  Thanks to nuba for reminding me about Jetty.

Etherpad minimum requirements (Memory / RAM)


Minimum: 2 GB (It will run on 1 Gig but do you really want to allocate a JVM to use ALL of your ram?)

Recommended: 4GB+ Depending on # of pads & concurrent connections.

I would recommend not running a production Etherpad service on a Virtual PC / VPS or any thing that will interfere with Java accessing the machines memory.  You may struggle to build on a VPS depending on your providers swap memory space settings.

Just a quick one, worth posting cause it’s not well documented.

Installing Etherpad on Windows (CYGWIN)

The new documentation for how to deploy Etherpad Lite on Windows is available here — You should refer to this.

BELOW IS THE OLD DOCUMENTATION FOR ETHERPAD FULL

Grab the latest Etherpad .zip from http://etherpad.org and extract to c:\etherpad

Download and install Cygwin from http://www.cygwin.com/ – use defaults

Download Scala from http://www.scala-lang.org/sites/default/files/linuxsoft_archives/downloads/distrib/files/scala-2.7.7.final.zip and extract to c:\etherpad\scala-2.7.7

Download and install MySQL server from http://dev.mysql.com/downloads/mysql/
Create a MySQL database “etherpad” and a database user “etherpad”

Download the MySQL connector from http://dev.mysql.com/downloads/mirror.php?id=402367 and extract to c:\etherpad\mysql-connector-java-5.1.16

Download Java from http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html and extract to c:\etherpad\JDK1.6_23

Open Cygwin (doubleclick on icon)

Change directory to Etherpad:

cd /cygdrive/c/Etherpad/

Copy the Libraries from one folder to another (temp fix):

cp /cygdrive/c/Etherpad/infrastructure/lib/* /cygdrive/c/Etherpad/infrastructure/ace/lib

Begin your build (if this errors check your task manager and check there are no java instances running that may cause a conflict):

bin/build.sh

Copy the default config to the correct location:

cp etherpad/etc/etherpad.localdev-default.properties etherpad/etc/etherpad.local.properties

Edit etherpad/etc/etherpad.local.properties and set
etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3306/etherpad
etherpad.SQL_PASSWORD = yoursqlpassword
etherpad.SQL_USERNAME = etherpad
etherpad.adminPass = somestrongpassword
topdomains = yourhostname.com,localhost

You can now run etherpad via:

bin/run.sh

Access your Etherpad server at:
http://localhost:9000/

BELOW IS THE OLD DOCUMENTATION THAT I AM LEAVING FOR THE SAKE OF HISTORY AND FOR REFERENCE. DAVE. WE CAME A LONG WAY DAVE.. IT’S BEEN EMOTIONAL :~

Below is my documentation that is sketchy, you should follow this guide instead.

In Windows:
– Install Java, Scala, MySQL, mysqlconnector and Mercurial under Windows.
– JAVA should be set to the java executable.
– JAVA_HOME should be set to the main jdk directory.
– SCALA should be set to the scala executable.
– SCALA_HOME should be set to the main scala distribution directory.
– PATH should contain $JAVA, $SCALA, and mysql
– MYSQL_CONNECTOR_JAR should be set to the mysql-connector JAR file included in the mysql-connector download.

– Install Cygwin.

These Files are needed in /etherpad/trunk/ since the archive holds files both in the etherpad and the infrastructure subfolder.

  1. Make a backup of your bin folder
  2. Extract the contents of the above .Rar file to the bin folder
  3. Run bin/rebuildjar.sh
  4. After installation run bin/run-local.sh
Full docs coming later. Post questions as comments and I should be able to answer.
All props goto Jutsi for discovering the solution. Feeling confident without the full docs? Follow the unix docs for config settings and you should be good to go.

See also:
Etherpad-win repository all props to Gyokuro:  http://bitbucket.org/gyokuro/etherpad-win/overview/
Etherpad-win wiki all props to Gyokuro: http://bitbucket.org/gyokuro/etherpad-win/wiki/)

Etherpad with Active Directory (LDAP/AD)

So you want to host your own Etherpad deployment and you want to tie it into your schools AD/LDAP/Active directory? Below are the basic instructions for how to accomplish this. Alternatively you can pay us to do it.
Get the patch
lynx https://gist.github.com/10061b4b213619816db5
Get the etherpad source (warning- may take some time- go make a cuppa tea)
hg clone https://etherpad.googlecode.com/hg/ etherpad
Go to the etherpad folder
cd etherpad
Extract the patch
tar –xvz –strip-components=1 -f ../gist10061b4b213619816db5-e60df95e16c09700b4cf07cd87b9732dd7b15ace.tar.gz
Apply the patch

patch -p1 < ldap_support.patch

Set your superdomain
nano trunk/etherpad/src/etherpad/globals.js
add yourdomain.whatever to the SUPERDOMAINS
Edit pro_accounts.js
nano trunk/etherpad/src/etherpad/pro/pro_accounts.js
Change directory
cd trunk/etherpad
Add the useLdapconf to the config
echo “etherpad.useLdapConfiguration = ./etc/json.config” >> etc/etherpad.localdev-default.properties
Edit json.config
nano etc/json.config
Paste in (you need the {}’s):

{
url” : “ldap://localhost:10389”,
“principal” : “uid=admin,ou=system”,
“password” : “secret”,
rootPath” : “ou=users,ou=system”,
userClass” : “person”,
nameAttribute” : “displayname“,
ldapSuffix” : “@ldap
}
Replacing the above with your settings.
Build your etherpad
bin/rebuildjar.sh
Test your etherpad
bin/run-local.sh
Browse to http://yourdomain.com:9000/ep/pro-account/sign-in
Type in your email address (of the user in ldap) and password
Fin! Credit to Elliot Kroo and Marcio Starke – discussed further in this google group.
Shibboleth integration coming mid 2010 (if anyone wants to fund this please get in touch!)