Posted on March 14, 2008 in Office, Java by sverdianto1 Comment »

Well, I’ve previously developed an SSO (Single Sign On) system build on on top of CAS and Spring. It integrate famous products from Atlassian called Confluence and Jira.
It was a bit hard to do LDAP user and group management in older version of Confluence and Jira.

I just requested by client to setup Confluence+LDAP integration for user authentication only (note that this is not including LDAP user & group managemet) using ActiveDirectory.

I am surprised that doing this now (in Confluence 2.7.x) is more simple than what I did before.

Here is what I do to make it works:
Firstly, Go to confluence installation dir (%CONFLUENCE_HOME%).

Edit %CONFLUENCE_HOME%/confluence/WEB-INF/classes/atlassian-user.xml and add lines below:


<ldap key="exampleLdapRepository" name="Example LDAP Repository" cache="true">
    <!-- server config -->
    <host>ad.example.com</host>
    <port>389</port>
    <securityPrincipal>cn=user,ou=admins,dc=example,dc=com</securityPrincipal>
    <securityCredential>password</securityCredential>
    <securityProtocol>plain</securityProtocol>
    <securityAuthentication>simple</securityAuthentication>
    <baseContext>ou=users,dc=example,dc=com</baseContext>

    <!-- tree config -->
    <baseUserNamespace>ou=users,dc=example,dc=com</baseUserNamespace>
    <baseGroupNamespace>ou=groups,dc=example,dc=com</baseGroupNamespace> <!-- ignored -->
    <usernameAttribute>cn</usernameAttribute>
    <userSearchFilter>(objectClass=user)</userSearchFilter>
    <firstnameAttribute>displayName</firstnameAttribute>
    <surnameAttribute>sn</surnameAttribute>
    <emailAttribute>mail</emailAttribute>
    <groupnameAttribute>cn</groupnameAttribute>
    <groupSearchFilter>(objectClass=ignoredSinceWeUseUserAuthOnly)</groupSearchFilter>
    <membershipAttribute>member</membershipAttribute>
    <userSearchAllDepths>true</userSearchAllDepths>
    <groupSearchAllDepths>false</groupSearchAllDepths>
</ldap>

Above task will enable authentication to LDAP. Since we’re not managing groups in LDAP, now the problem is authenticated users does not belong to any group so that they can’t use Confluence (minimum group is confluence-users). Therefor we need to use Dynamic-Group plugin so authenticated users will automatically joined to groups that already specified by admin in configuration files.

LDAP Dynamic Groups Plugin

It seems like the page is never updated :p. Someone has reported that the plugin didn’t work for Confluence 2.7 or later. :(
But, I finally found that the plugin is actually shipped with confluence 2.7 :D. what you need to do is edit %CONFLUENCE_HOME%/confluence/WEB-INF/classes/seraph-config.xml and,

Replace:


<authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/>

With:


<authenticator class="com.atlassian.confluence.user.ConfluenceGroupJoiningAuthenticator"/>

Save, and restart tomcat. All LDAP users under ou=users,dc=example,dc=com now should be able to use Confluence ;)

References:
- Add LDAP Integration
- Customising atlassian-user.xml
- Automatically Adding LDAP users to confluence users Group

Posted on December 21, 2007 in Java, Mac by sverdianto2 Comments »

Last October, when Apple released their new operating system Leopard, Java developer getting upset because it did not shipped with latest Java SE.
They always late, and some people think they won’t support Java anymore. Ohhh… Apple :(

But, Today I’ve got a good news for you all Java Developer on OS X platform.

Java SE 6 Developer Preview 8
Java SE 6 Developer Preview 8 is an implementation of Sun’s Java SE 6 for Mac OS X v10.5.1 and later. This Preview includes Java SE 6 version 1.6.0_01. This Developer Preview does not change the default version of Java. This release is only for Mac OS X v10.5.1 and later, and should not be installed on earlier versions of Mac OS X. This release is for 64-bit Intel-based Macs only and cannot run on PowerPC-based or 32-bit Intel-based Macs.

Apple has just released Java SE 6 Developer Preview 8 that includes Java 1.6.0_01 (Dec 18, 2007).
Hmm… yeah.. old version, the latest from Sun is 1.6u3. and it only run on Leopard 10.5.1.
But at least they don’t stop developing their own Java SE and stop making people angry and sell their Apple hardware :D.

So, download it now from http://connect.apple.com

Posted on August 30, 2007 in Java by sverdiantoNo Comments »

Please check : http://code.google.com/p/regeat

Feel free to report bugs or request for enhancements. :)

Regards,
Sukma

Posted on June 28, 2007 in Java by sverdianto1 Comment »

Finally, I made my first Swing application.
Named RegEat, a simple Regular Expression Tools.
I write this application because at the first time I tried to find a simpe regex tools, it was so hard, but I found some - Reggy and RegExpress.

This application built by Java application, Swing based, and using standard JDK RegEx engine (java.util.regex) and developed using NetBeans IDE.

RegEat - My First Swing App (screenshot)

Download RegEat
A Zip file that contains NetBeans project and Binary JAR. To run simply double click dist/RegEat.jar :)

Still, this application is far from good. But I’d appreciate any comments.