Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Kerberos authentication
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ken Dreyer  
View profile  
 More options Apr 11 2012, 10:10 pm
From: Ken Dreyer <ktdre...@ktdreyer.com>
Date: Wed, 11 Apr 2012 19:10:50 -0700 (PDT)
Local: Wed, Apr 11 2012 10:10 pm
Subject: Kerberos authentication

I recently hacked Kerberos authentication onto the Gitorious web interface.
In conjunction with Apache's mod_auth_kerb, the Rails app pulls the
username out of request.env['REMOTE_USER'] and uses that in a manner
similar to the current code's OpenID handling: If the user doesn't yet
exist in the database, then use "kerberos_build" / "kerberos_create"
methods in the user_controller to create his or her account. If the user
does exist, just log them in.

The current Gitorious code assumes that any form of authentication is going
to happen via Rails' web forms - either an OpenID URL, or a
username/password combo. There's not much room to delegate authentication
up to Apache. This affects the mod_auth_kerb SPNEGO use case, but it also
affects efforts to support other Apache authentication mechanisms, like SSL
client cert authentication via mod_ssl. I ended up modifying the
session_controller to do a "using_kerberos?" check within the "create"
method, but I'm not sure this is the best approach. I'd love to hear ideas
from someone who knows more about Rails and Gitorious :)

It would also be awesome to combine this Kerberos auth support along with
the LDAP features that are present in the latest Gitorious versions. I'm
not sure how straightforward it would be to combine these, though. I would
only want to use the directory information lookup portions of the code in
order to pre-populate information about a user, and skip the
password-verification parts.

And of course, it would also be great to support Kerberos auth for SSH, in
addition to the web interface. But I haven't gotten that far :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Dreyer  
View profile  
 More options Apr 12 2012, 7:52 pm
From: Ken Dreyer <ktdre...@ktdreyer.com>
Date: Thu, 12 Apr 2012 17:52:56 -0600
Local: Thurs, Apr 12 2012 7:52 pm
Subject: Re: [gitorious] Kerberos authentication

On Wed, Apr 11, 2012 at 8:10 PM, Ken Dreyer <ktdre...@ktdreyer.com> wrote:
> I recently hacked Kerberos authentication onto the Gitorious web interface.

I ended up implementing this in a less hackish way, with a proper
Gitorious::Authentication::KerberosAuthentication module. The core
code changes are not as daunting now.

I added a "authenticate_http" method to the main
Gitorious::Authentication module, to support authentication modules
that do not use a username+password combination.

Lastly, I added an "http" method to the sessions controller, which
will handle single sign-on authentication.

Patch against master is attached.

  0001-implement-Kerberos-authentication.patch
13K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marius Mårnes Mathiesen  
View profile  
 More options Apr 17 2012, 4:32 am
From: Marius Mårnes Mathiesen <marius.mathie...@gmail.com>
Date: Tue, 17 Apr 2012 10:32:06 +0200
Local: Tues, Apr 17 2012 4:32 am
Subject: Re: [gitorious] Kerberos authentication

Ken,
Great work! I know next to nothing about Kerberos, but it's been on my todo
list for a while to investigate how to support it in Gitorious.

I see that you had to do quite some legwork to allow for an authentication
API that doesn't require an explicit username and password. I'd really
prefer a single authentication API than branching logic in the client code.

The authentication modules probably should take a single parameter, not an
explicit username/password combination. This way, "your" module would
receive the HTTP request as its parameter to authenticate (instead of the
separate authenticate_http method). We'll just wrap the existing email
address/password combination into an object and pass that to the other
authentication modules, eg.:

module Gitorious
  module Authentication
    class DatabaseAuthentication
      def authenticate(credentials)
        User.authenticate(credentials.username, credentials.password)
      end
    end
  end
end

I'm thinking that this would make your code even easier to read, what do
you think?

And again: thanks! We really appreciate this.

Cheers,
- Marius

--
Marius Mårnes Mathiesen
Rubyist, Shortcut AS
Tel.: (+47) 92 60 95 38.

http://shortcut.no


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Dreyer  
View profile  
 More options Apr 23 2012, 11:20 am
From: Ken Dreyer <ktdre...@ktdreyer.com>
Date: Mon, 23 Apr 2012 09:20:12 -0600
Local: Mon, Apr 23 2012 11:20 am
Subject: Re: [gitorious] Kerberos authentication

On Tue, Apr 17, 2012 at 2:32 AM, Marius Mårnes Mathiesen

<marius.mathie...@gmail.com> wrote:
> Great work! I know next to nothing about Kerberos, but it's been on my todo
> list for a while to investigate how to support it in Gitorious.

Thanks! I appreciate your review and your feedback.

I implemented your suggestion for modifying the auth plugin API, and
broke that off into my first patch. I tried to update the test suite
to match this change.

Kerberos auth is in the second patch. It is similar the patch I
previously emailed, with the following improvements:
-  Add a "pretty" HTTP 401 error page to match the rest of Gitorious's
look and feel. The web server will show this error if the user's
Kerberos credentials are missing or invalid, or if the user's browser
is not properly configured for Kerberos authentication.
- When auto-registering a user, set the default email address to use
the user's original Kerberos principal, rather than the sanitized
Gitorious username.
- Add a basic set of tests.

Both patches are attached, rebased against current master (430eb2bda).
Please let me know if these look ok :)

- Ken

  0001-wrap-authenticate-parameters-in-a-credential-object.patch
18K Download

  0002-implement-Kerberos-authentication.patch
20K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Dreyer  
View profile  
 More options May 1 2012, 11:33 pm
From: Ken Dreyer <ktdre...@ktdreyer.com>
Date: Tue, 1 May 2012 21:33:44 -0600
Local: Tues, May 1 2012 11:33 pm
Subject: Re: [gitorious] Kerberos authentication

On Mon, Apr 23, 2012 at 9:20 AM, Ken Dreyer <ktdre...@ktdreyer.com> wrote:
> Both patches are attached, rebased against current master (430eb2bda).
> Please let me know if these look ok :)

Gitorious devs,

If my approach here is ok, please let me know and I'll submit a merge
request to get this into mainline.

- Ken


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marius Mårnes Mathiesen  
View profile  
 More options May 3 2012, 1:26 pm
From: Marius Mårnes Mathiesen <marius.mathie...@gmail.com>
Date: Thu, 3 May 2012 19:26:45 +0200
Local: Thurs, May 3 2012 1:26 pm
Subject: Re: [gitorious] Kerberos authentication

On Wed, May 2, 2012 at 5:33 AM, Ken Dreyer <ktdre...@ktdreyer.com> wrote:
> On Mon, Apr 23, 2012 at 9:20 AM, Ken Dreyer <ktdre...@ktdreyer.com> wrote:
> > Both patches are attached, rebased against current master (430eb2bda).
> > Please let me know if these look ok :)

> Gitorious devs,

> If my approach here is ok, please let me know and I'll submit a merge
> request to get this into mainline.

Ken,
First of all: sorry for being unresponsive.

I think this looks really good, and I'd love it if you'd submit a merge
request for it.

Thanks - this is really appreciated!

Cheers,
- Marius


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Dreyer  
View profile   Translate to Translated (View Original)
 More options May 17 2012, 3:05 pm
From: Ken Dreyer <ktdre...@ktdreyer.com>
Date: Thu, 17 May 2012 13:05:46 -0600
Local: Thurs, May 17 2012 3:05 pm
Subject: Re: [gitorious] Kerberos authentication
On Thu, May 3, 2012 at 11:26 AM, Marius Mårnes Mathiesen

<marius.mathie...@gmail.com> wrote:
> On Wed, May 2, 2012 at 5:33 AM, Ken Dreyer <ktdre...@ktdreyer.com> wrote:
> I think this looks really good, and I'd love it if you'd submit a merge
> request for it.

> Thanks - this is really appreciated!

Thanks for the encouragement. I've submitted the merge request here:
https://gitorious.org/gitorious/mainline/merge_requests/202

- Ken


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »