I am at my most productive when I can clearly hear my thoughts. And this requires silence and a cool atmosphere. No fans humming, no power supplies buzzing, no discs clicking. Back in my home office in Bulgaria I took drastic measures to achieve that: I drilled a ø 4cm hole in the wall to the adjacent room and moved my PC case there. Then I got 5m USB and DVI extension cables to link the PC back to the monitor, keyboard and mouse on my desk. So all noisy and EMF emitting bits moved away and next door; the only things that remained on my desk were just the peripheral I/O devices.
The change in terms of silence and comfort were amazing! If you’re working many hours on the PC and would love to have an office atmosphere for utmost peace and concentration – this is the thing to do.
Here in London I now decided to reproduce the same arrangement. This time I took extra care in selecting a low power LCD monitor, as my old Philips screen was heating up quite a bit and its power supply was slightly humming. Samsung’s SyncMaster BX2250 is probably the best choice. It’s spec cites 18 Watts of operational power whereas 20″ to 25″ LCDs from other manufacturers typically consume at least twice as much – between 40 and 50 Watts. The plastic parts are also spec’ed as environmentally friendly, so thumbs up to Samsung for their green mindset and efforts.
If you’re making an LDAP search against a large directory you may potentially get a huge result set that you may rather wish to consume in chunks or “pages”. You may need this if you have a UI where results should be displayed, say, in portions of 10 or 20 at a time; also, if the LDAP server is configured with a max limit (typically in the order of 1000) on the number of entries a client may receive in a single search response.
To handle search results paging two LDAP extensions come to the rescue:
The Virtual List View control. It is the more featureful of the two as it allows clients to request an arbitrary “view” into the result set, by specifying a target offset, entry count, and even a “before” and “after” entry count. It is defined in an IETF Internet Draft, which for some reason still unknown to me hasn’t made it to standard status yet (as opposed to the Simple Paged Results control).
Note that the Virtual List View requires the results of the request to be sorted by a specified key on the server side using the Server Side Sort control (defined in RFC 2891). With the Simple Paged Results control sorting is optional.
The following screenshot, from the Json2Ldap online demo, shows an web app widget that uses the Simple Paged Result control.
Here is a list of the directory servers that support the Virtual List View (VLV) control, in alphabetical order:
389 Directory Server
IBM Tivoli Directory Server (since version 6.2)
Microsoft Active Directory (since Windows Server 2003)
Directory servers that don’t support the VLV control:
Oracle Internet Directory
The VLV control is perhaps not as widely supported by the various directory server vendors as the Simple Paged Results, but if you have an application that has to be able page up and down through the search results, it is indispensable.
Support for VLV in Json2Ldap from NimbusDS is planned for the next 1.10 release.
AuthService can be used in any situation where you have to authenticate user credentials (login) over the web against an LDAP-compatible directory such as Microsoft Active Directory, Novell eDirectory or OpenLDAP.
You’re a SaaS provider and want to provide your corporate customers with a method for authenticating users against their internal directory.
Your company has applications in the cloud and wish them to use the corporate directory for user login.
You’re designing an Ajax app and want to authenticate users with a single JSON XHR. No redirection and page reloading, please!
How does it work?
AuthService is a nimble web service that sits in front of an LDAP directory and receives JSON-RPC request from web clients. It resolves the supplied usernames to valid directory entry entries (DNs) and translates between the binary LDAP protocol and HTTP/JSON.
The JSON request and response messages, what do they look like?
AuthService communicates with simple JSON messages. These follow the standard JSON-RPC 2.0 protocol.
Can you retrieve a user’s details from the directory?
Yes! In addition to checking the user’s credentials you can also configure AuthService to return a selected set of user’s directory entry attributes on auth success. This is done via the authService.userAttributes configuration setting.
Here is a sample list of attributes that can typically be retrieved:
Given name, surname, full name.
Office, home and mobile phone numbers.
Organisational details such as manager, department and authorisations / permissions.
Here is an example of such a JSON user auth response that returns selected user details:
Which directory servers is AuthService compatible with?
AuthService works with any LDAP v3 compatible directory. This includes Microsoft Active Directory, Novell eDirectory, IBM’s and Oracle’s directory services, the open source OpenLDAP, OpenDJ and ApacheDS servers.
What about installation?
AuthService is delivered as a standard Java servlet application, packaged as a WAR file and ready for immediate installation into any Java web server, such as the popular free Apache Tomcat or Jetty servers. The WAR file weighs a nimble 2.5 megabytes.
Whether the subject of the presented X.509 client certificate must match an authorised distinct name (DN).
What about price and support?
AuthService licenses come at a super affordable price. For immediate purchase and download check out the NimbusDS online shop. Attractive discounts are available if you with to distribute the software as part of your own product or SaaS offerings, for 100, thousand or even more copies.
NimbusDS, which operates out of London, UK and Bulgaria, also offers excellent integration and consulting services, with emphasis on LDAP directory design, meeting organisational objectives, web and cloud directory applications.
The complete Nimbus Directory Services product line received a speed boost in June. The latest versions of Json2Ldap, JsonSSO and AuthService now feature a greatly improved JSON parser which speeds up decoding of incoming requests by impressive 380 per cent!
LDAP – compatible directories such as MS AD and OpenDJ are an excellent tool for bringing order and organising things. Businesses that make extensive use of web services may benefit from having all of them nicely listed and configured in a central location. A directory server can serve this purpose well, and with a gateway such as Json2Ldap, this can be done over the web too.
Basic web service listing
At a basic level, the directory may just list the available web services with their key usage details, such as their name, protocol and the URLs where web clients can access them.
The example below shows one such case where the services are listed under a directory branch named ou=Services,dc=NimbusDS,dc=com. Each entry is a webService class which supports attributes for storing a service’s name, URL, protocol and other detail. Directories allow their schema to be freely extended, so you can define your own class for your web services and the properties you wish to store.
The web services entries can be administered from the console or with LDAP GUI tools such as the excellent Apache Directory Studio.
Web service lookup
If you have a Json2Ldap instance installed the service listings may be queried by web clients, for example to dynamically look up the URL for a particular web service.
Here is a Json2Ldap ldap.getEntry request to obtain the URL of a TransactionCenter service:
The administration of web services can be further centralised by storing their configuration variables in their own directory entries instead. In effect, this means projecting all configurations from your directory server. The web services would then only need to know the LDAP URL of the directory server and be provided with the appropriate credentials (username/password pair or X.509 certificate) to connect and authenticate to it.
If done on a consistent basis, having all configurations in a single place may greatly improve the manageability of your services and simplify the work of your IT administrators.
To accomplish this each web service must be provided with a set of credentials for accessing its configuration variables. ACLs may be judiciously used to limit read access to these attributes to the web service only and allow only the authorised administrator to edit them.
For the actual configuration variables, the LDAP protocol provides fair flexibility and allows storage of virtually arbitrary key/value pairs. As with the basic details example above, you can create your own schema for storing the configuration parameters of your particular web services.
Below is one such example for the TransactionCenter payment web service configuration. The directory entry contains attributes for configuring the back-end database connection as well as various variables pertaining to the web service itself.
In a future article I’ll share a few useful ideas how SaaS providers can utilise a central LDAP directory for managing subscriber accounts and multi-tenant app configurations.
Two years after its initial release the JSON-RPC 2.0 Base library switches to a new package for representing and parsing JSON messages. The result is 2x to 4x times faster performance in JSON-RPC message parsing!
Back in 2009 I chose JSON Simple for its simple and relatively non-invasive model for representing and mapping JSON entities to Java primitives and objects. Performance was also relatively good against the alternatives, so JSON Simple became the natural choice for the JSON-RPC 2.0 Base classes. JSON Simple development became stale with time however, and more than 2 years passed without any new releases or fixes to reported bugs. This, I suspect, must have led to the user community becoming somewhat frustrated and a fork imminent.
A fork of JSON Simple did indeed arrive, in May this year, initiated by Uriel Chemouni and named JSON Smart. Initial tests showed considerable performance gains and after some email exchange with Uriel which resulted in the addition of strict JSON parsing, JSON Smart became the new library for JSON-RPC 2.0 Base.
So what do you gain with the new release?
JSON-RPC message parsing is sped up 2.4 times for the reusable JSONRPC2Parser and 3.8 times for the static parse methods.
Moreover, the difference in terms of performance between the static parser and the instance parser is almost negligible, which means that for apps like servlets there is no need to pool parsers in order to speed up request processing.
Thanks for Uriel for making this great piece of software!
In the next few days Json2Ldap and the other products in the NimbusDS line will receive the new library, so expect more good news!
I recently started playing with JSON-RPC apps in the cloud and I wanted to measure their responsiveness, down to the microsecond. So I sat down and added a stopwatch function to the JSON-RPC 2.0 Shell. It is activated by an -s, --stopwatch command line option and measures the time in micro / milliseconds for a JSON response to be received from the web server. Perhaps not surprisingly, it turned out that performance of the service under test in the PaaS cloud was an order of magnitude slower than the instance in our intranet. Still, responsiveness is acceptable and I remain optimistic about hosting other NimbusDS apps in the PaaS cloud.
The updated JSON-RPC 2.0 Shell is now released as version 1.7 and I’ll shortly be sending out the notifications to the existing subscribers.