Hi,
Started looking at an LDAP user repository, but...

Federico Barbieri wrote:
> 
> Serge Knystautas wrote:
> >
> > Ye Tao wrote:
> > > two questions:
> > >
> > > 1. how to replace the existing UserManager with my own
> > > implementation, for example,if i want to use LDAP. so
> > > far the only way i can think of is to write my own
> > > UserManager with the same package path, and put it
> > > before the James implementation in the classpath. is
> > > it possible to enhance the current James
> > > implementation to allow a more pluggable framework?
> >
> > This is where I think JAMES needs to head next.  A few other people have
> > already noted their interest to allow swappable mail stores (generally
> > to an RDBMS instead of the file system), and then there's of course the
> > user manager.  Federico has built much of the architecture, and I've
> > been waiting for him to get back from vacation before diving too far
> > into this.  We use LDAP internally (and of course RDBMS's), so I'm very
> > much interested in this, and I think this will involve defining an API
> > and building a few implementations for the usermanager and mail stores.
> > The hard part with user manager is getting combining authentication with
> > mail store.  The UserManager authenticates the user and then knows how
> > to grab their inbox... I don't think this will be easy to capture (at
> > least nothing jumps right out at me).
> >
> 
> Ok here I am!
> 
> About this issue my picture is of one UserManager and one MailRepository
> with pluggable backend.
> Right now all you need to do to switch to a LDAP is to write an
> ObjectRepository LDAP based and configure the RemoteManager to use it:
> 
> form
>             <usersManager>
>                 <repository> file://../var/users/ </repository>
>             </usersManager>
> 
> to
> 
>             <usersManager>
>                 <repository> ldap://[host]/[..] </repository>
>             </usersManager>
> 
> To register the new repository type (wich can be in any package you
> wish) just add this line to the Store configuration:
> 
>                 <repository type="OBJECT" model="SYNCHRONOUS,
> ASYNCHRONOUS"
>                     destination="ldap://"
> 
> class="com.mycompany.whatever.MyLDAPImplementation"/>
> 
> The same apply to the MailRepository (actually I think I need to clean a
> couple of lines of code) as soon as you provide a StreamRepository
> implementation too.

But shouldn't james.usermanager.UsersRepository be an interface? With,
for example, a UsersFSRepository and a UsersLDAPRepository?
UserManager has a method 'public UsersRepository
getUserRepository(String name)', which, I think requires making
UsersRepository an interface, before writing an LDAP implementation?
If that is correct, I'm happy to split the current UsersRepository into
an interface and an implementation. If that's wrong, please advise.

Charles


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to