You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Enrique Rodriguez <en...@gmail.com> on 2007/02/19 02:46:39 UTC

[Kerberos] Kerberos + Wicket

Hi, Directory developers,

As part of documenting practical uses of Apache Directory for Kerberos
authentication, I got Kerberos authentication to a Wicket web app
working.  This uses the "SPNEGO+GSS-API+Kerberos V5" scheme
popularized by IE and now well-supported in Firefox.  I used the jGSS
code in JDK 1.5, so this was a pretty quick 80-lines of code to glue
Negotiate processing to Wicket.  The "three-headed" Kerberos setup I
tested was (1) Firefox 2 and IE 7 (2) Wicket app (3) and Apache
Directory.

I wanted to check where the best home for this code is.  I followed
the layout of the "signin" and "signin2" apps in Wicket Examples, so
one possibility is a contribution to Wicket.  But, 90% of the
difficulty is in the configuration of Kerberos, so I think it makes
the most sense to maintain at Directory.  The code is commented and
ready to commit.  I would do a Confluence page to detail, from
scratch, how to set this up.

Any objections to my committing this to Directory?  Would it be a
module in trunk or something I put in my sandbox, maybe until you get
to review a TBD Confluence page?

Enrique

Re: [Kerberos] Kerberos + Wicket

Posted by Alex Karasulu <ak...@apache.org>.
Enrique,

On 2/18/07, Enrique Rodriguez <en...@gmail.com> wrote:
>
> Hi, Directory developers,
>
> As part of documenting practical uses of Apache Directory for Kerberos
> authentication, I got Kerberos authentication to a Wicket web app
> working.  This uses the "SPNEGO+GSS-API+Kerberos V5" scheme
> popularized by IE and now well-supported in Firefox.  I used the jGSS
> code in JDK 1.5, so this was a pretty quick 80-lines of code to glue
> Negotiate processing to Wicket.  The "three-headed" Kerberos setup I
> tested was (1) Firefox 2 and IE 7 (2) Wicket app (3) and Apache
> Directory.


That sounds neat.  I'm sure this will come in handy when we build a UI for
the server and need to authenticate users.

I wanted to check where the best home for this code is.  I followed
> the layout of the "signin" and "signin2" apps in Wicket Examples, so
> one possibility is a contribution to Wicket.  But, 90% of the
> difficulty is in the configuration of Kerberos, so I think it makes
> the most sense to maintain at Directory.  The code is commented and
> ready to commit.  I would do a Confluence page to detail, from
> scratch, how to set this up.


Great!  Documentation would be good.  This sounds like a perfect candidate
for the clients project under the kerberos module in it.  I don't think we
have added much if anything to this module.  Here's the SVN url for the
base:

http://svn.apache.org/viewvc/directory/clients/trunk/kerberos/


Any objections to my committing this to Directory?


None, so long as there is some documentation to accompany the sources
committed.

Thanks,
Alex

Re: [Kerberos] Kerberos + Wicket

Posted by Enrique Rodriguez <en...@gmail.com>.
On 2/18/07, Ersin Er <er...@gmail.com> wrote:
> ...
> We are generally putting such stuff at DIRxSBOX space so that we can
> review or not publish until it's mature (well I do not say all the
> content in other spaces are mature) ...

OK, I put what I have so far in DIRxSBOX at:
http://cwiki.apache.org/confluence/display/DIRxSBOX/Kerberos+Authentication+to+Wicket

I still need to clean up my sample LDIF and commit the web app itself.

Enrique

Re: [Kerberos] Kerberos + Wicket

Posted by Ersin Er <er...@gmail.com>.
On 2/19/07, Enrique Rodriguez <en...@gmail.com> wrote:
> Hi, Directory developers,

Hi,

> As part of documenting practical uses of Apache Directory for Kerberos
> authentication, I got Kerberos authentication to a Wicket web app
> working.  This uses the "SPNEGO+GSS-API+Kerberos V5" scheme
> popularized by IE and now well-supported in Firefox.  I used the jGSS
> code in JDK 1.5, so this was a pretty quick 80-lines of code to glue
> Negotiate processing to Wicket.  The "three-headed" Kerberos setup I
> tested was (1) Firefox 2 and IE 7 (2) Wicket app (3) and Apache
> Directory.

This is great! Especially as we already are using Wicket in Triplesec
and want to use it more.

> I wanted to check where the best home for this code is.  I followed
> the layout of the "signin" and "signin2" apps in Wicket Examples, so
> one possibility is a contribution to Wicket.  But, 90% of the
> difficulty is in the configuration of Kerberos, so I think it makes
> the most sense to maintain at Directory.  The code is commented and
> ready to commit.  I would do a Confluence page to detail, from
> scratch, how to set this up.
>
> Any objections to my committing this to Directory?  Would it be a
> module in trunk or something I put in my sandbox, maybe until you get
> to review a TBD Confluence page?

We are generally putting such stuff at DIRxSBOX space so that we can
review or not publish until it's mature (well I do not say all the
content in other spaces are mature). Stefan has such an effort here
for example:
http://cwiki.apache.org/confluence/display/DIRxSBOX/Embedding+ApacheDS+as+a+Web+Application

And for the package structure, I think it can be in an
'examples.wicket' package in Kerberos code. Stefan may have more ideas
here as he's already doing some similar stuff these days.

Thanks!

> Enrique

-- 
Ersin

Re: [Kerberos] Kerberos + Wicket

Posted by Enrique Rodriguez <en...@gmail.com>.
On 2/18/07, David Jencks <da...@yahoo.com> wrote:
> I don't know anything about wicket... does this use a LoginModule and/
> or  login configuration?

Yes.  jGSS will check for system property
"java.security.auth.login.config," where you configure it to use
Krb5LoginModule and where you tell it to use a Kerberos key from a
keytab file (as opposed to username/password key derivation) and where
you also tell it what principal it is operating as.

> On a conceivably related note, triplesec has some nasty code to try
> to find a sun or ibm kerberos LoginModule.... do you have one or know
> how to write one?  I think having our own would be pretty handy.

I know I wrote one at some point but a quick search didn't turn it up.
 I'm sure I could help if I know what you're trying to do that you
can't do with Krb5LoginModule.  What I did find was in the
kerberos-shared module in package
"org.apache.directory.server.kerberos.shared.jaas" there is some quick
wrapper code to basically disable Krb5LoginModule's use of an external
text config file.

Enrique

Re: [Kerberos] Kerberos + Wicket

Posted by Alex Karasulu <ak...@apache.org>.
A Kerberos client would be great to have.  Enrique and I often spoke about
having such a client to not have to deal with the ugliness of the the
various KRB5 login modules supported by JVM vendors.

It would clean up much of the nasty code in Tsec/ADS and would make it
easier to manage the configuration of Tsec/ADS itself.

Alex

On 2/19/07, David Jencks <da...@yahoo.com> wrote:
>
>
> On Feb 18, 2007, at 6:30 PM, Enrique Rodriguez wrote:
>
> > On 2/18/07, David Jencks <da...@yahoo.com> wrote:
> >> ...
> >> On a conceivably related note, triplesec has some nasty code to try
> >> to find a sun or ibm kerberos LoginModule.... do you have one or know
> >> how to write one?  I think having our own would be pretty handy.
> >
> > Wait ... can you clarify?  I wrote a LoginModule once but I think it
> > was just to get out of having to use the JDK's configuration system
> > (conf files, properties ...).  I realized just now that maybe you
> > meant writing an entire Kerberos client that didn't rely on underlying
> > com.sun classes.  In which case, we've talked about doing that for a
> > long time, most notably so we could support OTP's, IDfusion,
> > authorization payload, smart cards, or modern configuration
> > mechanisms.  As with our other server protocols, we have a lot of the
> > guts to do a client library.
> >
> > Is a Kerberos client implementation what you asking for?
>
> I think so.... I'd like a Krb5LoginModule that I can use on either
> sun or ibm jdks without it having to test which one it's running on.
>
> I'm need to study jGSS more to make sense of your previous answer :-)
>
> many thanks
> david jencks
>
> >
> > Enrique
>
>

Re: [Kerberos] Kerberos + Wicket

Posted by David Jencks <da...@yahoo.com>.
On Feb 18, 2007, at 6:30 PM, Enrique Rodriguez wrote:

> On 2/18/07, David Jencks <da...@yahoo.com> wrote:
>> ...
>> On a conceivably related note, triplesec has some nasty code to try
>> to find a sun or ibm kerberos LoginModule.... do you have one or know
>> how to write one?  I think having our own would be pretty handy.
>
> Wait ... can you clarify?  I wrote a LoginModule once but I think it
> was just to get out of having to use the JDK's configuration system
> (conf files, properties ...).  I realized just now that maybe you
> meant writing an entire Kerberos client that didn't rely on underlying
> com.sun classes.  In which case, we've talked about doing that for a
> long time, most notably so we could support OTP's, IDfusion,
> authorization payload, smart cards, or modern configuration
> mechanisms.  As with our other server protocols, we have a lot of the
> guts to do a client library.
>
> Is a Kerberos client implementation what you asking for?

I think so.... I'd like a Krb5LoginModule that I can use on either  
sun or ibm jdks without it having to test which one it's running on.

I'm need to study jGSS more to make sense of your previous answer :-)

many thanks
david jencks

>
> Enrique


Re: [Kerberos] Kerberos + Wicket

Posted by Enrique Rodriguez <en...@gmail.com>.
On 2/18/07, David Jencks <da...@yahoo.com> wrote:
> ...
> On a conceivably related note, triplesec has some nasty code to try
> to find a sun or ibm kerberos LoginModule.... do you have one or know
> how to write one?  I think having our own would be pretty handy.

Wait ... can you clarify?  I wrote a LoginModule once but I think it
was just to get out of having to use the JDK's configuration system
(conf files, properties ...).  I realized just now that maybe you
meant writing an entire Kerberos client that didn't rely on underlying
com.sun classes.  In which case, we've talked about doing that for a
long time, most notably so we could support OTP's, IDfusion,
authorization payload, smart cards, or modern configuration
mechanisms.  As with our other server protocols, we have a lot of the
guts to do a client library.

Is a Kerberos client implementation what you asking for?

Enrique

Re: [Kerberos] Kerberos + Wicket

Posted by David Jencks <da...@yahoo.com>.
I don't know anything about wicket... does this use a LoginModule and/ 
or  login configuration?

On a conceivably related note, triplesec has some nasty code to try  
to find a sun or ibm kerberos LoginModule.... do you have one or know  
how to write one?  I think having our own would be pretty handy.

thanks
david jencks

On Feb 18, 2007, at 5:46 PM, Enrique Rodriguez wrote:

> Hi, Directory developers,
>
> As part of documenting practical uses of Apache Directory for Kerberos
> authentication, I got Kerberos authentication to a Wicket web app
> working.  This uses the "SPNEGO+GSS-API+Kerberos V5" scheme
> popularized by IE and now well-supported in Firefox.  I used the jGSS
> code in JDK 1.5, so this was a pretty quick 80-lines of code to glue
> Negotiate processing to Wicket.  The "three-headed" Kerberos setup I
> tested was (1) Firefox 2 and IE 7 (2) Wicket app (3) and Apache
> Directory.
>
> I wanted to check where the best home for this code is.  I followed
> the layout of the "signin" and "signin2" apps in Wicket Examples, so
> one possibility is a contribution to Wicket.  But, 90% of the
> difficulty is in the configuration of Kerberos, so I think it makes
> the most sense to maintain at Directory.  The code is commented and
> ready to commit.  I would do a Confluence page to detail, from
> scratch, how to set this up.
>
> Any objections to my committing this to Directory?  Would it be a
> module in trunk or something I put in my sandbox, maybe until you get
> to review a TBD Confluence page?
>
> Enrique


Re: [Kerberos] Kerberos + Wicket

Posted by Ole Ersoy <ol...@yahoo.com>.
Hey Enrique,

Sounds terrific.  Can't wait to have a look.

Apache Shale might be interested in providing a
module/api making it easy to integrate shale with ADS
for authentication.  Shale seems to be using a spring
type of approach to integration with various other
projects.  I would think Tomcat would be interested as
well.

Cheers,
- Ole


--- Enrique Rodriguez <en...@gmail.com> wrote:

> Hi, Directory developers,
> 
> As part of documenting practical uses of Apache
> Directory for Kerberos
> authentication, I got Kerberos authentication to a
> Wicket web app
> working.  This uses the "SPNEGO+GSS-API+Kerberos V5"
> scheme
> popularized by IE and now well-supported in Firefox.
>  I used the jGSS
> code in JDK 1.5, so this was a pretty quick 80-lines
> of code to glue
> Negotiate processing to Wicket.  The "three-headed"
> Kerberos setup I
> tested was (1) Firefox 2 and IE 7 (2) Wicket app (3)
> and Apache
> Directory.
> 
> I wanted to check where the best home for this code
> is.  I followed
> the layout of the "signin" and "signin2" apps in
> Wicket Examples, so
> one possibility is a contribution to Wicket.  But,
> 90% of the
> difficulty is in the configuration of Kerberos, so I
> think it makes
> the most sense to maintain at Directory.  The code
> is commented and
> ready to commit.  I would do a Confluence page to
> detail, from
> scratch, how to set this up.
> 
> Any objections to my committing this to Directory? 
> Would it be a
> module in trunk or something I put in my sandbox,
> maybe until you get
> to review a TBD Confluence page?
> 
> Enrique
> 



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather