views:

439

answers:

1

Hello,

I would like to use our current intranet as the main application to authenticate users. Confluence should be able to ready the cookie I created from the intranet to authenticate the user automatically without prompting them for a username/password. I read a bit about seraph here: http://docs.atlassian.com/atlassian-seraph/latest/sso.html, however I am not really sure how to get started. I downloaded the zip and created the config files. However once I have created the classes in which folder do I place them and how do I actually compile them? I am new to Java.

I would prefer not use Crowd, since its very expensive and if we can build the SSO on our own, then we can save a lot of money.

Any help is appreciated.

I am using 3.1.1 on Windows.

Thanks

A: 

Hiya,

The simplest way to integrate is to copy + modify the CAS client, linked from the page above. If you're completely new to Java, there's a bit of a learning curve - you need to create a JAR file which you copy into the $CONF_HOME/confluence/WEB-INF/lib directory, along with modifying your seraph-config.xml.

I'm not sure I can give you a complete tutorial on how to build a JAR file here, but the CAS client uses Ant, so if that's what you're modifying, install Java and Ant and run "ant build.xml" in the directory.

Hope that makes some sort of sense :-)

Cheers, Dave.

doflynn
Hi, Thanks for the response. I am new to java, however I am an old asp.net developer and I still remember a bit of java from my studies. Anyhow, here is what I tried. I found a sample authenticator somewhere and pasted it here: http://codepaste.net/qwwifq. I compiled it using javac and packaged it using jar. Then I copied it into the web-inf/lib dir. I also modified the seraph-config.xml file and included my authenticator. I restarted TomCat, and now I get a 404. I must have missed something. Do you see something wrong here?
vikasde
Not sure if I will be able to use the CAS client. I need confluence to read the cookie that I create from my intranet and based on that it should either allow the user to log-in or not.
vikasde
I investigated further and see that it throws the following exception: Caused by: java.lang.RuntimeException: Could not load security config 'seraph-config.xml': Exception configuring from 'seraph-config.xml : com.atlassian.seraph.config.ConfigurationException: Could not create: authenticator : java.lang.ClassNotFoundException: SSOAuthenticatorI copied the SSOAuthenticator.jar into this folder: confluence\installation\confluence-3.1.1-std\confluence\WEB-INF\lib and I changed the seraph-config.xml authenticator attribute to: SSOAuthenticator only. Any idea?
vikasde
Possibly your SSOAuthenticator class is inside some other package directory structure in the jar? You really should have at least one package there. The directory structure must match the path in the authenticator element exactly
gommo
@doflynn: Can you help me with this one as well? http://stackoverflow.com/questions/2722766/confluence-logout-using-sso
vikasde