You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Robert Haycock <Ro...@mediasurface.com> on 2005/04/28 19:08:45 UTC
Getting my mina handler to work with ldap
Right,
I've written a GSS handler now need to test it. Only problem is I can't see
how it plugs in.
I start the service like this...
public class GssService {
/** Choose your favorite port number. */
private static final int PORT = 389;
public static void main( String[] args ) throws Exception
{
ServiceRegistry registry = new SimpleServiceRegistry();
// Register echo service
registry.bind(
new Service( "gssHandler", TransportType.SOCKET, new
InetSocketAddress( PORT ) ),
new GSSMyHandler() );
System.out.println( registry.getAllServices() );
}
}
And start ldap like this...
F:\apacheds\apacheds-0.8>java -Dserver.net.passthru=gssFilter -jar
apacheds-main
-0.8.jar
server: using default properties ...
server: standard ldap port 389 is not available, using 1024 instead
server: started in 1063 milliseconds
I've tried with a different port as well. Could you please tell me how I
get ldap to use my handler
Thanks.
Rob.
[mina] SASL Filter WAS: Re: Getting my mina handler to work with ldap
Posted by Vinod Panicker <vi...@gmail.com>.
On 4/29/05, Enrique Rodriguez <er...@apache.org> wrote:
--snip--
>
> So, I was picturing SASL/GSSAPI as a MINA filter, along the lines of:
> org.apache.mina.io.filter.SSLFilter and supporting classes.
>
Trustin,
How bout getting an SASL filter into MINA? Now that filters are
session-based, it would be pretty simple to implement. I've got a
DIGEST-MD5 impl that i had done for a poc with the old MINA using the
ProtocolHandler. Lemme see if I can make a filter out of it. Would
be really cool that way.
Any pointers?
Regards,
Vinod.
--snip--
Re: Getting my mina handler to work with ldap
Posted by Enrique Rodriguez <er...@apache.org>.
What does your handler look like? If you start ServerContextFactory it
starts a MINA registry and the LDAP wire protocol. To more control what
gets started, and combine them properly, you'll want to use
CoreContextFactory, with is the ApacheDS backing store without MINA,
LDAP, or Kerberos. From CCF, which implements InitialContextFactory,
you can get an LdapContext and use that to look up keys using the JNDI
API. Then you can start a MINA ServiceRegistry and the LDAP wire
protocol and work to get SASL/GSSAPI in there.
So, I was picturing SASL/GSSAPI as a MINA filter, along the lines of:
org.apache.mina.io.filter.SSLFilter and supporting classes.
I'd also take a look at the recent JIRA submission on combining LDAP and
SSL ... but it doesn't appear to be working for me.
-enrique
Robert Haycock wrote:
> Right,
>
>
>
> I've written a GSS handler now need to test it. Only problem is I can't
> see how it plugs in.
>
>
>
> I start the service like this...
>
>
>
> public class GssService {
>
> /** Choose your favorite port number. */
>
> private static final int PORT = 389;
>
>
>
> public static void main( String[] args ) throws Exception
>
> {
>
> ServiceRegistry registry = new SimpleServiceRegistry();
>
>
>
> // Register echo service
>
> registry.bind(
>
> new Service( "gssHandler", TransportType.SOCKET, new
> InetSocketAddress( PORT ) ),
>
> new GSSMyHandler() );
>
>
>
> System.out.println( registry.getAllServices() );
>
> }
>
> }
>
>
>
>
>
>
>
> And start ldap like this...
>
>
>
> F:\apacheds\apacheds-0.8>java -Dserver.net.passthru=gssFilter -jar
> apacheds-main
>
> -0.8.jar
>
> server: using default properties ...
>
> server: standard ldap port 389 is not available, using 1024 instead
>
> server: started in 1063 milliseconds
>
>
>
>
>
>
>
> I’ve tried with a different port as well. Could you please tell me how
> I get ldap to use my handler
>
>
>
> Thanks.
>
>
>
> Rob.
>