Re: [RFC] Adding a challenge-response authentication method to git://

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Shawn O. Pearce <spearce@...>
Cc: Stephen R. van den Berg <srb@...>, git <git@...>
Date: Thursday, August 14, 2008 - 5:15 am

Shawn O. Pearce wrote:

I'd do it like this instead:

daemon: auth_user = dlsym(dlopen("auth-module.so", RTLD_NOW), "authenticat");
client: "git-authenticate action 'repository'"
daemon: send pkt-line challenge
client: send pkt-line username
client: send pkt-line SHA1(username + password + challenge)
daemon: if (auth_user(repository, action, username, password, struct sockaddr_in *inbound))
               allow_connection();

This approach has several nifty benefits:
* The otherwise duplicated code (for different auth schemes) is
  done only once (in the git daemon).
* If the git daemon has no authentication module loaded, we might
  as well not bother sending any challenge and just pretend we do
  not know about the authentication scheme.
* Any kind of authentication scheme can be supported without changing
  the core code. If the authentication module does something wrong,
  one can continue to serve read-only requests by simply unloading
  the module.
* Modules is a great way for newcomers to get started contributing to
  git so it's a nice way of getting more contributors/sub-maintainers.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Adding a challenge-response authentication method to g..., Stephen R. van den Berg, (Wed Aug 13, 12:26 pm)
Re: [RFC] Adding a challenge-response authentication method ..., Stephen R. van den Berg, (Wed Aug 13, 1:37 pm)
Re: [RFC] Adding a challenge-response authentication method ..., Stephen R. van den Berg, (Wed Aug 13, 8:10 pm)
Re: [RFC] Adding a challenge-response authentication method ..., Andreas Ericsson, (Thu Aug 14, 5:15 am)
Re: [RFC] Adding a challenge-response authentication method ..., Stephen R. van den Berg, (Thu Aug 14, 5:51 am)
Re: [RFC] Adding a challenge-response authentication method ..., Stephen R. van den Berg, (Thu Aug 14, 3:13 am)
Re: [RFC] Adding a challenge-response authentication method ..., Stephen R. van den Berg, (Thu Aug 14, 7:07 am)
Re: [RFC] Adding a challenge-response authentication method ..., Stephen R. van den Berg, (Thu Aug 14, 8:14 am)