Log <-

Archive for October, 2008

Nice :)

Wednesday, October 29th, 2008

This is nice: I would just like to say….

Apache 2.2: Multiple authentication providers

Friday, October 24th, 2008

For a long time Apache only supported a single authentication provider per location. For instance, you'd have:

<Location />
    Require valid-user

    AuthType Basic
    AuthName "FooCoorporation"
    AuthBasicProvider ldap

    AuthzLDAPAuthoritative Off
    AuthLDAPURL ldap://192.168.1.1:389/ou=foo,o=electricmonk,c=nl
    AuthLDAPBindDN cn=ldapreader,o=electricmonk,c=nl
    AuthLDAPBindPassword PASSWORD
</Location>

In older Apaches, it wasn't possible to add another Authentication provider. So, in the situation above, you can run into problems when your LDAP server dies on you, and you won't be able to login to the / location anymore until the LDAP was fixed. Another problem with single authentication mechanisms is that there's no way to add authenticated users if they're not in the LDAP.

Since Apache 2.2 multiple authentication providers are now supported. This is nice, since now you can have an LDAP authentication provider with an htpasswd fallback authentication mechanism.

You can enable it by specifying multiple AuthBasicProvider providers:

    AuthBasicProvider ldap file

So the full Location section becomes, for example:

<Location />
    Require valid-user

    AuthType Basic
    AuthName "FooCoorporation"
    AuthBasicProvider ldap file

    AuthzLDAPAuthoritative Off
    AuthLDAPURL ldap://192.168.1.1:389/ou=foo,o=electricmonk,c=nl
    AuthLDAPBindDN cn=ldapreader,o=electricmonk,c=nl
    AuthLDAPBindPassword PASSWORD

    AuthUserFile /var/www/.htpasswd
</Location>

With language X, you'll write code 10x faster!!1one

Wednesday, October 22nd, 2008

I've been hearing a lot of "With language X, you'll write code 10 times faster!" kind of remarks in the last couple of years, where "language X' can be substituted for the latest hip language or framework. I might even have shouted it about Python a couple of times myself. But does it really matter that much? On an average project, I spend maybe 30% on programming. The rest goes to planning, communicating, research, design, documentation, delivery, support, etc. And of that 30% a large portion is usually debugging, polishing, documenting (in the form of comments), making sure I've caught all the errors, finding weak spots in the code which might lead to bugs, checking if the security is okay, etc. Maybe silver-bullet-language-X helps in some of those cases, but I doubt it is very significant in the grand scheme of things.

I'm not really trying to make a point here or anything. Just an observation. Maybe something worth discussing.