LDAP Support in Ekiga

Today I finished writing a series of patches to enhance LDAP support in Ekiga, the Gnome SIP/VOIP client. Generally I don’t pay much attention to client-side issues; my focus here at Symas tends to be on the server. And for the most part I’ve been ignoring the whole voice-chat/telephony arena because it just didn’t interest me before. But all of a sudden it’s important to me now, and my experience over the past few days pointed out a few areas we really overlooked in the past, things we will need to improve.

There’s a long story leading up to this; I’ll try to spare the details but I blame Ubuntu - it all started on my return trip home from the Ubuntu Developers’ Summit in Prague this past May. At the airport in Amsterdam, while waiting for my flight connection back to Los Angeles, I met a girl. She’s from Asia; she was flying out on her first trip to the U.S.A. We got to chatting while waiting the couple hours for the flight, and one thing led to another… We wound up spending most of the summer together, but she was only on a 3 month visa and eventually had to return home. At the end of September she left, but not before we’d added a webcam to her laptop and tested to make sure that it worked with Skype on her WindowsXP system. Here’s where our current story begins…

30-some hours later she was on the ground, back in her homeland, and we were chatting on Skype. It was a bit laggy but with just audio it was pretty clear. Then we switched on video and boom, the connection died. We repeated a few times but it happened consistently. For whatever reason, we were just not going to get a video chat going. I figured it may be bandwidth limitations, but there were no user controls in the Skype app for selecting video framerate, quality, resolution, etc. It was just “on” or “off” and in this case, “off” was the only setting that worked. Quite annoying.

This moment of aggravation hit several of my hot buttons. Skype is not just a closed-source proprietary app, it also uses a proprietary protocol. There’s no way for normal users to get any helpful diagnostics out of it when things don’t work. And there’s no incentive for the Skype staff to give you helpful information in their tech support channels, because most of it is their IP that you just Don’t Need to Know. But as a software developer, some of the principles I live by are:

  1. in software, nothing is impossible
  2. when you *can* do something useful, you *should*
  3. there’s no excuse for hiding useful information, or impeding users from doing what they need.

Easy-to-use software is great; of course we all want programs that just take one click to get started and do everything we need. But we live in an imperfect world, and things frequently go wrong. If you write software that actively prevents people from seeing what goes wrong, you’re not doing anyone any favors. Your software usability is now binary - it’s either working or not working - and you remove all possibility of graceful degradation or end-user service restoration. Well written software should make the default cases easy of course, but should not preclude anyone from looking under the covers and learning more about the system. Software should allow users to determine their own learning curve, it’s not the software developer’s job to decide the definition of “easy” or draw the line for where “hard” begins. That line falls in a different place for each user, and it does the entire user community a disservice to lump everyone together in the “computerphobe” pigeonhole.

After gnashing my teeth at the stupidity of Skype, I started looking for other chat programs. In my searches I stumbled over Wengophone (OpenWengo, now QuteCom), Gizmo, Empathy, and finally Ekiga. By some strange coincidence, Ekiga 3.00 had just been released that day. It was still only available in source form, but that was fine with me - preferable really. (Binary packages for several platforms are available now…) (OpenWengo was ruled out because their account registration site no longer worked; it wasn’t till much later that I saw that the project had been superseded by QuteCom and by then it wasn’t worth the effort to check it out. Gizmo uses open, standard protocols but it’s closed source. Empathy is a Gnome app like Ekiga, but its UI is still too primitive for my taste.)

I got it built and was soon successfully chatting with the ekiga.net echo test server, (which means, talking to myself through a ~1 second delay line). It would take a few more days to get my friend online… With that task simmering, out of curiosity I decided to see what Ekiga offered in the way of an LDAP AddressBook. What I found was basically unusable. Looking at the code I saw that the config dialog offered a few customization options, but those options were actually being ignored in the Search handler. It was hardcoded to look for two specific LDAP attributes, so if you needed to customize and retrieve something else, you got no results. Needless to say, I couldn’t leave things as they were. I went to the Gnome bug tracker to file a bug report. But looking around, I found that there were already two bugs reported against their LDAP support, so I read them and put in my 2 cents.

One of the other principles I live by is never to complain that something’s wrong unless I know something about making it right. (If you have no idea what’s right, then how do you know it’s wrong?) In the free software world this means I don’t just say “this sucks”, I file a bug report with detailed problem descriptions or with a fix. In this case I saw several things wrong, and it took a series of patches to correct them.

Most of the problems with this code are the same as in a lot of other LDAP clients - hardcoded behaviors, poor use of the API, no support for security… One of my hopes in writing these patches is that they’ll serve as a model for other client implementors. They not only demonstrate how to migrate from very simple, rigidly hardcoded LDAP support to highly configurable support, but also show how to achieve all of these things incrementally. You don’t need to write it all at once, you can test pieces out and get them working in manageable chunks as you go. For me, the increments were determined by how long it took me to grok the Ekiga codebase, and stumbling blocks within the OpenLDAP API.

It turned out to be pretty easy to get most of the desired features working. We could still make things like TLS even easier, but most of these issues don’t require a lot of deep thinking. Things started to bog down when it came to properly implementing SASL authentication. While SASL has been an integral part of the LDAPv3 specification for over 10 years, even today the reality is that few LDAP clients support it. Working on this code, I began to see why…

For starters, the current libldap support requires the client to know too much about the underlying SASL library. Unlike our SSL/TLS support, which programmers can fully utilize using only LDAP APIs, writing the code for LDAP SASL authentication requires both LDAP and Cyrus-SASL specific APIs. (Even though OpenLDAP now supports GnuTLS and MozillaNSS in addition to its longtime OpenSSL support, the specifics are completely hidden inside libldap.)

Furthermore, our recommended SASL Bind API only comes in a synchronous version, while most of the libldap APIs provide both synchronous and asynchronous implementations. The lack of an asynch API here may not have been much of a limitation for simple command-line clients, but most of the interesting clients today are GUI-based and most GUI apps must be event-driven, doing all of their operations asynchronously. It’s extremely unfriendly to lock up somebody’s application window while libldap/SASL are off doing their thing.

It may be too late for this iteration of the Ekiga code, but I’m now taking steps to eliminate these API stumbling blocks in the next OpenLDAP release.

I was going to say there are several happy endings here (I get to make the programs I use behave exactly as they should, we get to improve the usefulness of OpenLDAP software) but of course, this isn’t the end of the story…

2 Responses to “LDAP Support in Ekiga


Leave a Reply

parkinson's drugs over the counter drugs triamcinolone teeth whitening dental cealis lavetra buy glyset diuretic health care for woman breast lift augmentation how to lower blood pressure naturally ginkgo biloba what is a natural antibiotic parasite medication water pill online stores hair loss products xanax 5mg strattera pharmacy drugs celexa paxil what can help heart failure levitra side effects nexium prilosec vs nexium generic order viagra plus finasteride dosage buy discount viagra viagra in australia alcoholism new treatment body building diets smoke stop valium cheap buy creatine no prescription cialis online lorazepam dosages cats hairball increase women intimacy drug ativan breast cancer drugs low back pain mrsa antibiotic cheap order buy teeth whitening irritable bowel syndrome treatments ambien doses viagra cialis effexor dose new osteoporosis treatment best cure for snoring viral throat infection penis enhansment sexual enhance for women pain drugs male overactive bladder lower blood pressure naturally treatment of insomnia buy imuran remedies for stomach ulcers increased heart rate drugs bone health buy online imitrex no prescription viagra on line uk cats bladder buy plan b online help for sleeping problems order imitrex online effects of phentermine prescription chlamydia diflucan otc pain med without a prescription woman health cialis male erectile dysfunction mrsa antibiotic cheap cialis sale online stress medicine for cats treatment of chlamydia buy singulair treating ear infections generic for norvasc phentermine phentermine captopril free dog products real levitra online how to reduce swelling cialis without rx obtaining pain killers drugs for high blood pressure cancer treatments fat burning workout drugs no prescription cheapest levitra how to build muscle buy pain medicine on-line flu shot buying ambien cats inflammatory bowel disease ambien maximum dosage drug loratadine prevention of heart attack muscle building diet order roxithromycin prevention of a heart attack bronchitis infection how to buy prescription medications online impotence help meds for high blood pressure generic imitrex lowest price on plan b side effects prednisone adhd and medications sleep disorders drugs breast augmentation prices information on ambien carb blocker diet healthy human bones medication elavil cheap celadrin teeth whitening buy nausea without vomiting cialis online family pharmacy pregnancy prevention methods at home acne treatment parasite medication weight loss for children wellbutrin dosages weight loss diets cialis canada pharmacy treatment of prostate cancer buy pills without a prescription viagra sperms doxycycline tetracycline what does evening primrose oil do allegra effects side buy birth control pills cures for hair loss benadryl dosing buy aciphex buy celexa stopping smoking fda tamiflu ambien withdrawl symptoms high blood pressure medication drugs used for blood pressure levitra without a prescription cheapest cialis uk adhd treatment effects of ultram onset of action in valium teeth white headache eye pain accupril Cialis Online Without Prescription atacand generic buy alpha lipoic acid antibiotic drug list natural cholesterol control online pharmacy viagra dog skin viagra and women black spots on the face nexium prilosec vs citalopram withdrawal teeth whitening product body building products colon cleanes levitra cialis compare Cialis Online Pharmacy medicine for dogs drug loratadine cats and irritable bowel syndrome acne prescriptions rating on weight loss programs buy griseofulvin tablets buy coq10 tooth whitening dentist how increase breasts size cheap etodolac viagra buy dangers of high blood pressure how to get viagra online authentic viagra online drug new smoking stop infertility meds artane hair loss products for men xanax for depression throat infection parkinson's disease medication order xanax without a prescription lexapro prescription viagra online without prescription usa augmentin medication hair loss prevention for men blood pressure high easiest way to stop smoking preventing hair loss buy erectile dysfunction online alzheimer's disease treatments fucidin ointment skin itching cheap pfizer viagra medication levitra what is clomid ivermectin new arthritis medicine free weight loss diets natural cholesterol control dog skin infection cure for throat infection buy proscar muscle body building prevent high blood pressure diuretic alli buy bladder control for dogs canada drugs online cheap buying levitra buy drugs online cephalexin prescription viagra causes of high blood pressure osteoporosis and exercise online phentermine free weight loss tips medication shingles overactive bladder in men meclizine medication weight loss support group online viagra china cat anxiety medicine edema buy erexin v pulmonary hypertension treatment metoclopramide allergy drugs vasotec diet for diarrhea antifungal strategies back pain relief products best body building products canada pharmacy drug perscription symptoms of fluid retention lotensin stop herpes pet medicine depression relief increasing breast size levitra buy levitra arthritis support viagra without what is levitra glucophage side effects of ativan carisoprodol professional tooth whitening azithromycin penicillin scabies medicine genaric viagra pravachol drug cymbalta anxiety profesional cialis muscle mass gain how to get pain medicine diazepam pharmacology treatment of breast cancer cat care metoclopramide what are beta blockers acne treatment for teenager viagra on-line breast augmentation info Cialis Online Prescription causes erectile dysfunction vardenafil effectiveness viagra order tooth whitening products free samples viagra anti-fungal treatments new medication for cancer treatment breast lift augmentation generic xanax cheap treatment for hepatitis post pregnancy weight loss pet health top hair loss viagra how long does it last buy canada levitra drugs for arthritis prostate cancer new treatment cats hairball acne prescription treatments muscle man order viagra avodart prescription buy medication on line atacand generic perfect pet products high blood pressure symtoms cialis 10 mg what is premature ejaculation how to control pain prevention of pregnancy self help weight loss order zaditor discount pain relief buy cheap cialis skin infection treatment avodart prescription diflucan buy viagra order viagra weight loss nutrition muscle and bone pain cure viagra gel free online weight loss program help the pain dosage of valium order gasex buy cheap cialis online allergies and asthma levitra on sale list new cancer drugs benadryl dosage cialis 30 oral buy prevacid alavert drug buy soma no prescription cats health free weight loss program menopause cures penis enlargement result canadian drug online drug smoking stop klonopin hair loss products tooth whitening purchase Viagra snoring uk irritable bowel treatments treatment for chronic anxiety energy saving products amiodarone drug weight loss solutions insomnia meds order kamagra online new cancer treatments blood sugar levels heart medicines that effect heart rate prevention of heart attack arthritis menopause Levitra Viagra Cialis Low Price back pain medicine buy cleocin gel stop smoking depakote overdose cialis softgel osteoarthritis medicine knees penis enhancement pills what causes throat infection control bleeding free prescription drugs increase male volume help for high blood pressure immune supplements beta blocker uses kamagra online artane amitriptyline uses ibuprofen withdrawal women lubrication drug doxepin health problems cats increased blood flow tramadol florida treatment of insomnia celexa omnicef drug buy erectile dysfunction online but cialis online buy topamax Purchase Levitra Online weight loss drugs treatment of hypertension blood pressure control terramycin dog medicine cure for constipation female enhancing drugs perscription drugs skin fungal infection cancer drugs cheap clonazepam online viagra in the us natural constipation cure zantac prevacid how to get white teeth female enhancer penis enlargments lamisil generic paxil side effects levitra buy levitra pain meds without prescriptions drug stores the new flu new anti depression drugs lisinopril prinivil chlamydia snoring help preventive osteoporosis dog bowel problems skin infection in dogs what does viagra do to females furosemide mechanism chlamydia symptoms men online cheap viagra buy what are beta blockers lexapro 10 mg soma mexico chlamydia medication dosage professional tooth whitening new york cialis soft how to lower high blood pressure natural breast enhancer allergy healthy human bones cialis cheap no prescription osteoporosis arthritis viagra online without prescription cialis herbal cheap valium generic weight loss drugs order breast growth breast augmentation info trazodone medication fat burning workout viagra coverage california order allegra dog ear canal leukemia medications medical treatment for insomnia lowering blood pressure naturally natural help for pain artane dog calming pills blood clot symptoms cheapest place to buy phentermine osteoporosis medicines help sleeping cold and flu what is heart failure prilosec order