https support on mingle#401

Subscribe to https support on mingle 3 post(s), 2 voice(s)

 
Avatar cambazz 3 post(s) #950

Hello,
This has been written some other thread. Is it possible to get mingle going with https?
I am using mingle on my home machine, and when I open a port to outside world, I always get lots of connections from all over the world. Jetty does indeed support ssl, and I have looked at the rails code for mingle and there seems to be some support for https.

Since it is my home machine, I dont feel secure about leaving an app open to outside world. I guess if it is too diffucult to configure jetty – mingle to use https, I could use stunnel, or reverse proxy with apache – but that is not really desired.

Any ideas/recomendations/help greatly appreciated.

Best Regards,
-C.B.

 
Avatar cambazz 3 post(s) #951

I am answering my own question, perhaps it will help others, and I also would like feedback – it works with ssl now, but I could have made something wrong.

step 1. make a directory named etc under the dir you installed mingle
step 2. run the command “keytool -keystore keystore -alias jetty -genkey -keyalg RSA” which will generate a file called keystore under etc dir.
step 3. add the following segment in jetty.xml

<call name="addConnector"> <arg> <new class="org.mortbay.jetty.security.SslSocketConnector"> <set name="Port">36666</set> <set name="maxIdleTime">30000</set> <set name="keystore"><systemproperty name="jetty.home" default="." />/etc/keystore</set> <set name="password">OBF:somecode</set> <set name="keyPassword">OBF:somecode</set> <set name="truststore"><systemproperty name="jetty.home" default="." />/etc/keystore</set> </new> </arg> </call>

delete the original segment that has the addConnector.

the OBF:somecode is protected password. to obtain the protected password:

run the command

java -classpath ./vendor/java/jetty-util-6.1.5.jar:./vendor/java/jetty-plus-6.1.5.jar:./vendor/java/jetty-6.1.5.jar org.mortbay.jetty.security.Password

use mingle as username and the same password you used generating the keystore. at step 1.

this configuration seems to be working but I am not sure about the side effects.

Best Regards.
-C.B.

 
Avatar Michael Green 27 post(s) #2182

Anyone been successful with this? I got thru it, but am getting an “Invalid keystore format” when Mingle is running….

java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:633) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38) at java.security.KeyStore.load(KeyStore.java:1185) at org.mortbay.jetty.security.SslSocketConnector.createFactory(SslSocketConnector.java:206) at org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:416) at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73) at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:249) at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:146) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.Server.doStart(Server.java:228) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.thoughtworks.mingle.Server$1.run(Unknown Source)
2008-08-21 12:43:22,610 [org.mortbay.log] failed Server@13fba84
java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:633) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38) at java.security.KeyStore.load(KeyStore.java:1185) at org.mortbay.jetty.security.SslSocketConnector.createFactory(SslSocketConnector.java:206) at org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:416) at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73) at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:249) at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:146) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.Server.doStart(Server.java:228) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.thoughtworks.mingle.Server$1.run(Unknown Source)