Basic vs. Digest

In the series of highly boring posts ;) here’s another one; in this case, a simple explanation of two different authentication protocols available in the HTTP standard.

HTTP Basic Authentication Protocol

This is the simplest HTTP Authentication protocol available:

  1. The browser sends a request to a protected resource: GET /index.html
  2. The server looks for the “Authenticated” header in the request; since it does not find it, it replies back with a response with the 401 code (“Unauthorized”). The response contains a “WWW-Authenticate” header, with the value “Basic”. This response is called a “challenge”, and it also contains a “realm” text, which describes the protected resource in clear text (the “realm” is shown in the pop-up window that usually appears for you to type your password when this protocol is used).
  3. The browser creates a new request GET /index.html that contains an HTTP_AUTHORIZATION header, whose value is the word “Basic” followed by the ‘username:password’ string encoded in base 64. This algorithm is a two-way algorithm: you can retrieve the username and password from the base 64-encoded string.
  4. The server receives this response, and since base 64 is a two-way algorithm, it compares the MD5 (or SHA1) password hash to the one stored in the database. If they are the same, the request is processed. Otherwise, the user gets a 401 again.

Continue reading

Pourquoi pas?

Pourquoi ne peut-on pas avoir des conférences comme celle-ci, avec des mini-events comme celui-ci en parallèle en Romandie? Ou encore comme celle-ci? Ou bien comme cette autre! Ou celle-là!

Pourquoi pas? Est-ce que le marché est trop petit? Y a-t-il un manque d’intérêt général? Je pense que le problème est important, et qu’une grande partie de l’élan technologique local est étouffé par ce manque d’une grande conférence technique chez nous.

Après tout, le web a été inventé à Meyrin. Continue reading

Best books of 2007

tcss.jpgI have several mantras in my life. One of them is to learn a new programming language every year. Another one is to read at least 6 technology-related books every year.

I’ve already talked about Erlang (and boy that was the most read article ever in the whole life of this blog! More than 1600 visits just for it!) so now it’s time to discuss the greatest books I’ve read in 2007 (ordered by preference, from more to less):

Continue reading