Thursday 4 July 2013

Progress so far


Google summer of code has been in the coding period for 17 days! So its time for a progress review. I'll admit and say there were times where I was thinking the task might of been too much and way beyond my skill set, but things are getting there. You can judge for yourself and let me know in the comments.

In terms of coding I have been working on cleaning up the current LDAP implementation and extending its API features. I'll use the word cleaning here loosely, because if I'm honest it was really more of a re-write. When I reviewed the code for the current LDAP implementation I didn't think it was in a great position to be extended. There was duplicate code, no central manager and no data access objects for LDAP interaction. Extending on such a foundation would of caused major headaches and possible performance issues in the future.

I started of by creating a plugin to handle connections to ldap and creating objects to model the data it returned. This involved creating the following main(I have excluded VOs and DAOs from this list to highlight functionality) classes:

  • LdapManager - Manages all connections with LDAP.
  • LdapConfiguration - Supplies all configuration from the cloudstack database.
  • LdapUserManager - Handles any interaction with LDAP user information e.g. search for an ldap user.
  • LdapUtils - Supplies static helpers e.g. Escape search queries, escapse DNs, get attributes from search queries etc.
  • LdapContextFactory - Manages the creation of contexts
  • LdapAuthenticator - Supplies an authentication system to Cloudstack
So from this I had a solid foundation to start creating API commands I went ahead and created the following:
  • Add Configuration (Support for multi-able LDAP servers added)


  • Delete Configuration


  • ListLdapUsers - All or via a search on the specified username attribute

  • ListLdapConfiguration

Along with this I updated the UI components that currently exist for the configuration of LDAP



I believe the above work puts me on a nice foundation to begin introducing UI features to enable easy user provisioning. Of course there will be some additions to the LDAP API and modifying of other API commands but this should be manageable. I plan to start with this come the second term of the coding period, July 29th (Knowing me it'll probably happen earlier). Until then I'm writing unit tests for the above code and cleaning up any little issues I come across.

The lead Cloudstack mentor, Sebastian will be in Dublin next week on July 10th giving a talk about the Cloudstack API. I have to put together a 5 minute follow up talk about my experience so far and a brief description on how to get involved with the community. If you'd like to come along grab a ticket over here: https://tito.io/tcube/cloudstack-clients-and-wrappers the event is Paddy Power sponsored and you can grab yourself a free pair of underwear just like the ones in the opening photo of this blog posted!




1 comment:

  1. Awesome work Ian! Looking forward to a more tighter integration of LDAP with CS.

    ReplyDelete