Most Annoying Bug Ever

I've just spent the past three or four hours setting up Apache, Subversion, all my browsers etc etc to use SSL connections and client certificates for authentication with my Debian stable server. I'm sure the mod_ssl devs already know what's coming here and are either chuckling gleefully or ripping their hair out right now. Anyway, the joke for all those who are mod_ssl devs, is that you can't get subversion to use client certificates with a Debian stable server because Debian stable has Apache 2.0.54, complete with everybody's favorite mod_ssl bug. It's fixed in Apache 2.2, but not in 2.0.

So, back to basic authentication over SSL. Sigh, I had that working about two hours ago.

7 Responses to “Most Annoying Bug Ever”

  1. Byron Ellacott Says:

    FWIW, we’ve been working around this bug for a long time now here at APNIC. You can resolve it by ensuring that the strongest authentication you will need is negotiated at connect time, that is, by putting your SSL directives at the outermost configuration level, or inside a level for an IP based virtual host (not name based — the host name is part of the HTTP request headers). In your case, this would imply that you either (a) run a server on a non-standard port specifically for SVN, or (b) require client certificates for your entire https address.

    Of course, you probably already know this, but hey, someone else reading your blog might not. :)


  2. Adrian Sutton Says:

    hmm, I was going to say that’s what I’m doing already, but I’m actually using name based virtual hosts which is pretty stupid for SSL now that I think about it. Might have to investigate not making *:443 a name virtual host and see where that leads.


  3. Adrian Sutton Says:

    Nope, removing the virtual hosts doesn’t help either. From the comments on the bug it sounds like any time the first connection to the server has post content (like say, the stuff the subversion protocol sends) it fails. So, no client certificates for me. Oh well.


  4. Adrian Sutton Says:

    Correction, removing the name based virtual hosts, moving the SSLVerifyClient directives outside of any Location elements and disabling the potential for basic authentication seems to make it work. Yay! Now of course I have no fall back to basic authentication when I’m on a browser that doesn’t have my client certificate and no way to access my blog’s admin page since it’s on the name based virtual host that I just disabled and it’s set to require SSL. I guess that’s the next piece of the puzzle to set up.


  5. Craig Ringer Says:

    I found the best solution to this was to run my client-cert-mandatory SSL virtual host on a non-standard high port, leaving port 443 for tasks that didn’t require a client cert. Clumsy, but effective.


  6. Symphonious » Server Down-Time Says:

    [...] know. I'll probably make an attempt to upgrade to PHP5 and fiddle with the SSL set up now that the most annoying bug in the world is fixed. There's probably a bunch of other stuff I can actually do now that the [...]


  7. Kurs Says:

    can you by any chance recommend a tutorial for use with SSL and apache?


Leave a Reply

(Valid OpenIDs will skip moderation)

Alternatively, subscribe to the Atom feed.